| ; |
| ; vertex_main |
| ; |
| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 1 |
| ; Bound: 496 |
| ; Schema: 0 |
| OpCapability Shader |
| %44 = OpExtInstImport "GLSL.std.450" |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint Vertex %vertex_main "vertex_main" %vertex_main_position_Output %vertex_main___point_size_Output |
| OpMemberName %arg_0_params_block_tint_explicit_layout 0 "inner" |
| OpName %arg_0_params_block_tint_explicit_layout "arg_0_params_block_tint_explicit_layout" |
| OpName %arg_0_plane0 "arg_0_plane0" |
| OpName %arg_0_plane1 "arg_0_plane1" |
| OpName %vertex_main_position_Output "vertex_main_position_Output" |
| OpName %vertex_main___point_size_Output "vertex_main___point_size_Output" |
| OpName %textureLoad2d "textureLoad2d" |
| OpName %coords "coords" |
| OpMemberName %tint_ExternalTextureParams 0 "numPlanes" |
| OpMemberName %tint_ExternalTextureParams 1 "doYuvToRgbConversionOnly" |
| OpMemberName %tint_ExternalTextureParams 2 "yuvToRgbConversionMatrix" |
| OpMemberName %tint_TransferFunctionParams 0 "mode" |
| OpMemberName %tint_TransferFunctionParams 1 "A" |
| OpMemberName %tint_TransferFunctionParams 2 "B" |
| OpMemberName %tint_TransferFunctionParams 3 "C" |
| OpMemberName %tint_TransferFunctionParams 4 "D" |
| OpMemberName %tint_TransferFunctionParams 5 "E" |
| OpMemberName %tint_TransferFunctionParams 6 "F" |
| OpMemberName %tint_TransferFunctionParams 7 "G" |
| OpName %tint_TransferFunctionParams "tint_TransferFunctionParams" |
| OpMemberName %tint_ExternalTextureParams 3 "srcTransferFunction" |
| OpMemberName %tint_ExternalTextureParams 4 "dstTransferFunction" |
| OpMemberName %tint_ExternalTextureParams 5 "gamutConversionMatrix" |
| OpMemberName %tint_ExternalTextureParams 6 "sampleTransform" |
| OpMemberName %tint_ExternalTextureParams 7 "loadTransform" |
| OpMemberName %tint_ExternalTextureParams 8 "samplePlane0RectMin" |
| OpMemberName %tint_ExternalTextureParams 9 "samplePlane0RectMax" |
| OpMemberName %tint_ExternalTextureParams 10 "samplePlane1RectMin" |
| OpMemberName %tint_ExternalTextureParams 11 "samplePlane1RectMax" |
| OpMemberName %tint_ExternalTextureParams 12 "apparentSize" |
| OpMemberName %tint_ExternalTextureParams 13 "plane1CoordFactor" |
| OpName %tint_ExternalTextureParams "tint_ExternalTextureParams" |
| OpName %doTextureLoad "doTextureLoad" |
| OpName %res "res" |
| OpName %vertex_main_inner "vertex_main_inner" |
| OpName %tint_TextureLoadMultiplanarExternal "tint_TextureLoadMultiplanarExternal" |
| OpName %plane_0 "plane_0" |
| OpName %plane_1 "plane_1" |
| OpName %params "params" |
| OpName %coords_0 "coords" |
| OpName %tint_ApplySrcTransferFunction "tint_ApplySrcTransferFunction" |
| OpName %v "v" |
| OpName %params_0 "params" |
| OpName %return_value "return_value" |
| OpName %mode "mode" |
| OpName %tint_ApplyGammaTransferFunction "tint_ApplyGammaTransferFunction" |
| OpName %v_0 "v" |
| OpName %params_1 "params" |
| OpName %A "A" |
| OpName %B "B" |
| OpName %C "C" |
| OpName %D "D" |
| OpName %E "E" |
| OpName %F "F" |
| OpName %G "G" |
| OpName %tint_ApplyHLGSingleChannel "tint_ApplyHLGSingleChannel" |
| OpName %v_1 "v" |
| OpName %params_2 "params" |
| OpName %return_value_0 "return_value" |
| OpName %A_0 "A" |
| OpName %B_0 "B" |
| OpName %C_0 "C" |
| OpName %cutoff "cutoff" |
| OpName %lower_scale "lower_scale" |
| OpName %upper_scale "upper_scale" |
| OpName %tint_ApplyHLGTransferFunction "tint_ApplyHLGTransferFunction" |
| OpName %v_2 "v" |
| OpName %params_3 "params" |
| OpName %tint_ApplyPQTransferFunction "tint_ApplyPQTransferFunction" |
| OpName %v_3 "v" |
| OpName %params_4 "params" |
| OpName %m1 "m1" |
| OpName %m2 "m2" |
| OpName %c1 "c1" |
| OpName %c2 "c2" |
| OpName %c3 "c3" |
| OpName %start_byte_offset "start_byte_offset" |
| OpName %start_byte_offset_0 "start_byte_offset" |
| OpName %start_byte_offset_1 "start_byte_offset" |
| OpName %start_byte_offset_2 "start_byte_offset" |
| OpName %start_byte_offset_3 "start_byte_offset" |
| OpName %vertex_main "vertex_main" |
| OpDecorate %_arr_v4uint_uint_17 ArrayStride 16 |
| OpMemberDecorate %arg_0_params_block_tint_explicit_layout 0 Offset 0 |
| OpDecorate %arg_0_params_block_tint_explicit_layout Block |
| OpDecorate %1 DescriptorSet 1 |
| OpDecorate %1 Binding 2 |
| OpDecorate %1 NonWritable |
| OpDecorate %arg_0_plane0 DescriptorSet 1 |
| OpDecorate %arg_0_plane0 Binding 0 |
| OpDecorate %arg_0_plane1 DescriptorSet 1 |
| OpDecorate %arg_0_plane1 Binding 1 |
| OpDecorate %vertex_main_position_Output BuiltIn Position |
| OpDecorate %vertex_main___point_size_Output BuiltIn PointSize |
| %uint = OpTypeInt 32 0 |
| %v4uint = OpTypeVector %uint 4 |
| %uint_17 = OpConstant %uint 17 |
| %_arr_v4uint_uint_17 = OpTypeArray %v4uint %uint_17 |
| %arg_0_params_block_tint_explicit_layout = OpTypeStruct %_arr_v4uint_uint_17 |
| %_ptr_Uniform_arg_0_params_block_tint_explicit_layout = OpTypePointer Uniform %arg_0_params_block_tint_explicit_layout |
| %1 = OpVariable %_ptr_Uniform_arg_0_params_block_tint_explicit_layout Uniform |
| %float = OpTypeFloat 32 |
| %10 = OpTypeImage %float 2D 0 0 0 1 Unknown |
| %_ptr_UniformConstant_10 = OpTypePointer UniformConstant %10 |
| %arg_0_plane0 = OpVariable %_ptr_UniformConstant_10 UniformConstant |
| %arg_0_plane1 = OpVariable %_ptr_UniformConstant_10 UniformConstant |
| %v4float = OpTypeVector %float 4 |
| %_ptr_Output_v4float = OpTypePointer Output %v4float |
| %vertex_main_position_Output = OpVariable %_ptr_Output_v4float Output |
| %_ptr_Output_float = OpTypePointer Output %float |
| %vertex_main___point_size_Output = OpVariable %_ptr_Output_float Output |
| %int = OpTypeInt 32 1 |
| %v2int = OpTypeVector %int 2 |
| %22 = OpTypeFunction %v4float %v2int |
| %mat3v4float = OpTypeMatrix %v4float 3 |
| %tint_TransferFunctionParams = OpTypeStruct %uint %float %float %float %float %float %float %float |
| %v3float = OpTypeVector %float 3 |
| %mat3v3float = OpTypeMatrix %v3float 3 |
| %v2float = OpTypeVector %float 2 |
| %mat3v2float = OpTypeMatrix %v2float 3 |
| %v2uint = OpTypeVector %uint 2 |
| %tint_ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %tint_TransferFunctionParams %tint_TransferFunctionParams %mat3v3float %mat3v2float %mat3v2float %v2float %v2float %v2float %v2float %v2uint %v2float |
| %uint_0 = OpConstant %uint 0 |
| %uint_1 = OpConstant %uint 1 |
| %39 = OpConstantComposite %v2uint %uint_1 %uint_1 |
| %void = OpTypeVoid |
| %49 = OpTypeFunction %void |
| %52 = OpConstantNull %v2int |
| %_ptr_Function_v4float = OpTypePointer Function %v4float |
| %56 = OpTypeFunction %v4float |
| %59 = OpConstantNull %v4float |
| %64 = OpTypeFunction %v4float %10 %10 %tint_ExternalTextureParams %v2uint |
| %float_1 = OpConstant %float 1 |
| %bool = OpTypeBool |
| %113 = OpTypeFunction %v3float %v3float %tint_TransferFunctionParams |
| %_ptr_Function_v3float = OpTypePointer Function %v3float |
| %117 = OpConstantNull %v3float |
| %v3bool = OpTypeVector %bool 3 |
| %164 = OpTypeFunction %float %float %tint_TransferFunctionParams |
| %_ptr_Function_float = OpTypePointer Function %float |
| %168 = OpConstantNull %float |
| %211 = OpConstantComposite %v3float %float_1 %float_1 %float_1 |
| %222 = OpTypeFunction %tint_ExternalTextureParams %uint |
| %uint_16 = OpConstant %uint 16 |
| %_ptr_Uniform_v4uint = OpTypePointer Uniform %v4uint |
| %uint_15 = OpConstant %uint 15 |
| %uint_2 = OpConstant %uint 2 |
| %uint_4 = OpConstant %uint 4 |
| %uint_64 = OpConstant %uint 64 |
| %uint_96 = OpConstant %uint 96 |
| %uint_128 = OpConstant %uint 128 |
| %uint_176 = OpConstant %uint 176 |
| %uint_200 = OpConstant %uint 200 |
| %uint_224 = OpConstant %uint 224 |
| %v2bool = OpTypeVector %bool 2 |
| %uint_232 = OpConstant %uint 232 |
| %uint_240 = OpConstant %uint 240 |
| %uint_248 = OpConstant %uint 248 |
| %uint_256 = OpConstant %uint 256 |
| %uint_264 = OpConstant %uint 264 |
| %343 = OpTypeFunction %mat3v4float %uint |
| %uint_32 = OpConstant %uint 32 |
| %362 = OpTypeFunction %tint_TransferFunctionParams %uint |
| %uint_8 = OpConstant %uint 8 |
| %uint_12 = OpConstant %uint 12 |
| %uint_20 = OpConstant %uint 20 |
| %uint_24 = OpConstant %uint 24 |
| %uint_28 = OpConstant %uint 28 |
| %433 = OpTypeFunction %mat3v3float %uint |
| %v3uint = OpTypeVector %uint 3 |
| %455 = OpTypeFunction %mat3v2float %uint |
| %textureLoad2d = OpFunction %v4float None %22 |
| %coords = OpFunctionParameter %v2int |
| %23 = OpLabel |
| %24 = OpLoad %10 %arg_0_plane0 None |
| %25 = OpLoad %10 %arg_0_plane1 None |
| %26 = OpFunctionCall %tint_ExternalTextureParams %35 %uint_0 |
| %37 = OpCompositeExtract %v2uint %26 12 |
| %38 = OpIAdd %v2uint %37 %39 |
| %41 = OpISub %v2uint %38 %39 |
| %42 = OpBitcast %v2uint %coords |
| %43 = OpExtInst %v2uint %44 UMin %42 %41 |
| %45 = OpFunctionCall %v4float %tint_TextureLoadMultiplanarExternal %24 %25 %26 %43 |
| OpReturnValue %45 |
| OpFunctionEnd |
| %doTextureLoad = OpFunction %void None %49 |
| %50 = OpLabel |
| %res = OpVariable %_ptr_Function_v4float Function |
| %51 = OpFunctionCall %v4float %textureLoad2d %52 |
| OpStore %res %51 |
| OpReturn |
| OpFunctionEnd |
| %vertex_main_inner = OpFunction %v4float None %56 |
| %57 = OpLabel |
| %58 = OpFunctionCall %void %doTextureLoad |
| OpReturnValue %59 |
| OpFunctionEnd |
| %tint_TextureLoadMultiplanarExternal = OpFunction %v4float None %64 |
| %plane_0 = OpFunctionParameter %10 |
| %plane_1 = OpFunctionParameter %10 |
| %params = OpFunctionParameter %tint_ExternalTextureParams |
| %coords_0 = OpFunctionParameter %v2uint |
| %65 = OpLabel |
| %66 = OpCompositeExtract %uint %params 1 |
| %67 = OpCompositeExtract %mat3v4float %params 2 |
| %68 = OpCompositeExtract %mat3v2float %params 7 |
| %69 = OpCompositeExtract %v2uint %params 12 |
| %70 = OpCompositeExtract %v2float %params 13 |
| %71 = OpExtInst %v2uint %44 UMin %coords_0 %69 |
| %72 = OpConvertUToF %v2float %71 |
| %73 = OpCompositeConstruct %v3float %72 %float_1 |
| %75 = OpMatrixTimesVector %v2float %68 %73 |
| %76 = OpExtInst %v2float %44 RoundEven %75 |
| %77 = OpConvertFToU %v2uint %76 |
| %78 = OpCompositeExtract %uint %params 0 |
| %79 = OpIEqual %bool %78 %uint_1 |
| OpSelectionMerge %81 None |
| OpBranchConditional %79 %82 %83 |
| %82 = OpLabel |
| %96 = OpImageFetch %v4float %plane_0 %77 Lod %uint_0 |
| %85 = OpVectorShuffle %v3float %96 %96 0 1 2 |
| %88 = OpCompositeExtract %float %96 3 |
| OpBranch %81 |
| %83 = OpLabel |
| %97 = OpImageFetch %v4float %plane_0 %77 Lod %uint_0 |
| %98 = OpCompositeExtract %float %97 0 |
| %99 = OpFMul %v2float %76 %70 |
| %100 = OpConvertFToU %v2uint %99 |
| %101 = OpImageFetch %v4float %plane_1 %100 Lod %uint_0 |
| %102 = OpVectorShuffle %v2float %101 %101 0 1 |
| %103 = OpCompositeConstruct %v4float %98 %102 %float_1 |
| %86 = OpVectorTimesMatrix %v3float %103 %67 |
| OpBranch %81 |
| %81 = OpLabel |
| %84 = OpPhi %v3float %85 %82 %86 %83 |
| %87 = OpPhi %float %88 %82 %float_1 %83 |
| %89 = OpIEqual %bool %66 %uint_0 |
| OpSelectionMerge %90 None |
| OpBranchConditional %89 %91 %92 |
| %91 = OpLabel |
| %104 = OpCompositeExtract %tint_TransferFunctionParams %params 3 |
| %105 = OpCompositeExtract %tint_TransferFunctionParams %params 4 |
| %106 = OpCompositeExtract %mat3v3float %params 5 |
| %107 = OpFunctionCall %v3float %tint_ApplySrcTransferFunction %84 %104 |
| %109 = OpMatrixTimesVector %v3float %106 %107 |
| %94 = OpFunctionCall %v3float %tint_ApplyGammaTransferFunction %109 %105 |
| OpBranch %90 |
| %92 = OpLabel |
| OpBranch %90 |
| %90 = OpLabel |
| %93 = OpPhi %v3float %94 %91 %84 %92 |
| %95 = OpCompositeConstruct %v4float %93 %87 |
| OpReturnValue %95 |
| OpFunctionEnd |
| %tint_ApplySrcTransferFunction = OpFunction %v3float None %113 |
| %v = OpFunctionParameter %v3float |
| %params_0 = OpFunctionParameter %tint_TransferFunctionParams |
| %114 = OpLabel |
| %return_value = OpVariable %_ptr_Function_v3float Function %117 |
| %mode = OpCompositeExtract %uint %params_0 0 |
| %119 = OpIEqual %bool %mode %uint_0 |
| OpSelectionMerge %120 None |
| OpBranchConditional %119 %121 %122 |
| %121 = OpLabel |
| %124 = OpFunctionCall %v3float %tint_ApplyGammaTransferFunction %v %params_0 |
| OpStore %return_value %124 None |
| OpBranch %120 |
| %122 = OpLabel |
| %125 = OpIEqual %bool %mode %uint_1 |
| OpSelectionMerge %126 None |
| OpBranchConditional %125 %127 %128 |
| %127 = OpLabel |
| %129 = OpFunctionCall %v3float %tint_ApplyHLGTransferFunction %v %params_0 |
| OpStore %return_value %129 None |
| OpBranch %126 |
| %128 = OpLabel |
| %131 = OpFunctionCall %v3float %tint_ApplyPQTransferFunction %v %params_0 |
| OpStore %return_value %131 None |
| OpBranch %126 |
| %126 = OpLabel |
| OpBranch %120 |
| %120 = OpLabel |
| %123 = OpLoad %v3float %return_value None |
| OpReturnValue %123 |
| OpFunctionEnd |
| %tint_ApplyGammaTransferFunction = OpFunction %v3float None %113 |
| %v_0 = OpFunctionParameter %v3float |
| %params_1 = OpFunctionParameter %tint_TransferFunctionParams |
| %135 = OpLabel |
| %A = OpCompositeExtract %float %params_1 1 |
| %B = OpCompositeExtract %float %params_1 2 |
| %C = OpCompositeExtract %float %params_1 3 |
| %D = OpCompositeExtract %float %params_1 4 |
| %E = OpCompositeExtract %float %params_1 5 |
| %F = OpCompositeExtract %float %params_1 6 |
| %G = OpCompositeExtract %float %params_1 7 |
| %143 = OpCompositeConstruct %v3float %G %G %G |
| %144 = OpCompositeConstruct %v3float %D %D %D |
| %145 = OpExtInst %v3float %44 FAbs %v_0 |
| %146 = OpExtInst %v3float %44 FSign %v_0 |
| %147 = OpFOrdLessThan %v3bool %145 %144 |
| %149 = OpVectorTimesScalar %v3float %145 %C |
| %150 = OpCompositeConstruct %v3float %F %F %F |
| %151 = OpFAdd %v3float %149 %150 |
| %152 = OpFMul %v3float %146 %151 |
| %153 = OpVectorTimesScalar %v3float %145 %A |
| %154 = OpCompositeConstruct %v3float %B %B %B |
| %155 = OpFAdd %v3float %153 %154 |
| %156 = OpExtInst %v3float %44 Pow %155 %143 |
| %157 = OpCompositeConstruct %v3float %E %E %E |
| %158 = OpFAdd %v3float %156 %157 |
| %159 = OpFMul %v3float %146 %158 |
| %160 = OpSelect %v3float %147 %152 %159 |
| OpReturnValue %160 |
| OpFunctionEnd |
| %tint_ApplyHLGSingleChannel = OpFunction %float None %164 |
| %v_1 = OpFunctionParameter %float |
| %params_2 = OpFunctionParameter %tint_TransferFunctionParams |
| %165 = OpLabel |
| %return_value_0 = OpVariable %_ptr_Function_float Function %168 |
| %A_0 = OpCompositeExtract %float %params_2 1 |
| %B_0 = OpCompositeExtract %float %params_2 2 |
| %C_0 = OpCompositeExtract %float %params_2 3 |
| %cutoff = OpCompositeExtract %float %params_2 4 |
| %lower_scale = OpCompositeExtract %float %params_2 5 |
| %upper_scale = OpCompositeExtract %float %params_2 6 |
| %175 = OpFOrdLessThanEqual %bool %v_1 %cutoff |
| OpSelectionMerge %176 None |
| OpBranchConditional %175 %177 %178 |
| %177 = OpLabel |
| %180 = OpFMul %float %v_1 %v_1 |
| %181 = OpFDiv %float %180 %lower_scale |
| OpStore %return_value_0 %181 None |
| OpBranch %176 |
| %178 = OpLabel |
| %182 = OpFSub %float %v_1 %C_0 |
| %183 = OpFDiv %float %182 %A_0 |
| %184 = OpExtInst %float %44 Exp %183 |
| %185 = OpFAdd %float %B_0 %184 |
| %186 = OpFDiv %float %185 %upper_scale |
| OpStore %return_value_0 %186 None |
| OpBranch %176 |
| %176 = OpLabel |
| %179 = OpLoad %float %return_value_0 None |
| OpReturnValue %179 |
| OpFunctionEnd |
| %tint_ApplyHLGTransferFunction = OpFunction %v3float None %113 |
| %v_2 = OpFunctionParameter %v3float |
| %params_3 = OpFunctionParameter %tint_TransferFunctionParams |
| %189 = OpLabel |
| %190 = OpCompositeExtract %float %v_2 0 |
| %191 = OpFunctionCall %float %tint_ApplyHLGSingleChannel %190 %params_3 |
| %192 = OpCompositeExtract %float %v_2 1 |
| %193 = OpFunctionCall %float %tint_ApplyHLGSingleChannel %192 %params_3 |
| %194 = OpCompositeExtract %float %v_2 2 |
| %195 = OpFunctionCall %float %tint_ApplyHLGSingleChannel %194 %params_3 |
| %196 = OpCompositeConstruct %v3float %191 %193 %195 |
| OpReturnValue %196 |
| OpFunctionEnd |
| %tint_ApplyPQTransferFunction = OpFunction %v3float None %113 |
| %v_3 = OpFunctionParameter %v3float |
| %params_4 = OpFunctionParameter %tint_TransferFunctionParams |
| %199 = OpLabel |
| %m1 = OpCompositeExtract %float %params_4 1 |
| %m2 = OpCompositeExtract %float %params_4 2 |
| %c1 = OpCompositeExtract %float %params_4 3 |
| %c2 = OpCompositeExtract %float %params_4 4 |
| %c3 = OpCompositeExtract %float %params_4 5 |
| %205 = OpCompositeConstruct %v3float %c1 %c1 %c1 |
| %206 = OpCompositeConstruct %v3float %c2 %c2 %c2 |
| %207 = OpCompositeConstruct %v3float %c3 %c3 %c3 |
| %208 = OpCompositeConstruct %v3float %m1 %m1 %m1 |
| %209 = OpCompositeConstruct %v3float %m2 %m2 %m2 |
| %210 = OpExtInst %v3float %44 NClamp %v_3 %117 %211 |
| %212 = OpFDiv %v3float %211 %209 |
| %213 = OpExtInst %v3float %44 Pow %210 %212 |
| %214 = OpFSub %v3float %213 %205 |
| %215 = OpExtInst %v3float %44 NMax %214 %117 |
| %216 = OpFMul %v3float %207 %213 |
| %217 = OpFSub %v3float %206 %216 |
| %218 = OpFDiv %v3float %215 %217 |
| %219 = OpFDiv %v3float %211 %208 |
| %220 = OpExtInst %v3float %44 Pow %218 %219 |
| OpReturnValue %220 |
| OpFunctionEnd |
| %35 = OpFunction %tint_ExternalTextureParams None %222 |
| %start_byte_offset = OpFunctionParameter %uint |
| %223 = OpLabel |
| %224 = OpUDiv %uint %start_byte_offset %uint_16 |
| %226 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %224 |
| %228 = OpBitwiseAnd %uint %start_byte_offset %uint_15 |
| %230 = OpShiftRightLogical %uint %228 %uint_2 |
| %232 = OpLoad %v4uint %226 None |
| %233 = OpVectorExtractDynamic %uint %232 %230 |
| %234 = OpIAdd %uint %uint_4 %start_byte_offset |
| %236 = OpUDiv %uint %234 %uint_16 |
| %237 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %236 |
| %238 = OpBitwiseAnd %uint %234 %uint_15 |
| %239 = OpShiftRightLogical %uint %238 %uint_2 |
| %240 = OpLoad %v4uint %237 None |
| %241 = OpVectorExtractDynamic %uint %240 %239 |
| %242 = OpIAdd %uint %uint_16 %start_byte_offset |
| %243 = OpFunctionCall %mat3v4float %244 %242 |
| %245 = OpIAdd %uint %uint_64 %start_byte_offset |
| %247 = OpFunctionCall %tint_TransferFunctionParams %248 %245 |
| %249 = OpIAdd %uint %uint_96 %start_byte_offset |
| %251 = OpFunctionCall %tint_TransferFunctionParams %248 %249 |
| %252 = OpIAdd %uint %uint_128 %start_byte_offset |
| %254 = OpFunctionCall %mat3v3float %255 %252 |
| %256 = OpIAdd %uint %uint_176 %start_byte_offset |
| %258 = OpFunctionCall %mat3v2float %259 %256 |
| %260 = OpIAdd %uint %uint_200 %start_byte_offset |
| %262 = OpFunctionCall %mat3v2float %259 %260 |
| %263 = OpIAdd %uint %uint_224 %start_byte_offset |
| %265 = OpUDiv %uint %263 %uint_16 |
| %266 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %265 |
| %267 = OpLoad %v4uint %266 None |
| %268 = OpBitwiseAnd %uint %263 %uint_15 |
| %269 = OpShiftRightLogical %uint %268 %uint_2 |
| %270 = OpVectorShuffle %v2uint %267 %267 2 3 |
| %271 = OpVectorShuffle %v2uint %267 %267 0 1 |
| %272 = OpIEqual %bool %269 %uint_2 |
| %274 = OpCompositeConstruct %v2bool %272 %272 |
| %275 = OpSelect %v2uint %274 %270 %271 |
| %276 = OpBitcast %v2float %275 |
| %277 = OpIAdd %uint %uint_232 %start_byte_offset |
| %279 = OpUDiv %uint %277 %uint_16 |
| %280 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %279 |
| %281 = OpLoad %v4uint %280 None |
| %282 = OpBitwiseAnd %uint %277 %uint_15 |
| %283 = OpShiftRightLogical %uint %282 %uint_2 |
| %284 = OpVectorShuffle %v2uint %281 %281 2 3 |
| %285 = OpVectorShuffle %v2uint %281 %281 0 1 |
| %286 = OpIEqual %bool %283 %uint_2 |
| %287 = OpCompositeConstruct %v2bool %286 %286 |
| %288 = OpSelect %v2uint %287 %284 %285 |
| %289 = OpBitcast %v2float %288 |
| %290 = OpIAdd %uint %uint_240 %start_byte_offset |
| %292 = OpUDiv %uint %290 %uint_16 |
| %293 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %292 |
| %294 = OpLoad %v4uint %293 None |
| %295 = OpBitwiseAnd %uint %290 %uint_15 |
| %296 = OpShiftRightLogical %uint %295 %uint_2 |
| %297 = OpVectorShuffle %v2uint %294 %294 2 3 |
| %298 = OpVectorShuffle %v2uint %294 %294 0 1 |
| %299 = OpIEqual %bool %296 %uint_2 |
| %300 = OpCompositeConstruct %v2bool %299 %299 |
| %301 = OpSelect %v2uint %300 %297 %298 |
| %302 = OpBitcast %v2float %301 |
| %303 = OpIAdd %uint %uint_248 %start_byte_offset |
| %305 = OpUDiv %uint %303 %uint_16 |
| %306 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %305 |
| %307 = OpLoad %v4uint %306 None |
| %308 = OpBitwiseAnd %uint %303 %uint_15 |
| %309 = OpShiftRightLogical %uint %308 %uint_2 |
| %310 = OpVectorShuffle %v2uint %307 %307 2 3 |
| %311 = OpVectorShuffle %v2uint %307 %307 0 1 |
| %312 = OpIEqual %bool %309 %uint_2 |
| %313 = OpCompositeConstruct %v2bool %312 %312 |
| %314 = OpSelect %v2uint %313 %310 %311 |
| %315 = OpBitcast %v2float %314 |
| %316 = OpIAdd %uint %uint_256 %start_byte_offset |
| %318 = OpUDiv %uint %316 %uint_16 |
| %319 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %318 |
| %320 = OpLoad %v4uint %319 None |
| %321 = OpBitwiseAnd %uint %316 %uint_15 |
| %322 = OpShiftRightLogical %uint %321 %uint_2 |
| %323 = OpVectorShuffle %v2uint %320 %320 2 3 |
| %324 = OpVectorShuffle %v2uint %320 %320 0 1 |
| %325 = OpIEqual %bool %322 %uint_2 |
| %326 = OpCompositeConstruct %v2bool %325 %325 |
| %327 = OpSelect %v2uint %326 %323 %324 |
| %328 = OpIAdd %uint %uint_264 %start_byte_offset |
| %330 = OpUDiv %uint %328 %uint_16 |
| %331 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %330 |
| %332 = OpLoad %v4uint %331 None |
| %333 = OpBitwiseAnd %uint %328 %uint_15 |
| %334 = OpShiftRightLogical %uint %333 %uint_2 |
| %335 = OpVectorShuffle %v2uint %332 %332 2 3 |
| %336 = OpVectorShuffle %v2uint %332 %332 0 1 |
| %337 = OpIEqual %bool %334 %uint_2 |
| %338 = OpCompositeConstruct %v2bool %337 %337 |
| %339 = OpSelect %v2uint %338 %335 %336 |
| %340 = OpBitcast %v2float %339 |
| %341 = OpCompositeConstruct %tint_ExternalTextureParams %233 %241 %243 %247 %251 %254 %258 %262 %276 %289 %302 %315 %327 %340 |
| OpReturnValue %341 |
| OpFunctionEnd |
| %244 = OpFunction %mat3v4float None %343 |
| %start_byte_offset_0 = OpFunctionParameter %uint |
| %344 = OpLabel |
| %345 = OpUDiv %uint %start_byte_offset_0 %uint_16 |
| %346 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %345 |
| %347 = OpLoad %v4uint %346 None |
| %348 = OpBitcast %v4float %347 |
| %349 = OpIAdd %uint %uint_16 %start_byte_offset_0 |
| %350 = OpUDiv %uint %349 %uint_16 |
| %351 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %350 |
| %352 = OpLoad %v4uint %351 None |
| %353 = OpBitcast %v4float %352 |
| %354 = OpIAdd %uint %uint_32 %start_byte_offset_0 |
| %356 = OpUDiv %uint %354 %uint_16 |
| %357 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %356 |
| %358 = OpLoad %v4uint %357 None |
| %359 = OpBitcast %v4float %358 |
| %360 = OpCompositeConstruct %mat3v4float %348 %353 %359 |
| OpReturnValue %360 |
| OpFunctionEnd |
| %248 = OpFunction %tint_TransferFunctionParams None %362 |
| %start_byte_offset_1 = OpFunctionParameter %uint |
| %363 = OpLabel |
| %364 = OpUDiv %uint %start_byte_offset_1 %uint_16 |
| %365 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %364 |
| %366 = OpBitwiseAnd %uint %start_byte_offset_1 %uint_15 |
| %367 = OpShiftRightLogical %uint %366 %uint_2 |
| %368 = OpLoad %v4uint %365 None |
| %369 = OpVectorExtractDynamic %uint %368 %367 |
| %370 = OpIAdd %uint %uint_4 %start_byte_offset_1 |
| %371 = OpUDiv %uint %370 %uint_16 |
| %372 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %371 |
| %373 = OpBitwiseAnd %uint %370 %uint_15 |
| %374 = OpShiftRightLogical %uint %373 %uint_2 |
| %375 = OpLoad %v4uint %372 None |
| %376 = OpVectorExtractDynamic %uint %375 %374 |
| %377 = OpBitcast %float %376 |
| %378 = OpIAdd %uint %uint_8 %start_byte_offset_1 |
| %380 = OpUDiv %uint %378 %uint_16 |
| %381 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %380 |
| %382 = OpBitwiseAnd %uint %378 %uint_15 |
| %383 = OpShiftRightLogical %uint %382 %uint_2 |
| %384 = OpLoad %v4uint %381 None |
| %385 = OpVectorExtractDynamic %uint %384 %383 |
| %386 = OpBitcast %float %385 |
| %387 = OpIAdd %uint %uint_12 %start_byte_offset_1 |
| %389 = OpUDiv %uint %387 %uint_16 |
| %390 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %389 |
| %391 = OpBitwiseAnd %uint %387 %uint_15 |
| %392 = OpShiftRightLogical %uint %391 %uint_2 |
| %393 = OpLoad %v4uint %390 None |
| %394 = OpVectorExtractDynamic %uint %393 %392 |
| %395 = OpBitcast %float %394 |
| %396 = OpIAdd %uint %uint_16 %start_byte_offset_1 |
| %397 = OpUDiv %uint %396 %uint_16 |
| %398 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %397 |
| %399 = OpBitwiseAnd %uint %396 %uint_15 |
| %400 = OpShiftRightLogical %uint %399 %uint_2 |
| %401 = OpLoad %v4uint %398 None |
| %402 = OpVectorExtractDynamic %uint %401 %400 |
| %403 = OpBitcast %float %402 |
| %404 = OpIAdd %uint %uint_20 %start_byte_offset_1 |
| %406 = OpUDiv %uint %404 %uint_16 |
| %407 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %406 |
| %408 = OpBitwiseAnd %uint %404 %uint_15 |
| %409 = OpShiftRightLogical %uint %408 %uint_2 |
| %410 = OpLoad %v4uint %407 None |
| %411 = OpVectorExtractDynamic %uint %410 %409 |
| %412 = OpBitcast %float %411 |
| %413 = OpIAdd %uint %uint_24 %start_byte_offset_1 |
| %415 = OpUDiv %uint %413 %uint_16 |
| %416 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %415 |
| %417 = OpBitwiseAnd %uint %413 %uint_15 |
| %418 = OpShiftRightLogical %uint %417 %uint_2 |
| %419 = OpLoad %v4uint %416 None |
| %420 = OpVectorExtractDynamic %uint %419 %418 |
| %421 = OpBitcast %float %420 |
| %422 = OpIAdd %uint %uint_28 %start_byte_offset_1 |
| %424 = OpUDiv %uint %422 %uint_16 |
| %425 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %424 |
| %426 = OpBitwiseAnd %uint %422 %uint_15 |
| %427 = OpShiftRightLogical %uint %426 %uint_2 |
| %428 = OpLoad %v4uint %425 None |
| %429 = OpVectorExtractDynamic %uint %428 %427 |
| %430 = OpBitcast %float %429 |
| %431 = OpCompositeConstruct %tint_TransferFunctionParams %369 %377 %386 %395 %403 %412 %421 %430 |
| OpReturnValue %431 |
| OpFunctionEnd |
| %255 = OpFunction %mat3v3float None %433 |
| %start_byte_offset_2 = OpFunctionParameter %uint |
| %434 = OpLabel |
| %435 = OpUDiv %uint %start_byte_offset_2 %uint_16 |
| %436 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %435 |
| %437 = OpLoad %v4uint %436 None |
| %438 = OpVectorShuffle %v3uint %437 %437 0 1 2 |
| %440 = OpBitcast %v3float %438 |
| %441 = OpIAdd %uint %uint_16 %start_byte_offset_2 |
| %442 = OpUDiv %uint %441 %uint_16 |
| %443 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %442 |
| %444 = OpLoad %v4uint %443 None |
| %445 = OpVectorShuffle %v3uint %444 %444 0 1 2 |
| %446 = OpBitcast %v3float %445 |
| %447 = OpIAdd %uint %uint_32 %start_byte_offset_2 |
| %448 = OpUDiv %uint %447 %uint_16 |
| %449 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %448 |
| %450 = OpLoad %v4uint %449 None |
| %451 = OpVectorShuffle %v3uint %450 %450 0 1 2 |
| %452 = OpBitcast %v3float %451 |
| %453 = OpCompositeConstruct %mat3v3float %440 %446 %452 |
| OpReturnValue %453 |
| OpFunctionEnd |
| %259 = OpFunction %mat3v2float None %455 |
| %start_byte_offset_3 = OpFunctionParameter %uint |
| %456 = OpLabel |
| %457 = OpUDiv %uint %start_byte_offset_3 %uint_16 |
| %458 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %457 |
| %459 = OpLoad %v4uint %458 None |
| %460 = OpBitwiseAnd %uint %start_byte_offset_3 %uint_15 |
| %461 = OpShiftRightLogical %uint %460 %uint_2 |
| %462 = OpVectorShuffle %v2uint %459 %459 2 3 |
| %463 = OpVectorShuffle %v2uint %459 %459 0 1 |
| %464 = OpIEqual %bool %461 %uint_2 |
| %465 = OpCompositeConstruct %v2bool %464 %464 |
| %466 = OpSelect %v2uint %465 %462 %463 |
| %467 = OpBitcast %v2float %466 |
| %468 = OpIAdd %uint %uint_8 %start_byte_offset_3 |
| %469 = OpUDiv %uint %468 %uint_16 |
| %470 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %469 |
| %471 = OpLoad %v4uint %470 None |
| %472 = OpBitwiseAnd %uint %468 %uint_15 |
| %473 = OpShiftRightLogical %uint %472 %uint_2 |
| %474 = OpVectorShuffle %v2uint %471 %471 2 3 |
| %475 = OpVectorShuffle %v2uint %471 %471 0 1 |
| %476 = OpIEqual %bool %473 %uint_2 |
| %477 = OpCompositeConstruct %v2bool %476 %476 |
| %478 = OpSelect %v2uint %477 %474 %475 |
| %479 = OpBitcast %v2float %478 |
| %480 = OpIAdd %uint %uint_16 %start_byte_offset_3 |
| %481 = OpUDiv %uint %480 %uint_16 |
| %482 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %481 |
| %483 = OpLoad %v4uint %482 None |
| %484 = OpBitwiseAnd %uint %480 %uint_15 |
| %485 = OpShiftRightLogical %uint %484 %uint_2 |
| %486 = OpVectorShuffle %v2uint %483 %483 2 3 |
| %487 = OpVectorShuffle %v2uint %483 %483 0 1 |
| %488 = OpIEqual %bool %485 %uint_2 |
| %489 = OpCompositeConstruct %v2bool %488 %488 |
| %490 = OpSelect %v2uint %489 %486 %487 |
| %491 = OpBitcast %v2float %490 |
| %492 = OpCompositeConstruct %mat3v2float %467 %479 %491 |
| OpReturnValue %492 |
| OpFunctionEnd |
| %vertex_main = OpFunction %void None %49 |
| %494 = OpLabel |
| %495 = OpFunctionCall %v4float %vertex_main_inner |
| OpStore %vertex_main_position_Output %495 None |
| OpStore %vertex_main___point_size_Output %float_1 None |
| OpReturn |
| OpFunctionEnd |
| ; |
| ; fragment_main |
| ; |
| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 1 |
| ; Bound: 487 |
| ; Schema: 0 |
| OpCapability Shader |
| %40 = OpExtInstImport "GLSL.std.450" |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint Fragment %fragment_main "fragment_main" |
| OpExecutionMode %fragment_main OriginUpperLeft |
| OpMemberName %arg_0_params_block_tint_explicit_layout 0 "inner" |
| OpName %arg_0_params_block_tint_explicit_layout "arg_0_params_block_tint_explicit_layout" |
| OpName %arg_0_plane0 "arg_0_plane0" |
| OpName %arg_0_plane1 "arg_0_plane1" |
| OpName %textureLoad2d "textureLoad2d" |
| OpName %coords "coords" |
| OpMemberName %tint_ExternalTextureParams 0 "numPlanes" |
| OpMemberName %tint_ExternalTextureParams 1 "doYuvToRgbConversionOnly" |
| OpMemberName %tint_ExternalTextureParams 2 "yuvToRgbConversionMatrix" |
| OpMemberName %tint_TransferFunctionParams 0 "mode" |
| OpMemberName %tint_TransferFunctionParams 1 "A" |
| OpMemberName %tint_TransferFunctionParams 2 "B" |
| OpMemberName %tint_TransferFunctionParams 3 "C" |
| OpMemberName %tint_TransferFunctionParams 4 "D" |
| OpMemberName %tint_TransferFunctionParams 5 "E" |
| OpMemberName %tint_TransferFunctionParams 6 "F" |
| OpMemberName %tint_TransferFunctionParams 7 "G" |
| OpName %tint_TransferFunctionParams "tint_TransferFunctionParams" |
| OpMemberName %tint_ExternalTextureParams 3 "srcTransferFunction" |
| OpMemberName %tint_ExternalTextureParams 4 "dstTransferFunction" |
| OpMemberName %tint_ExternalTextureParams 5 "gamutConversionMatrix" |
| OpMemberName %tint_ExternalTextureParams 6 "sampleTransform" |
| OpMemberName %tint_ExternalTextureParams 7 "loadTransform" |
| OpMemberName %tint_ExternalTextureParams 8 "samplePlane0RectMin" |
| OpMemberName %tint_ExternalTextureParams 9 "samplePlane0RectMax" |
| OpMemberName %tint_ExternalTextureParams 10 "samplePlane1RectMin" |
| OpMemberName %tint_ExternalTextureParams 11 "samplePlane1RectMax" |
| OpMemberName %tint_ExternalTextureParams 12 "apparentSize" |
| OpMemberName %tint_ExternalTextureParams 13 "plane1CoordFactor" |
| OpName %tint_ExternalTextureParams "tint_ExternalTextureParams" |
| OpName %doTextureLoad "doTextureLoad" |
| OpName %res "res" |
| OpName %fragment_main "fragment_main" |
| OpName %tint_TextureLoadMultiplanarExternal "tint_TextureLoadMultiplanarExternal" |
| OpName %plane_0 "plane_0" |
| OpName %plane_1 "plane_1" |
| OpName %params "params" |
| OpName %coords_0 "coords" |
| OpName %tint_ApplySrcTransferFunction "tint_ApplySrcTransferFunction" |
| OpName %v "v" |
| OpName %params_0 "params" |
| OpName %return_value "return_value" |
| OpName %mode "mode" |
| OpName %tint_ApplyGammaTransferFunction "tint_ApplyGammaTransferFunction" |
| OpName %v_0 "v" |
| OpName %params_1 "params" |
| OpName %A "A" |
| OpName %B "B" |
| OpName %C "C" |
| OpName %D "D" |
| OpName %E "E" |
| OpName %F "F" |
| OpName %G "G" |
| OpName %tint_ApplyHLGSingleChannel "tint_ApplyHLGSingleChannel" |
| OpName %v_1 "v" |
| OpName %params_2 "params" |
| OpName %return_value_0 "return_value" |
| OpName %A_0 "A" |
| OpName %B_0 "B" |
| OpName %C_0 "C" |
| OpName %cutoff "cutoff" |
| OpName %lower_scale "lower_scale" |
| OpName %upper_scale "upper_scale" |
| OpName %tint_ApplyHLGTransferFunction "tint_ApplyHLGTransferFunction" |
| OpName %v_2 "v" |
| OpName %params_3 "params" |
| OpName %tint_ApplyPQTransferFunction "tint_ApplyPQTransferFunction" |
| OpName %v_3 "v" |
| OpName %params_4 "params" |
| OpName %m1 "m1" |
| OpName %m2 "m2" |
| OpName %c1 "c1" |
| OpName %c2 "c2" |
| OpName %c3 "c3" |
| OpName %start_byte_offset "start_byte_offset" |
| OpName %start_byte_offset_0 "start_byte_offset" |
| OpName %start_byte_offset_1 "start_byte_offset" |
| OpName %start_byte_offset_2 "start_byte_offset" |
| OpName %start_byte_offset_3 "start_byte_offset" |
| OpDecorate %_arr_v4uint_uint_17 ArrayStride 16 |
| OpMemberDecorate %arg_0_params_block_tint_explicit_layout 0 Offset 0 |
| OpDecorate %arg_0_params_block_tint_explicit_layout Block |
| OpDecorate %1 DescriptorSet 1 |
| OpDecorate %1 Binding 2 |
| OpDecorate %1 NonWritable |
| OpDecorate %arg_0_plane0 DescriptorSet 1 |
| OpDecorate %arg_0_plane0 Binding 0 |
| OpDecorate %arg_0_plane1 DescriptorSet 1 |
| OpDecorate %arg_0_plane1 Binding 1 |
| %uint = OpTypeInt 32 0 |
| %v4uint = OpTypeVector %uint 4 |
| %uint_17 = OpConstant %uint 17 |
| %_arr_v4uint_uint_17 = OpTypeArray %v4uint %uint_17 |
| %arg_0_params_block_tint_explicit_layout = OpTypeStruct %_arr_v4uint_uint_17 |
| %_ptr_Uniform_arg_0_params_block_tint_explicit_layout = OpTypePointer Uniform %arg_0_params_block_tint_explicit_layout |
| %1 = OpVariable %_ptr_Uniform_arg_0_params_block_tint_explicit_layout Uniform |
| %float = OpTypeFloat 32 |
| %10 = OpTypeImage %float 2D 0 0 0 1 Unknown |
| %_ptr_UniformConstant_10 = OpTypePointer UniformConstant %10 |
| %arg_0_plane0 = OpVariable %_ptr_UniformConstant_10 UniformConstant |
| %arg_0_plane1 = OpVariable %_ptr_UniformConstant_10 UniformConstant |
| %v4float = OpTypeVector %float 4 |
| %int = OpTypeInt 32 1 |
| %v2int = OpTypeVector %int 2 |
| %18 = OpTypeFunction %v4float %v2int |
| %mat3v4float = OpTypeMatrix %v4float 3 |
| %tint_TransferFunctionParams = OpTypeStruct %uint %float %float %float %float %float %float %float |
| %v3float = OpTypeVector %float 3 |
| %mat3v3float = OpTypeMatrix %v3float 3 |
| %v2float = OpTypeVector %float 2 |
| %mat3v2float = OpTypeMatrix %v2float 3 |
| %v2uint = OpTypeVector %uint 2 |
| %tint_ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %tint_TransferFunctionParams %tint_TransferFunctionParams %mat3v3float %mat3v2float %mat3v2float %v2float %v2float %v2float %v2float %v2uint %v2float |
| %uint_0 = OpConstant %uint 0 |
| %uint_1 = OpConstant %uint 1 |
| %35 = OpConstantComposite %v2uint %uint_1 %uint_1 |
| %void = OpTypeVoid |
| %45 = OpTypeFunction %void |
| %48 = OpConstantNull %v2int |
| %_ptr_Function_v4float = OpTypePointer Function %v4float |
| %58 = OpTypeFunction %v4float %10 %10 %tint_ExternalTextureParams %v2uint |
| %float_1 = OpConstant %float 1 |
| %bool = OpTypeBool |
| %107 = OpTypeFunction %v3float %v3float %tint_TransferFunctionParams |
| %_ptr_Function_v3float = OpTypePointer Function %v3float |
| %111 = OpConstantNull %v3float |
| %v3bool = OpTypeVector %bool 3 |
| %158 = OpTypeFunction %float %float %tint_TransferFunctionParams |
| %_ptr_Function_float = OpTypePointer Function %float |
| %162 = OpConstantNull %float |
| %205 = OpConstantComposite %v3float %float_1 %float_1 %float_1 |
| %216 = OpTypeFunction %tint_ExternalTextureParams %uint |
| %uint_16 = OpConstant %uint 16 |
| %_ptr_Uniform_v4uint = OpTypePointer Uniform %v4uint |
| %uint_15 = OpConstant %uint 15 |
| %uint_2 = OpConstant %uint 2 |
| %uint_4 = OpConstant %uint 4 |
| %uint_64 = OpConstant %uint 64 |
| %uint_96 = OpConstant %uint 96 |
| %uint_128 = OpConstant %uint 128 |
| %uint_176 = OpConstant %uint 176 |
| %uint_200 = OpConstant %uint 200 |
| %uint_224 = OpConstant %uint 224 |
| %v2bool = OpTypeVector %bool 2 |
| %uint_232 = OpConstant %uint 232 |
| %uint_240 = OpConstant %uint 240 |
| %uint_248 = OpConstant %uint 248 |
| %uint_256 = OpConstant %uint 256 |
| %uint_264 = OpConstant %uint 264 |
| %337 = OpTypeFunction %mat3v4float %uint |
| %uint_32 = OpConstant %uint 32 |
| %356 = OpTypeFunction %tint_TransferFunctionParams %uint |
| %uint_8 = OpConstant %uint 8 |
| %uint_12 = OpConstant %uint 12 |
| %uint_20 = OpConstant %uint 20 |
| %uint_24 = OpConstant %uint 24 |
| %uint_28 = OpConstant %uint 28 |
| %427 = OpTypeFunction %mat3v3float %uint |
| %v3uint = OpTypeVector %uint 3 |
| %449 = OpTypeFunction %mat3v2float %uint |
| %textureLoad2d = OpFunction %v4float None %18 |
| %coords = OpFunctionParameter %v2int |
| %19 = OpLabel |
| %20 = OpLoad %10 %arg_0_plane0 None |
| %21 = OpLoad %10 %arg_0_plane1 None |
| %22 = OpFunctionCall %tint_ExternalTextureParams %31 %uint_0 |
| %33 = OpCompositeExtract %v2uint %22 12 |
| %34 = OpIAdd %v2uint %33 %35 |
| %37 = OpISub %v2uint %34 %35 |
| %38 = OpBitcast %v2uint %coords |
| %39 = OpExtInst %v2uint %40 UMin %38 %37 |
| %41 = OpFunctionCall %v4float %tint_TextureLoadMultiplanarExternal %20 %21 %22 %39 |
| OpReturnValue %41 |
| OpFunctionEnd |
| %doTextureLoad = OpFunction %void None %45 |
| %46 = OpLabel |
| %res = OpVariable %_ptr_Function_v4float Function |
| %47 = OpFunctionCall %v4float %textureLoad2d %48 |
| OpStore %res %47 |
| OpReturn |
| OpFunctionEnd |
| %fragment_main = OpFunction %void None %45 |
| %52 = OpLabel |
| %53 = OpFunctionCall %void %doTextureLoad |
| OpReturn |
| OpFunctionEnd |
| %tint_TextureLoadMultiplanarExternal = OpFunction %v4float None %58 |
| %plane_0 = OpFunctionParameter %10 |
| %plane_1 = OpFunctionParameter %10 |
| %params = OpFunctionParameter %tint_ExternalTextureParams |
| %coords_0 = OpFunctionParameter %v2uint |
| %59 = OpLabel |
| %60 = OpCompositeExtract %uint %params 1 |
| %61 = OpCompositeExtract %mat3v4float %params 2 |
| %62 = OpCompositeExtract %mat3v2float %params 7 |
| %63 = OpCompositeExtract %v2uint %params 12 |
| %64 = OpCompositeExtract %v2float %params 13 |
| %65 = OpExtInst %v2uint %40 UMin %coords_0 %63 |
| %66 = OpConvertUToF %v2float %65 |
| %67 = OpCompositeConstruct %v3float %66 %float_1 |
| %69 = OpMatrixTimesVector %v2float %62 %67 |
| %70 = OpExtInst %v2float %40 RoundEven %69 |
| %71 = OpConvertFToU %v2uint %70 |
| %72 = OpCompositeExtract %uint %params 0 |
| %73 = OpIEqual %bool %72 %uint_1 |
| OpSelectionMerge %75 None |
| OpBranchConditional %73 %76 %77 |
| %76 = OpLabel |
| %90 = OpImageFetch %v4float %plane_0 %71 Lod %uint_0 |
| %79 = OpVectorShuffle %v3float %90 %90 0 1 2 |
| %82 = OpCompositeExtract %float %90 3 |
| OpBranch %75 |
| %77 = OpLabel |
| %91 = OpImageFetch %v4float %plane_0 %71 Lod %uint_0 |
| %92 = OpCompositeExtract %float %91 0 |
| %93 = OpFMul %v2float %70 %64 |
| %94 = OpConvertFToU %v2uint %93 |
| %95 = OpImageFetch %v4float %plane_1 %94 Lod %uint_0 |
| %96 = OpVectorShuffle %v2float %95 %95 0 1 |
| %97 = OpCompositeConstruct %v4float %92 %96 %float_1 |
| %80 = OpVectorTimesMatrix %v3float %97 %61 |
| OpBranch %75 |
| %75 = OpLabel |
| %78 = OpPhi %v3float %79 %76 %80 %77 |
| %81 = OpPhi %float %82 %76 %float_1 %77 |
| %83 = OpIEqual %bool %60 %uint_0 |
| OpSelectionMerge %84 None |
| OpBranchConditional %83 %85 %86 |
| %85 = OpLabel |
| %98 = OpCompositeExtract %tint_TransferFunctionParams %params 3 |
| %99 = OpCompositeExtract %tint_TransferFunctionParams %params 4 |
| %100 = OpCompositeExtract %mat3v3float %params 5 |
| %101 = OpFunctionCall %v3float %tint_ApplySrcTransferFunction %78 %98 |
| %103 = OpMatrixTimesVector %v3float %100 %101 |
| %88 = OpFunctionCall %v3float %tint_ApplyGammaTransferFunction %103 %99 |
| OpBranch %84 |
| %86 = OpLabel |
| OpBranch %84 |
| %84 = OpLabel |
| %87 = OpPhi %v3float %88 %85 %78 %86 |
| %89 = OpCompositeConstruct %v4float %87 %81 |
| OpReturnValue %89 |
| OpFunctionEnd |
| %tint_ApplySrcTransferFunction = OpFunction %v3float None %107 |
| %v = OpFunctionParameter %v3float |
| %params_0 = OpFunctionParameter %tint_TransferFunctionParams |
| %108 = OpLabel |
| %return_value = OpVariable %_ptr_Function_v3float Function %111 |
| %mode = OpCompositeExtract %uint %params_0 0 |
| %113 = OpIEqual %bool %mode %uint_0 |
| OpSelectionMerge %114 None |
| OpBranchConditional %113 %115 %116 |
| %115 = OpLabel |
| %118 = OpFunctionCall %v3float %tint_ApplyGammaTransferFunction %v %params_0 |
| OpStore %return_value %118 None |
| OpBranch %114 |
| %116 = OpLabel |
| %119 = OpIEqual %bool %mode %uint_1 |
| OpSelectionMerge %120 None |
| OpBranchConditional %119 %121 %122 |
| %121 = OpLabel |
| %123 = OpFunctionCall %v3float %tint_ApplyHLGTransferFunction %v %params_0 |
| OpStore %return_value %123 None |
| OpBranch %120 |
| %122 = OpLabel |
| %125 = OpFunctionCall %v3float %tint_ApplyPQTransferFunction %v %params_0 |
| OpStore %return_value %125 None |
| OpBranch %120 |
| %120 = OpLabel |
| OpBranch %114 |
| %114 = OpLabel |
| %117 = OpLoad %v3float %return_value None |
| OpReturnValue %117 |
| OpFunctionEnd |
| %tint_ApplyGammaTransferFunction = OpFunction %v3float None %107 |
| %v_0 = OpFunctionParameter %v3float |
| %params_1 = OpFunctionParameter %tint_TransferFunctionParams |
| %129 = OpLabel |
| %A = OpCompositeExtract %float %params_1 1 |
| %B = OpCompositeExtract %float %params_1 2 |
| %C = OpCompositeExtract %float %params_1 3 |
| %D = OpCompositeExtract %float %params_1 4 |
| %E = OpCompositeExtract %float %params_1 5 |
| %F = OpCompositeExtract %float %params_1 6 |
| %G = OpCompositeExtract %float %params_1 7 |
| %137 = OpCompositeConstruct %v3float %G %G %G |
| %138 = OpCompositeConstruct %v3float %D %D %D |
| %139 = OpExtInst %v3float %40 FAbs %v_0 |
| %140 = OpExtInst %v3float %40 FSign %v_0 |
| %141 = OpFOrdLessThan %v3bool %139 %138 |
| %143 = OpVectorTimesScalar %v3float %139 %C |
| %144 = OpCompositeConstruct %v3float %F %F %F |
| %145 = OpFAdd %v3float %143 %144 |
| %146 = OpFMul %v3float %140 %145 |
| %147 = OpVectorTimesScalar %v3float %139 %A |
| %148 = OpCompositeConstruct %v3float %B %B %B |
| %149 = OpFAdd %v3float %147 %148 |
| %150 = OpExtInst %v3float %40 Pow %149 %137 |
| %151 = OpCompositeConstruct %v3float %E %E %E |
| %152 = OpFAdd %v3float %150 %151 |
| %153 = OpFMul %v3float %140 %152 |
| %154 = OpSelect %v3float %141 %146 %153 |
| OpReturnValue %154 |
| OpFunctionEnd |
| %tint_ApplyHLGSingleChannel = OpFunction %float None %158 |
| %v_1 = OpFunctionParameter %float |
| %params_2 = OpFunctionParameter %tint_TransferFunctionParams |
| %159 = OpLabel |
| %return_value_0 = OpVariable %_ptr_Function_float Function %162 |
| %A_0 = OpCompositeExtract %float %params_2 1 |
| %B_0 = OpCompositeExtract %float %params_2 2 |
| %C_0 = OpCompositeExtract %float %params_2 3 |
| %cutoff = OpCompositeExtract %float %params_2 4 |
| %lower_scale = OpCompositeExtract %float %params_2 5 |
| %upper_scale = OpCompositeExtract %float %params_2 6 |
| %169 = OpFOrdLessThanEqual %bool %v_1 %cutoff |
| OpSelectionMerge %170 None |
| OpBranchConditional %169 %171 %172 |
| %171 = OpLabel |
| %174 = OpFMul %float %v_1 %v_1 |
| %175 = OpFDiv %float %174 %lower_scale |
| OpStore %return_value_0 %175 None |
| OpBranch %170 |
| %172 = OpLabel |
| %176 = OpFSub %float %v_1 %C_0 |
| %177 = OpFDiv %float %176 %A_0 |
| %178 = OpExtInst %float %40 Exp %177 |
| %179 = OpFAdd %float %B_0 %178 |
| %180 = OpFDiv %float %179 %upper_scale |
| OpStore %return_value_0 %180 None |
| OpBranch %170 |
| %170 = OpLabel |
| %173 = OpLoad %float %return_value_0 None |
| OpReturnValue %173 |
| OpFunctionEnd |
| %tint_ApplyHLGTransferFunction = OpFunction %v3float None %107 |
| %v_2 = OpFunctionParameter %v3float |
| %params_3 = OpFunctionParameter %tint_TransferFunctionParams |
| %183 = OpLabel |
| %184 = OpCompositeExtract %float %v_2 0 |
| %185 = OpFunctionCall %float %tint_ApplyHLGSingleChannel %184 %params_3 |
| %186 = OpCompositeExtract %float %v_2 1 |
| %187 = OpFunctionCall %float %tint_ApplyHLGSingleChannel %186 %params_3 |
| %188 = OpCompositeExtract %float %v_2 2 |
| %189 = OpFunctionCall %float %tint_ApplyHLGSingleChannel %188 %params_3 |
| %190 = OpCompositeConstruct %v3float %185 %187 %189 |
| OpReturnValue %190 |
| OpFunctionEnd |
| %tint_ApplyPQTransferFunction = OpFunction %v3float None %107 |
| %v_3 = OpFunctionParameter %v3float |
| %params_4 = OpFunctionParameter %tint_TransferFunctionParams |
| %193 = OpLabel |
| %m1 = OpCompositeExtract %float %params_4 1 |
| %m2 = OpCompositeExtract %float %params_4 2 |
| %c1 = OpCompositeExtract %float %params_4 3 |
| %c2 = OpCompositeExtract %float %params_4 4 |
| %c3 = OpCompositeExtract %float %params_4 5 |
| %199 = OpCompositeConstruct %v3float %c1 %c1 %c1 |
| %200 = OpCompositeConstruct %v3float %c2 %c2 %c2 |
| %201 = OpCompositeConstruct %v3float %c3 %c3 %c3 |
| %202 = OpCompositeConstruct %v3float %m1 %m1 %m1 |
| %203 = OpCompositeConstruct %v3float %m2 %m2 %m2 |
| %204 = OpExtInst %v3float %40 NClamp %v_3 %111 %205 |
| %206 = OpFDiv %v3float %205 %203 |
| %207 = OpExtInst %v3float %40 Pow %204 %206 |
| %208 = OpFSub %v3float %207 %199 |
| %209 = OpExtInst %v3float %40 NMax %208 %111 |
| %210 = OpFMul %v3float %201 %207 |
| %211 = OpFSub %v3float %200 %210 |
| %212 = OpFDiv %v3float %209 %211 |
| %213 = OpFDiv %v3float %205 %202 |
| %214 = OpExtInst %v3float %40 Pow %212 %213 |
| OpReturnValue %214 |
| OpFunctionEnd |
| %31 = OpFunction %tint_ExternalTextureParams None %216 |
| %start_byte_offset = OpFunctionParameter %uint |
| %217 = OpLabel |
| %218 = OpUDiv %uint %start_byte_offset %uint_16 |
| %220 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %218 |
| %222 = OpBitwiseAnd %uint %start_byte_offset %uint_15 |
| %224 = OpShiftRightLogical %uint %222 %uint_2 |
| %226 = OpLoad %v4uint %220 None |
| %227 = OpVectorExtractDynamic %uint %226 %224 |
| %228 = OpIAdd %uint %uint_4 %start_byte_offset |
| %230 = OpUDiv %uint %228 %uint_16 |
| %231 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %230 |
| %232 = OpBitwiseAnd %uint %228 %uint_15 |
| %233 = OpShiftRightLogical %uint %232 %uint_2 |
| %234 = OpLoad %v4uint %231 None |
| %235 = OpVectorExtractDynamic %uint %234 %233 |
| %236 = OpIAdd %uint %uint_16 %start_byte_offset |
| %237 = OpFunctionCall %mat3v4float %238 %236 |
| %239 = OpIAdd %uint %uint_64 %start_byte_offset |
| %241 = OpFunctionCall %tint_TransferFunctionParams %242 %239 |
| %243 = OpIAdd %uint %uint_96 %start_byte_offset |
| %245 = OpFunctionCall %tint_TransferFunctionParams %242 %243 |
| %246 = OpIAdd %uint %uint_128 %start_byte_offset |
| %248 = OpFunctionCall %mat3v3float %249 %246 |
| %250 = OpIAdd %uint %uint_176 %start_byte_offset |
| %252 = OpFunctionCall %mat3v2float %253 %250 |
| %254 = OpIAdd %uint %uint_200 %start_byte_offset |
| %256 = OpFunctionCall %mat3v2float %253 %254 |
| %257 = OpIAdd %uint %uint_224 %start_byte_offset |
| %259 = OpUDiv %uint %257 %uint_16 |
| %260 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %259 |
| %261 = OpLoad %v4uint %260 None |
| %262 = OpBitwiseAnd %uint %257 %uint_15 |
| %263 = OpShiftRightLogical %uint %262 %uint_2 |
| %264 = OpVectorShuffle %v2uint %261 %261 2 3 |
| %265 = OpVectorShuffle %v2uint %261 %261 0 1 |
| %266 = OpIEqual %bool %263 %uint_2 |
| %268 = OpCompositeConstruct %v2bool %266 %266 |
| %269 = OpSelect %v2uint %268 %264 %265 |
| %270 = OpBitcast %v2float %269 |
| %271 = OpIAdd %uint %uint_232 %start_byte_offset |
| %273 = OpUDiv %uint %271 %uint_16 |
| %274 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %273 |
| %275 = OpLoad %v4uint %274 None |
| %276 = OpBitwiseAnd %uint %271 %uint_15 |
| %277 = OpShiftRightLogical %uint %276 %uint_2 |
| %278 = OpVectorShuffle %v2uint %275 %275 2 3 |
| %279 = OpVectorShuffle %v2uint %275 %275 0 1 |
| %280 = OpIEqual %bool %277 %uint_2 |
| %281 = OpCompositeConstruct %v2bool %280 %280 |
| %282 = OpSelect %v2uint %281 %278 %279 |
| %283 = OpBitcast %v2float %282 |
| %284 = OpIAdd %uint %uint_240 %start_byte_offset |
| %286 = OpUDiv %uint %284 %uint_16 |
| %287 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %286 |
| %288 = OpLoad %v4uint %287 None |
| %289 = OpBitwiseAnd %uint %284 %uint_15 |
| %290 = OpShiftRightLogical %uint %289 %uint_2 |
| %291 = OpVectorShuffle %v2uint %288 %288 2 3 |
| %292 = OpVectorShuffle %v2uint %288 %288 0 1 |
| %293 = OpIEqual %bool %290 %uint_2 |
| %294 = OpCompositeConstruct %v2bool %293 %293 |
| %295 = OpSelect %v2uint %294 %291 %292 |
| %296 = OpBitcast %v2float %295 |
| %297 = OpIAdd %uint %uint_248 %start_byte_offset |
| %299 = OpUDiv %uint %297 %uint_16 |
| %300 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %299 |
| %301 = OpLoad %v4uint %300 None |
| %302 = OpBitwiseAnd %uint %297 %uint_15 |
| %303 = OpShiftRightLogical %uint %302 %uint_2 |
| %304 = OpVectorShuffle %v2uint %301 %301 2 3 |
| %305 = OpVectorShuffle %v2uint %301 %301 0 1 |
| %306 = OpIEqual %bool %303 %uint_2 |
| %307 = OpCompositeConstruct %v2bool %306 %306 |
| %308 = OpSelect %v2uint %307 %304 %305 |
| %309 = OpBitcast %v2float %308 |
| %310 = OpIAdd %uint %uint_256 %start_byte_offset |
| %312 = OpUDiv %uint %310 %uint_16 |
| %313 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %312 |
| %314 = OpLoad %v4uint %313 None |
| %315 = OpBitwiseAnd %uint %310 %uint_15 |
| %316 = OpShiftRightLogical %uint %315 %uint_2 |
| %317 = OpVectorShuffle %v2uint %314 %314 2 3 |
| %318 = OpVectorShuffle %v2uint %314 %314 0 1 |
| %319 = OpIEqual %bool %316 %uint_2 |
| %320 = OpCompositeConstruct %v2bool %319 %319 |
| %321 = OpSelect %v2uint %320 %317 %318 |
| %322 = OpIAdd %uint %uint_264 %start_byte_offset |
| %324 = OpUDiv %uint %322 %uint_16 |
| %325 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %324 |
| %326 = OpLoad %v4uint %325 None |
| %327 = OpBitwiseAnd %uint %322 %uint_15 |
| %328 = OpShiftRightLogical %uint %327 %uint_2 |
| %329 = OpVectorShuffle %v2uint %326 %326 2 3 |
| %330 = OpVectorShuffle %v2uint %326 %326 0 1 |
| %331 = OpIEqual %bool %328 %uint_2 |
| %332 = OpCompositeConstruct %v2bool %331 %331 |
| %333 = OpSelect %v2uint %332 %329 %330 |
| %334 = OpBitcast %v2float %333 |
| %335 = OpCompositeConstruct %tint_ExternalTextureParams %227 %235 %237 %241 %245 %248 %252 %256 %270 %283 %296 %309 %321 %334 |
| OpReturnValue %335 |
| OpFunctionEnd |
| %238 = OpFunction %mat3v4float None %337 |
| %start_byte_offset_0 = OpFunctionParameter %uint |
| %338 = OpLabel |
| %339 = OpUDiv %uint %start_byte_offset_0 %uint_16 |
| %340 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %339 |
| %341 = OpLoad %v4uint %340 None |
| %342 = OpBitcast %v4float %341 |
| %343 = OpIAdd %uint %uint_16 %start_byte_offset_0 |
| %344 = OpUDiv %uint %343 %uint_16 |
| %345 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %344 |
| %346 = OpLoad %v4uint %345 None |
| %347 = OpBitcast %v4float %346 |
| %348 = OpIAdd %uint %uint_32 %start_byte_offset_0 |
| %350 = OpUDiv %uint %348 %uint_16 |
| %351 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %350 |
| %352 = OpLoad %v4uint %351 None |
| %353 = OpBitcast %v4float %352 |
| %354 = OpCompositeConstruct %mat3v4float %342 %347 %353 |
| OpReturnValue %354 |
| OpFunctionEnd |
| %242 = OpFunction %tint_TransferFunctionParams None %356 |
| %start_byte_offset_1 = OpFunctionParameter %uint |
| %357 = OpLabel |
| %358 = OpUDiv %uint %start_byte_offset_1 %uint_16 |
| %359 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %358 |
| %360 = OpBitwiseAnd %uint %start_byte_offset_1 %uint_15 |
| %361 = OpShiftRightLogical %uint %360 %uint_2 |
| %362 = OpLoad %v4uint %359 None |
| %363 = OpVectorExtractDynamic %uint %362 %361 |
| %364 = OpIAdd %uint %uint_4 %start_byte_offset_1 |
| %365 = OpUDiv %uint %364 %uint_16 |
| %366 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %365 |
| %367 = OpBitwiseAnd %uint %364 %uint_15 |
| %368 = OpShiftRightLogical %uint %367 %uint_2 |
| %369 = OpLoad %v4uint %366 None |
| %370 = OpVectorExtractDynamic %uint %369 %368 |
| %371 = OpBitcast %float %370 |
| %372 = OpIAdd %uint %uint_8 %start_byte_offset_1 |
| %374 = OpUDiv %uint %372 %uint_16 |
| %375 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %374 |
| %376 = OpBitwiseAnd %uint %372 %uint_15 |
| %377 = OpShiftRightLogical %uint %376 %uint_2 |
| %378 = OpLoad %v4uint %375 None |
| %379 = OpVectorExtractDynamic %uint %378 %377 |
| %380 = OpBitcast %float %379 |
| %381 = OpIAdd %uint %uint_12 %start_byte_offset_1 |
| %383 = OpUDiv %uint %381 %uint_16 |
| %384 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %383 |
| %385 = OpBitwiseAnd %uint %381 %uint_15 |
| %386 = OpShiftRightLogical %uint %385 %uint_2 |
| %387 = OpLoad %v4uint %384 None |
| %388 = OpVectorExtractDynamic %uint %387 %386 |
| %389 = OpBitcast %float %388 |
| %390 = OpIAdd %uint %uint_16 %start_byte_offset_1 |
| %391 = OpUDiv %uint %390 %uint_16 |
| %392 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %391 |
| %393 = OpBitwiseAnd %uint %390 %uint_15 |
| %394 = OpShiftRightLogical %uint %393 %uint_2 |
| %395 = OpLoad %v4uint %392 None |
| %396 = OpVectorExtractDynamic %uint %395 %394 |
| %397 = OpBitcast %float %396 |
| %398 = OpIAdd %uint %uint_20 %start_byte_offset_1 |
| %400 = OpUDiv %uint %398 %uint_16 |
| %401 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %400 |
| %402 = OpBitwiseAnd %uint %398 %uint_15 |
| %403 = OpShiftRightLogical %uint %402 %uint_2 |
| %404 = OpLoad %v4uint %401 None |
| %405 = OpVectorExtractDynamic %uint %404 %403 |
| %406 = OpBitcast %float %405 |
| %407 = OpIAdd %uint %uint_24 %start_byte_offset_1 |
| %409 = OpUDiv %uint %407 %uint_16 |
| %410 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %409 |
| %411 = OpBitwiseAnd %uint %407 %uint_15 |
| %412 = OpShiftRightLogical %uint %411 %uint_2 |
| %413 = OpLoad %v4uint %410 None |
| %414 = OpVectorExtractDynamic %uint %413 %412 |
| %415 = OpBitcast %float %414 |
| %416 = OpIAdd %uint %uint_28 %start_byte_offset_1 |
| %418 = OpUDiv %uint %416 %uint_16 |
| %419 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %418 |
| %420 = OpBitwiseAnd %uint %416 %uint_15 |
| %421 = OpShiftRightLogical %uint %420 %uint_2 |
| %422 = OpLoad %v4uint %419 None |
| %423 = OpVectorExtractDynamic %uint %422 %421 |
| %424 = OpBitcast %float %423 |
| %425 = OpCompositeConstruct %tint_TransferFunctionParams %363 %371 %380 %389 %397 %406 %415 %424 |
| OpReturnValue %425 |
| OpFunctionEnd |
| %249 = OpFunction %mat3v3float None %427 |
| %start_byte_offset_2 = OpFunctionParameter %uint |
| %428 = OpLabel |
| %429 = OpUDiv %uint %start_byte_offset_2 %uint_16 |
| %430 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %429 |
| %431 = OpLoad %v4uint %430 None |
| %432 = OpVectorShuffle %v3uint %431 %431 0 1 2 |
| %434 = OpBitcast %v3float %432 |
| %435 = OpIAdd %uint %uint_16 %start_byte_offset_2 |
| %436 = OpUDiv %uint %435 %uint_16 |
| %437 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %436 |
| %438 = OpLoad %v4uint %437 None |
| %439 = OpVectorShuffle %v3uint %438 %438 0 1 2 |
| %440 = OpBitcast %v3float %439 |
| %441 = OpIAdd %uint %uint_32 %start_byte_offset_2 |
| %442 = OpUDiv %uint %441 %uint_16 |
| %443 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %442 |
| %444 = OpLoad %v4uint %443 None |
| %445 = OpVectorShuffle %v3uint %444 %444 0 1 2 |
| %446 = OpBitcast %v3float %445 |
| %447 = OpCompositeConstruct %mat3v3float %434 %440 %446 |
| OpReturnValue %447 |
| OpFunctionEnd |
| %253 = OpFunction %mat3v2float None %449 |
| %start_byte_offset_3 = OpFunctionParameter %uint |
| %450 = OpLabel |
| %451 = OpUDiv %uint %start_byte_offset_3 %uint_16 |
| %452 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %451 |
| %453 = OpLoad %v4uint %452 None |
| %454 = OpBitwiseAnd %uint %start_byte_offset_3 %uint_15 |
| %455 = OpShiftRightLogical %uint %454 %uint_2 |
| %456 = OpVectorShuffle %v2uint %453 %453 2 3 |
| %457 = OpVectorShuffle %v2uint %453 %453 0 1 |
| %458 = OpIEqual %bool %455 %uint_2 |
| %459 = OpCompositeConstruct %v2bool %458 %458 |
| %460 = OpSelect %v2uint %459 %456 %457 |
| %461 = OpBitcast %v2float %460 |
| %462 = OpIAdd %uint %uint_8 %start_byte_offset_3 |
| %463 = OpUDiv %uint %462 %uint_16 |
| %464 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %463 |
| %465 = OpLoad %v4uint %464 None |
| %466 = OpBitwiseAnd %uint %462 %uint_15 |
| %467 = OpShiftRightLogical %uint %466 %uint_2 |
| %468 = OpVectorShuffle %v2uint %465 %465 2 3 |
| %469 = OpVectorShuffle %v2uint %465 %465 0 1 |
| %470 = OpIEqual %bool %467 %uint_2 |
| %471 = OpCompositeConstruct %v2bool %470 %470 |
| %472 = OpSelect %v2uint %471 %468 %469 |
| %473 = OpBitcast %v2float %472 |
| %474 = OpIAdd %uint %uint_16 %start_byte_offset_3 |
| %475 = OpUDiv %uint %474 %uint_16 |
| %476 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %475 |
| %477 = OpLoad %v4uint %476 None |
| %478 = OpBitwiseAnd %uint %474 %uint_15 |
| %479 = OpShiftRightLogical %uint %478 %uint_2 |
| %480 = OpVectorShuffle %v2uint %477 %477 2 3 |
| %481 = OpVectorShuffle %v2uint %477 %477 0 1 |
| %482 = OpIEqual %bool %479 %uint_2 |
| %483 = OpCompositeConstruct %v2bool %482 %482 |
| %484 = OpSelect %v2uint %483 %480 %481 |
| %485 = OpBitcast %v2float %484 |
| %486 = OpCompositeConstruct %mat3v2float %461 %473 %485 |
| OpReturnValue %486 |
| OpFunctionEnd |
| ; |
| ; compute_main |
| ; |
| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 1 |
| ; Bound: 487 |
| ; Schema: 0 |
| OpCapability Shader |
| %40 = OpExtInstImport "GLSL.std.450" |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint GLCompute %compute_main "compute_main" |
| OpExecutionMode %compute_main LocalSize 1 1 1 |
| OpMemberName %arg_0_params_block_tint_explicit_layout 0 "inner" |
| OpName %arg_0_params_block_tint_explicit_layout "arg_0_params_block_tint_explicit_layout" |
| OpName %arg_0_plane0 "arg_0_plane0" |
| OpName %arg_0_plane1 "arg_0_plane1" |
| OpName %textureLoad2d "textureLoad2d" |
| OpName %coords "coords" |
| OpMemberName %tint_ExternalTextureParams 0 "numPlanes" |
| OpMemberName %tint_ExternalTextureParams 1 "doYuvToRgbConversionOnly" |
| OpMemberName %tint_ExternalTextureParams 2 "yuvToRgbConversionMatrix" |
| OpMemberName %tint_TransferFunctionParams 0 "mode" |
| OpMemberName %tint_TransferFunctionParams 1 "A" |
| OpMemberName %tint_TransferFunctionParams 2 "B" |
| OpMemberName %tint_TransferFunctionParams 3 "C" |
| OpMemberName %tint_TransferFunctionParams 4 "D" |
| OpMemberName %tint_TransferFunctionParams 5 "E" |
| OpMemberName %tint_TransferFunctionParams 6 "F" |
| OpMemberName %tint_TransferFunctionParams 7 "G" |
| OpName %tint_TransferFunctionParams "tint_TransferFunctionParams" |
| OpMemberName %tint_ExternalTextureParams 3 "srcTransferFunction" |
| OpMemberName %tint_ExternalTextureParams 4 "dstTransferFunction" |
| OpMemberName %tint_ExternalTextureParams 5 "gamutConversionMatrix" |
| OpMemberName %tint_ExternalTextureParams 6 "sampleTransform" |
| OpMemberName %tint_ExternalTextureParams 7 "loadTransform" |
| OpMemberName %tint_ExternalTextureParams 8 "samplePlane0RectMin" |
| OpMemberName %tint_ExternalTextureParams 9 "samplePlane0RectMax" |
| OpMemberName %tint_ExternalTextureParams 10 "samplePlane1RectMin" |
| OpMemberName %tint_ExternalTextureParams 11 "samplePlane1RectMax" |
| OpMemberName %tint_ExternalTextureParams 12 "apparentSize" |
| OpMemberName %tint_ExternalTextureParams 13 "plane1CoordFactor" |
| OpName %tint_ExternalTextureParams "tint_ExternalTextureParams" |
| OpName %doTextureLoad "doTextureLoad" |
| OpName %res "res" |
| OpName %compute_main "compute_main" |
| OpName %tint_TextureLoadMultiplanarExternal "tint_TextureLoadMultiplanarExternal" |
| OpName %plane_0 "plane_0" |
| OpName %plane_1 "plane_1" |
| OpName %params "params" |
| OpName %coords_0 "coords" |
| OpName %tint_ApplySrcTransferFunction "tint_ApplySrcTransferFunction" |
| OpName %v "v" |
| OpName %params_0 "params" |
| OpName %return_value "return_value" |
| OpName %mode "mode" |
| OpName %tint_ApplyGammaTransferFunction "tint_ApplyGammaTransferFunction" |
| OpName %v_0 "v" |
| OpName %params_1 "params" |
| OpName %A "A" |
| OpName %B "B" |
| OpName %C "C" |
| OpName %D "D" |
| OpName %E "E" |
| OpName %F "F" |
| OpName %G "G" |
| OpName %tint_ApplyHLGSingleChannel "tint_ApplyHLGSingleChannel" |
| OpName %v_1 "v" |
| OpName %params_2 "params" |
| OpName %return_value_0 "return_value" |
| OpName %A_0 "A" |
| OpName %B_0 "B" |
| OpName %C_0 "C" |
| OpName %cutoff "cutoff" |
| OpName %lower_scale "lower_scale" |
| OpName %upper_scale "upper_scale" |
| OpName %tint_ApplyHLGTransferFunction "tint_ApplyHLGTransferFunction" |
| OpName %v_2 "v" |
| OpName %params_3 "params" |
| OpName %tint_ApplyPQTransferFunction "tint_ApplyPQTransferFunction" |
| OpName %v_3 "v" |
| OpName %params_4 "params" |
| OpName %m1 "m1" |
| OpName %m2 "m2" |
| OpName %c1 "c1" |
| OpName %c2 "c2" |
| OpName %c3 "c3" |
| OpName %start_byte_offset "start_byte_offset" |
| OpName %start_byte_offset_0 "start_byte_offset" |
| OpName %start_byte_offset_1 "start_byte_offset" |
| OpName %start_byte_offset_2 "start_byte_offset" |
| OpName %start_byte_offset_3 "start_byte_offset" |
| OpDecorate %_arr_v4uint_uint_17 ArrayStride 16 |
| OpMemberDecorate %arg_0_params_block_tint_explicit_layout 0 Offset 0 |
| OpDecorate %arg_0_params_block_tint_explicit_layout Block |
| OpDecorate %1 DescriptorSet 1 |
| OpDecorate %1 Binding 2 |
| OpDecorate %1 NonWritable |
| OpDecorate %arg_0_plane0 DescriptorSet 1 |
| OpDecorate %arg_0_plane0 Binding 0 |
| OpDecorate %arg_0_plane1 DescriptorSet 1 |
| OpDecorate %arg_0_plane1 Binding 1 |
| %uint = OpTypeInt 32 0 |
| %v4uint = OpTypeVector %uint 4 |
| %uint_17 = OpConstant %uint 17 |
| %_arr_v4uint_uint_17 = OpTypeArray %v4uint %uint_17 |
| %arg_0_params_block_tint_explicit_layout = OpTypeStruct %_arr_v4uint_uint_17 |
| %_ptr_Uniform_arg_0_params_block_tint_explicit_layout = OpTypePointer Uniform %arg_0_params_block_tint_explicit_layout |
| %1 = OpVariable %_ptr_Uniform_arg_0_params_block_tint_explicit_layout Uniform |
| %float = OpTypeFloat 32 |
| %10 = OpTypeImage %float 2D 0 0 0 1 Unknown |
| %_ptr_UniformConstant_10 = OpTypePointer UniformConstant %10 |
| %arg_0_plane0 = OpVariable %_ptr_UniformConstant_10 UniformConstant |
| %arg_0_plane1 = OpVariable %_ptr_UniformConstant_10 UniformConstant |
| %v4float = OpTypeVector %float 4 |
| %int = OpTypeInt 32 1 |
| %v2int = OpTypeVector %int 2 |
| %18 = OpTypeFunction %v4float %v2int |
| %mat3v4float = OpTypeMatrix %v4float 3 |
| %tint_TransferFunctionParams = OpTypeStruct %uint %float %float %float %float %float %float %float |
| %v3float = OpTypeVector %float 3 |
| %mat3v3float = OpTypeMatrix %v3float 3 |
| %v2float = OpTypeVector %float 2 |
| %mat3v2float = OpTypeMatrix %v2float 3 |
| %v2uint = OpTypeVector %uint 2 |
| %tint_ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %tint_TransferFunctionParams %tint_TransferFunctionParams %mat3v3float %mat3v2float %mat3v2float %v2float %v2float %v2float %v2float %v2uint %v2float |
| %uint_0 = OpConstant %uint 0 |
| %uint_1 = OpConstant %uint 1 |
| %35 = OpConstantComposite %v2uint %uint_1 %uint_1 |
| %void = OpTypeVoid |
| %45 = OpTypeFunction %void |
| %48 = OpConstantNull %v2int |
| %_ptr_Function_v4float = OpTypePointer Function %v4float |
| %58 = OpTypeFunction %v4float %10 %10 %tint_ExternalTextureParams %v2uint |
| %float_1 = OpConstant %float 1 |
| %bool = OpTypeBool |
| %107 = OpTypeFunction %v3float %v3float %tint_TransferFunctionParams |
| %_ptr_Function_v3float = OpTypePointer Function %v3float |
| %111 = OpConstantNull %v3float |
| %v3bool = OpTypeVector %bool 3 |
| %158 = OpTypeFunction %float %float %tint_TransferFunctionParams |
| %_ptr_Function_float = OpTypePointer Function %float |
| %162 = OpConstantNull %float |
| %205 = OpConstantComposite %v3float %float_1 %float_1 %float_1 |
| %216 = OpTypeFunction %tint_ExternalTextureParams %uint |
| %uint_16 = OpConstant %uint 16 |
| %_ptr_Uniform_v4uint = OpTypePointer Uniform %v4uint |
| %uint_15 = OpConstant %uint 15 |
| %uint_2 = OpConstant %uint 2 |
| %uint_4 = OpConstant %uint 4 |
| %uint_64 = OpConstant %uint 64 |
| %uint_96 = OpConstant %uint 96 |
| %uint_128 = OpConstant %uint 128 |
| %uint_176 = OpConstant %uint 176 |
| %uint_200 = OpConstant %uint 200 |
| %uint_224 = OpConstant %uint 224 |
| %v2bool = OpTypeVector %bool 2 |
| %uint_232 = OpConstant %uint 232 |
| %uint_240 = OpConstant %uint 240 |
| %uint_248 = OpConstant %uint 248 |
| %uint_256 = OpConstant %uint 256 |
| %uint_264 = OpConstant %uint 264 |
| %337 = OpTypeFunction %mat3v4float %uint |
| %uint_32 = OpConstant %uint 32 |
| %356 = OpTypeFunction %tint_TransferFunctionParams %uint |
| %uint_8 = OpConstant %uint 8 |
| %uint_12 = OpConstant %uint 12 |
| %uint_20 = OpConstant %uint 20 |
| %uint_24 = OpConstant %uint 24 |
| %uint_28 = OpConstant %uint 28 |
| %427 = OpTypeFunction %mat3v3float %uint |
| %v3uint = OpTypeVector %uint 3 |
| %449 = OpTypeFunction %mat3v2float %uint |
| %textureLoad2d = OpFunction %v4float None %18 |
| %coords = OpFunctionParameter %v2int |
| %19 = OpLabel |
| %20 = OpLoad %10 %arg_0_plane0 None |
| %21 = OpLoad %10 %arg_0_plane1 None |
| %22 = OpFunctionCall %tint_ExternalTextureParams %31 %uint_0 |
| %33 = OpCompositeExtract %v2uint %22 12 |
| %34 = OpIAdd %v2uint %33 %35 |
| %37 = OpISub %v2uint %34 %35 |
| %38 = OpBitcast %v2uint %coords |
| %39 = OpExtInst %v2uint %40 UMin %38 %37 |
| %41 = OpFunctionCall %v4float %tint_TextureLoadMultiplanarExternal %20 %21 %22 %39 |
| OpReturnValue %41 |
| OpFunctionEnd |
| %doTextureLoad = OpFunction %void None %45 |
| %46 = OpLabel |
| %res = OpVariable %_ptr_Function_v4float Function |
| %47 = OpFunctionCall %v4float %textureLoad2d %48 |
| OpStore %res %47 |
| OpReturn |
| OpFunctionEnd |
| %compute_main = OpFunction %void None %45 |
| %52 = OpLabel |
| %53 = OpFunctionCall %void %doTextureLoad |
| OpReturn |
| OpFunctionEnd |
| %tint_TextureLoadMultiplanarExternal = OpFunction %v4float None %58 |
| %plane_0 = OpFunctionParameter %10 |
| %plane_1 = OpFunctionParameter %10 |
| %params = OpFunctionParameter %tint_ExternalTextureParams |
| %coords_0 = OpFunctionParameter %v2uint |
| %59 = OpLabel |
| %60 = OpCompositeExtract %uint %params 1 |
| %61 = OpCompositeExtract %mat3v4float %params 2 |
| %62 = OpCompositeExtract %mat3v2float %params 7 |
| %63 = OpCompositeExtract %v2uint %params 12 |
| %64 = OpCompositeExtract %v2float %params 13 |
| %65 = OpExtInst %v2uint %40 UMin %coords_0 %63 |
| %66 = OpConvertUToF %v2float %65 |
| %67 = OpCompositeConstruct %v3float %66 %float_1 |
| %69 = OpMatrixTimesVector %v2float %62 %67 |
| %70 = OpExtInst %v2float %40 RoundEven %69 |
| %71 = OpConvertFToU %v2uint %70 |
| %72 = OpCompositeExtract %uint %params 0 |
| %73 = OpIEqual %bool %72 %uint_1 |
| OpSelectionMerge %75 None |
| OpBranchConditional %73 %76 %77 |
| %76 = OpLabel |
| %90 = OpImageFetch %v4float %plane_0 %71 Lod %uint_0 |
| %79 = OpVectorShuffle %v3float %90 %90 0 1 2 |
| %82 = OpCompositeExtract %float %90 3 |
| OpBranch %75 |
| %77 = OpLabel |
| %91 = OpImageFetch %v4float %plane_0 %71 Lod %uint_0 |
| %92 = OpCompositeExtract %float %91 0 |
| %93 = OpFMul %v2float %70 %64 |
| %94 = OpConvertFToU %v2uint %93 |
| %95 = OpImageFetch %v4float %plane_1 %94 Lod %uint_0 |
| %96 = OpVectorShuffle %v2float %95 %95 0 1 |
| %97 = OpCompositeConstruct %v4float %92 %96 %float_1 |
| %80 = OpVectorTimesMatrix %v3float %97 %61 |
| OpBranch %75 |
| %75 = OpLabel |
| %78 = OpPhi %v3float %79 %76 %80 %77 |
| %81 = OpPhi %float %82 %76 %float_1 %77 |
| %83 = OpIEqual %bool %60 %uint_0 |
| OpSelectionMerge %84 None |
| OpBranchConditional %83 %85 %86 |
| %85 = OpLabel |
| %98 = OpCompositeExtract %tint_TransferFunctionParams %params 3 |
| %99 = OpCompositeExtract %tint_TransferFunctionParams %params 4 |
| %100 = OpCompositeExtract %mat3v3float %params 5 |
| %101 = OpFunctionCall %v3float %tint_ApplySrcTransferFunction %78 %98 |
| %103 = OpMatrixTimesVector %v3float %100 %101 |
| %88 = OpFunctionCall %v3float %tint_ApplyGammaTransferFunction %103 %99 |
| OpBranch %84 |
| %86 = OpLabel |
| OpBranch %84 |
| %84 = OpLabel |
| %87 = OpPhi %v3float %88 %85 %78 %86 |
| %89 = OpCompositeConstruct %v4float %87 %81 |
| OpReturnValue %89 |
| OpFunctionEnd |
| %tint_ApplySrcTransferFunction = OpFunction %v3float None %107 |
| %v = OpFunctionParameter %v3float |
| %params_0 = OpFunctionParameter %tint_TransferFunctionParams |
| %108 = OpLabel |
| %return_value = OpVariable %_ptr_Function_v3float Function %111 |
| %mode = OpCompositeExtract %uint %params_0 0 |
| %113 = OpIEqual %bool %mode %uint_0 |
| OpSelectionMerge %114 None |
| OpBranchConditional %113 %115 %116 |
| %115 = OpLabel |
| %118 = OpFunctionCall %v3float %tint_ApplyGammaTransferFunction %v %params_0 |
| OpStore %return_value %118 None |
| OpBranch %114 |
| %116 = OpLabel |
| %119 = OpIEqual %bool %mode %uint_1 |
| OpSelectionMerge %120 None |
| OpBranchConditional %119 %121 %122 |
| %121 = OpLabel |
| %123 = OpFunctionCall %v3float %tint_ApplyHLGTransferFunction %v %params_0 |
| OpStore %return_value %123 None |
| OpBranch %120 |
| %122 = OpLabel |
| %125 = OpFunctionCall %v3float %tint_ApplyPQTransferFunction %v %params_0 |
| OpStore %return_value %125 None |
| OpBranch %120 |
| %120 = OpLabel |
| OpBranch %114 |
| %114 = OpLabel |
| %117 = OpLoad %v3float %return_value None |
| OpReturnValue %117 |
| OpFunctionEnd |
| %tint_ApplyGammaTransferFunction = OpFunction %v3float None %107 |
| %v_0 = OpFunctionParameter %v3float |
| %params_1 = OpFunctionParameter %tint_TransferFunctionParams |
| %129 = OpLabel |
| %A = OpCompositeExtract %float %params_1 1 |
| %B = OpCompositeExtract %float %params_1 2 |
| %C = OpCompositeExtract %float %params_1 3 |
| %D = OpCompositeExtract %float %params_1 4 |
| %E = OpCompositeExtract %float %params_1 5 |
| %F = OpCompositeExtract %float %params_1 6 |
| %G = OpCompositeExtract %float %params_1 7 |
| %137 = OpCompositeConstruct %v3float %G %G %G |
| %138 = OpCompositeConstruct %v3float %D %D %D |
| %139 = OpExtInst %v3float %40 FAbs %v_0 |
| %140 = OpExtInst %v3float %40 FSign %v_0 |
| %141 = OpFOrdLessThan %v3bool %139 %138 |
| %143 = OpVectorTimesScalar %v3float %139 %C |
| %144 = OpCompositeConstruct %v3float %F %F %F |
| %145 = OpFAdd %v3float %143 %144 |
| %146 = OpFMul %v3float %140 %145 |
| %147 = OpVectorTimesScalar %v3float %139 %A |
| %148 = OpCompositeConstruct %v3float %B %B %B |
| %149 = OpFAdd %v3float %147 %148 |
| %150 = OpExtInst %v3float %40 Pow %149 %137 |
| %151 = OpCompositeConstruct %v3float %E %E %E |
| %152 = OpFAdd %v3float %150 %151 |
| %153 = OpFMul %v3float %140 %152 |
| %154 = OpSelect %v3float %141 %146 %153 |
| OpReturnValue %154 |
| OpFunctionEnd |
| %tint_ApplyHLGSingleChannel = OpFunction %float None %158 |
| %v_1 = OpFunctionParameter %float |
| %params_2 = OpFunctionParameter %tint_TransferFunctionParams |
| %159 = OpLabel |
| %return_value_0 = OpVariable %_ptr_Function_float Function %162 |
| %A_0 = OpCompositeExtract %float %params_2 1 |
| %B_0 = OpCompositeExtract %float %params_2 2 |
| %C_0 = OpCompositeExtract %float %params_2 3 |
| %cutoff = OpCompositeExtract %float %params_2 4 |
| %lower_scale = OpCompositeExtract %float %params_2 5 |
| %upper_scale = OpCompositeExtract %float %params_2 6 |
| %169 = OpFOrdLessThanEqual %bool %v_1 %cutoff |
| OpSelectionMerge %170 None |
| OpBranchConditional %169 %171 %172 |
| %171 = OpLabel |
| %174 = OpFMul %float %v_1 %v_1 |
| %175 = OpFDiv %float %174 %lower_scale |
| OpStore %return_value_0 %175 None |
| OpBranch %170 |
| %172 = OpLabel |
| %176 = OpFSub %float %v_1 %C_0 |
| %177 = OpFDiv %float %176 %A_0 |
| %178 = OpExtInst %float %40 Exp %177 |
| %179 = OpFAdd %float %B_0 %178 |
| %180 = OpFDiv %float %179 %upper_scale |
| OpStore %return_value_0 %180 None |
| OpBranch %170 |
| %170 = OpLabel |
| %173 = OpLoad %float %return_value_0 None |
| OpReturnValue %173 |
| OpFunctionEnd |
| %tint_ApplyHLGTransferFunction = OpFunction %v3float None %107 |
| %v_2 = OpFunctionParameter %v3float |
| %params_3 = OpFunctionParameter %tint_TransferFunctionParams |
| %183 = OpLabel |
| %184 = OpCompositeExtract %float %v_2 0 |
| %185 = OpFunctionCall %float %tint_ApplyHLGSingleChannel %184 %params_3 |
| %186 = OpCompositeExtract %float %v_2 1 |
| %187 = OpFunctionCall %float %tint_ApplyHLGSingleChannel %186 %params_3 |
| %188 = OpCompositeExtract %float %v_2 2 |
| %189 = OpFunctionCall %float %tint_ApplyHLGSingleChannel %188 %params_3 |
| %190 = OpCompositeConstruct %v3float %185 %187 %189 |
| OpReturnValue %190 |
| OpFunctionEnd |
| %tint_ApplyPQTransferFunction = OpFunction %v3float None %107 |
| %v_3 = OpFunctionParameter %v3float |
| %params_4 = OpFunctionParameter %tint_TransferFunctionParams |
| %193 = OpLabel |
| %m1 = OpCompositeExtract %float %params_4 1 |
| %m2 = OpCompositeExtract %float %params_4 2 |
| %c1 = OpCompositeExtract %float %params_4 3 |
| %c2 = OpCompositeExtract %float %params_4 4 |
| %c3 = OpCompositeExtract %float %params_4 5 |
| %199 = OpCompositeConstruct %v3float %c1 %c1 %c1 |
| %200 = OpCompositeConstruct %v3float %c2 %c2 %c2 |
| %201 = OpCompositeConstruct %v3float %c3 %c3 %c3 |
| %202 = OpCompositeConstruct %v3float %m1 %m1 %m1 |
| %203 = OpCompositeConstruct %v3float %m2 %m2 %m2 |
| %204 = OpExtInst %v3float %40 NClamp %v_3 %111 %205 |
| %206 = OpFDiv %v3float %205 %203 |
| %207 = OpExtInst %v3float %40 Pow %204 %206 |
| %208 = OpFSub %v3float %207 %199 |
| %209 = OpExtInst %v3float %40 NMax %208 %111 |
| %210 = OpFMul %v3float %201 %207 |
| %211 = OpFSub %v3float %200 %210 |
| %212 = OpFDiv %v3float %209 %211 |
| %213 = OpFDiv %v3float %205 %202 |
| %214 = OpExtInst %v3float %40 Pow %212 %213 |
| OpReturnValue %214 |
| OpFunctionEnd |
| %31 = OpFunction %tint_ExternalTextureParams None %216 |
| %start_byte_offset = OpFunctionParameter %uint |
| %217 = OpLabel |
| %218 = OpUDiv %uint %start_byte_offset %uint_16 |
| %220 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %218 |
| %222 = OpBitwiseAnd %uint %start_byte_offset %uint_15 |
| %224 = OpShiftRightLogical %uint %222 %uint_2 |
| %226 = OpLoad %v4uint %220 None |
| %227 = OpVectorExtractDynamic %uint %226 %224 |
| %228 = OpIAdd %uint %uint_4 %start_byte_offset |
| %230 = OpUDiv %uint %228 %uint_16 |
| %231 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %230 |
| %232 = OpBitwiseAnd %uint %228 %uint_15 |
| %233 = OpShiftRightLogical %uint %232 %uint_2 |
| %234 = OpLoad %v4uint %231 None |
| %235 = OpVectorExtractDynamic %uint %234 %233 |
| %236 = OpIAdd %uint %uint_16 %start_byte_offset |
| %237 = OpFunctionCall %mat3v4float %238 %236 |
| %239 = OpIAdd %uint %uint_64 %start_byte_offset |
| %241 = OpFunctionCall %tint_TransferFunctionParams %242 %239 |
| %243 = OpIAdd %uint %uint_96 %start_byte_offset |
| %245 = OpFunctionCall %tint_TransferFunctionParams %242 %243 |
| %246 = OpIAdd %uint %uint_128 %start_byte_offset |
| %248 = OpFunctionCall %mat3v3float %249 %246 |
| %250 = OpIAdd %uint %uint_176 %start_byte_offset |
| %252 = OpFunctionCall %mat3v2float %253 %250 |
| %254 = OpIAdd %uint %uint_200 %start_byte_offset |
| %256 = OpFunctionCall %mat3v2float %253 %254 |
| %257 = OpIAdd %uint %uint_224 %start_byte_offset |
| %259 = OpUDiv %uint %257 %uint_16 |
| %260 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %259 |
| %261 = OpLoad %v4uint %260 None |
| %262 = OpBitwiseAnd %uint %257 %uint_15 |
| %263 = OpShiftRightLogical %uint %262 %uint_2 |
| %264 = OpVectorShuffle %v2uint %261 %261 2 3 |
| %265 = OpVectorShuffle %v2uint %261 %261 0 1 |
| %266 = OpIEqual %bool %263 %uint_2 |
| %268 = OpCompositeConstruct %v2bool %266 %266 |
| %269 = OpSelect %v2uint %268 %264 %265 |
| %270 = OpBitcast %v2float %269 |
| %271 = OpIAdd %uint %uint_232 %start_byte_offset |
| %273 = OpUDiv %uint %271 %uint_16 |
| %274 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %273 |
| %275 = OpLoad %v4uint %274 None |
| %276 = OpBitwiseAnd %uint %271 %uint_15 |
| %277 = OpShiftRightLogical %uint %276 %uint_2 |
| %278 = OpVectorShuffle %v2uint %275 %275 2 3 |
| %279 = OpVectorShuffle %v2uint %275 %275 0 1 |
| %280 = OpIEqual %bool %277 %uint_2 |
| %281 = OpCompositeConstruct %v2bool %280 %280 |
| %282 = OpSelect %v2uint %281 %278 %279 |
| %283 = OpBitcast %v2float %282 |
| %284 = OpIAdd %uint %uint_240 %start_byte_offset |
| %286 = OpUDiv %uint %284 %uint_16 |
| %287 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %286 |
| %288 = OpLoad %v4uint %287 None |
| %289 = OpBitwiseAnd %uint %284 %uint_15 |
| %290 = OpShiftRightLogical %uint %289 %uint_2 |
| %291 = OpVectorShuffle %v2uint %288 %288 2 3 |
| %292 = OpVectorShuffle %v2uint %288 %288 0 1 |
| %293 = OpIEqual %bool %290 %uint_2 |
| %294 = OpCompositeConstruct %v2bool %293 %293 |
| %295 = OpSelect %v2uint %294 %291 %292 |
| %296 = OpBitcast %v2float %295 |
| %297 = OpIAdd %uint %uint_248 %start_byte_offset |
| %299 = OpUDiv %uint %297 %uint_16 |
| %300 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %299 |
| %301 = OpLoad %v4uint %300 None |
| %302 = OpBitwiseAnd %uint %297 %uint_15 |
| %303 = OpShiftRightLogical %uint %302 %uint_2 |
| %304 = OpVectorShuffle %v2uint %301 %301 2 3 |
| %305 = OpVectorShuffle %v2uint %301 %301 0 1 |
| %306 = OpIEqual %bool %303 %uint_2 |
| %307 = OpCompositeConstruct %v2bool %306 %306 |
| %308 = OpSelect %v2uint %307 %304 %305 |
| %309 = OpBitcast %v2float %308 |
| %310 = OpIAdd %uint %uint_256 %start_byte_offset |
| %312 = OpUDiv %uint %310 %uint_16 |
| %313 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %312 |
| %314 = OpLoad %v4uint %313 None |
| %315 = OpBitwiseAnd %uint %310 %uint_15 |
| %316 = OpShiftRightLogical %uint %315 %uint_2 |
| %317 = OpVectorShuffle %v2uint %314 %314 2 3 |
| %318 = OpVectorShuffle %v2uint %314 %314 0 1 |
| %319 = OpIEqual %bool %316 %uint_2 |
| %320 = OpCompositeConstruct %v2bool %319 %319 |
| %321 = OpSelect %v2uint %320 %317 %318 |
| %322 = OpIAdd %uint %uint_264 %start_byte_offset |
| %324 = OpUDiv %uint %322 %uint_16 |
| %325 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %324 |
| %326 = OpLoad %v4uint %325 None |
| %327 = OpBitwiseAnd %uint %322 %uint_15 |
| %328 = OpShiftRightLogical %uint %327 %uint_2 |
| %329 = OpVectorShuffle %v2uint %326 %326 2 3 |
| %330 = OpVectorShuffle %v2uint %326 %326 0 1 |
| %331 = OpIEqual %bool %328 %uint_2 |
| %332 = OpCompositeConstruct %v2bool %331 %331 |
| %333 = OpSelect %v2uint %332 %329 %330 |
| %334 = OpBitcast %v2float %333 |
| %335 = OpCompositeConstruct %tint_ExternalTextureParams %227 %235 %237 %241 %245 %248 %252 %256 %270 %283 %296 %309 %321 %334 |
| OpReturnValue %335 |
| OpFunctionEnd |
| %238 = OpFunction %mat3v4float None %337 |
| %start_byte_offset_0 = OpFunctionParameter %uint |
| %338 = OpLabel |
| %339 = OpUDiv %uint %start_byte_offset_0 %uint_16 |
| %340 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %339 |
| %341 = OpLoad %v4uint %340 None |
| %342 = OpBitcast %v4float %341 |
| %343 = OpIAdd %uint %uint_16 %start_byte_offset_0 |
| %344 = OpUDiv %uint %343 %uint_16 |
| %345 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %344 |
| %346 = OpLoad %v4uint %345 None |
| %347 = OpBitcast %v4float %346 |
| %348 = OpIAdd %uint %uint_32 %start_byte_offset_0 |
| %350 = OpUDiv %uint %348 %uint_16 |
| %351 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %350 |
| %352 = OpLoad %v4uint %351 None |
| %353 = OpBitcast %v4float %352 |
| %354 = OpCompositeConstruct %mat3v4float %342 %347 %353 |
| OpReturnValue %354 |
| OpFunctionEnd |
| %242 = OpFunction %tint_TransferFunctionParams None %356 |
| %start_byte_offset_1 = OpFunctionParameter %uint |
| %357 = OpLabel |
| %358 = OpUDiv %uint %start_byte_offset_1 %uint_16 |
| %359 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %358 |
| %360 = OpBitwiseAnd %uint %start_byte_offset_1 %uint_15 |
| %361 = OpShiftRightLogical %uint %360 %uint_2 |
| %362 = OpLoad %v4uint %359 None |
| %363 = OpVectorExtractDynamic %uint %362 %361 |
| %364 = OpIAdd %uint %uint_4 %start_byte_offset_1 |
| %365 = OpUDiv %uint %364 %uint_16 |
| %366 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %365 |
| %367 = OpBitwiseAnd %uint %364 %uint_15 |
| %368 = OpShiftRightLogical %uint %367 %uint_2 |
| %369 = OpLoad %v4uint %366 None |
| %370 = OpVectorExtractDynamic %uint %369 %368 |
| %371 = OpBitcast %float %370 |
| %372 = OpIAdd %uint %uint_8 %start_byte_offset_1 |
| %374 = OpUDiv %uint %372 %uint_16 |
| %375 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %374 |
| %376 = OpBitwiseAnd %uint %372 %uint_15 |
| %377 = OpShiftRightLogical %uint %376 %uint_2 |
| %378 = OpLoad %v4uint %375 None |
| %379 = OpVectorExtractDynamic %uint %378 %377 |
| %380 = OpBitcast %float %379 |
| %381 = OpIAdd %uint %uint_12 %start_byte_offset_1 |
| %383 = OpUDiv %uint %381 %uint_16 |
| %384 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %383 |
| %385 = OpBitwiseAnd %uint %381 %uint_15 |
| %386 = OpShiftRightLogical %uint %385 %uint_2 |
| %387 = OpLoad %v4uint %384 None |
| %388 = OpVectorExtractDynamic %uint %387 %386 |
| %389 = OpBitcast %float %388 |
| %390 = OpIAdd %uint %uint_16 %start_byte_offset_1 |
| %391 = OpUDiv %uint %390 %uint_16 |
| %392 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %391 |
| %393 = OpBitwiseAnd %uint %390 %uint_15 |
| %394 = OpShiftRightLogical %uint %393 %uint_2 |
| %395 = OpLoad %v4uint %392 None |
| %396 = OpVectorExtractDynamic %uint %395 %394 |
| %397 = OpBitcast %float %396 |
| %398 = OpIAdd %uint %uint_20 %start_byte_offset_1 |
| %400 = OpUDiv %uint %398 %uint_16 |
| %401 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %400 |
| %402 = OpBitwiseAnd %uint %398 %uint_15 |
| %403 = OpShiftRightLogical %uint %402 %uint_2 |
| %404 = OpLoad %v4uint %401 None |
| %405 = OpVectorExtractDynamic %uint %404 %403 |
| %406 = OpBitcast %float %405 |
| %407 = OpIAdd %uint %uint_24 %start_byte_offset_1 |
| %409 = OpUDiv %uint %407 %uint_16 |
| %410 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %409 |
| %411 = OpBitwiseAnd %uint %407 %uint_15 |
| %412 = OpShiftRightLogical %uint %411 %uint_2 |
| %413 = OpLoad %v4uint %410 None |
| %414 = OpVectorExtractDynamic %uint %413 %412 |
| %415 = OpBitcast %float %414 |
| %416 = OpIAdd %uint %uint_28 %start_byte_offset_1 |
| %418 = OpUDiv %uint %416 %uint_16 |
| %419 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %418 |
| %420 = OpBitwiseAnd %uint %416 %uint_15 |
| %421 = OpShiftRightLogical %uint %420 %uint_2 |
| %422 = OpLoad %v4uint %419 None |
| %423 = OpVectorExtractDynamic %uint %422 %421 |
| %424 = OpBitcast %float %423 |
| %425 = OpCompositeConstruct %tint_TransferFunctionParams %363 %371 %380 %389 %397 %406 %415 %424 |
| OpReturnValue %425 |
| OpFunctionEnd |
| %249 = OpFunction %mat3v3float None %427 |
| %start_byte_offset_2 = OpFunctionParameter %uint |
| %428 = OpLabel |
| %429 = OpUDiv %uint %start_byte_offset_2 %uint_16 |
| %430 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %429 |
| %431 = OpLoad %v4uint %430 None |
| %432 = OpVectorShuffle %v3uint %431 %431 0 1 2 |
| %434 = OpBitcast %v3float %432 |
| %435 = OpIAdd %uint %uint_16 %start_byte_offset_2 |
| %436 = OpUDiv %uint %435 %uint_16 |
| %437 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %436 |
| %438 = OpLoad %v4uint %437 None |
| %439 = OpVectorShuffle %v3uint %438 %438 0 1 2 |
| %440 = OpBitcast %v3float %439 |
| %441 = OpIAdd %uint %uint_32 %start_byte_offset_2 |
| %442 = OpUDiv %uint %441 %uint_16 |
| %443 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %442 |
| %444 = OpLoad %v4uint %443 None |
| %445 = OpVectorShuffle %v3uint %444 %444 0 1 2 |
| %446 = OpBitcast %v3float %445 |
| %447 = OpCompositeConstruct %mat3v3float %434 %440 %446 |
| OpReturnValue %447 |
| OpFunctionEnd |
| %253 = OpFunction %mat3v2float None %449 |
| %start_byte_offset_3 = OpFunctionParameter %uint |
| %450 = OpLabel |
| %451 = OpUDiv %uint %start_byte_offset_3 %uint_16 |
| %452 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %451 |
| %453 = OpLoad %v4uint %452 None |
| %454 = OpBitwiseAnd %uint %start_byte_offset_3 %uint_15 |
| %455 = OpShiftRightLogical %uint %454 %uint_2 |
| %456 = OpVectorShuffle %v2uint %453 %453 2 3 |
| %457 = OpVectorShuffle %v2uint %453 %453 0 1 |
| %458 = OpIEqual %bool %455 %uint_2 |
| %459 = OpCompositeConstruct %v2bool %458 %458 |
| %460 = OpSelect %v2uint %459 %456 %457 |
| %461 = OpBitcast %v2float %460 |
| %462 = OpIAdd %uint %uint_8 %start_byte_offset_3 |
| %463 = OpUDiv %uint %462 %uint_16 |
| %464 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %463 |
| %465 = OpLoad %v4uint %464 None |
| %466 = OpBitwiseAnd %uint %462 %uint_15 |
| %467 = OpShiftRightLogical %uint %466 %uint_2 |
| %468 = OpVectorShuffle %v2uint %465 %465 2 3 |
| %469 = OpVectorShuffle %v2uint %465 %465 0 1 |
| %470 = OpIEqual %bool %467 %uint_2 |
| %471 = OpCompositeConstruct %v2bool %470 %470 |
| %472 = OpSelect %v2uint %471 %468 %469 |
| %473 = OpBitcast %v2float %472 |
| %474 = OpIAdd %uint %uint_16 %start_byte_offset_3 |
| %475 = OpUDiv %uint %474 %uint_16 |
| %476 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %475 |
| %477 = OpLoad %v4uint %476 None |
| %478 = OpBitwiseAnd %uint %474 %uint_15 |
| %479 = OpShiftRightLogical %uint %478 %uint_2 |
| %480 = OpVectorShuffle %v2uint %477 %477 2 3 |
| %481 = OpVectorShuffle %v2uint %477 %477 0 1 |
| %482 = OpIEqual %bool %479 %uint_2 |
| %483 = OpCompositeConstruct %v2bool %482 %482 |
| %484 = OpSelect %v2uint %483 %480 %481 |
| %485 = OpBitcast %v2float %484 |
| %486 = OpCompositeConstruct %mat3v2float %461 %473 %485 |
| OpReturnValue %486 |
| OpFunctionEnd |