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