blob: 08ab88df2be9cf5143c7e63ffb3d793ec1dd1005 [file] [log] [blame] [edit]
;
; vertex_main
;
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 1
; Bound: 414
; 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_GammaTransferParams 0 "G"
OpMemberName %tint_GammaTransferParams 1 "A"
OpMemberName %tint_GammaTransferParams 2 "B"
OpMemberName %tint_GammaTransferParams 3 "C"
OpMemberName %tint_GammaTransferParams 4 "D"
OpMemberName %tint_GammaTransferParams 5 "E"
OpMemberName %tint_GammaTransferParams 6 "F"
OpMemberName %tint_GammaTransferParams 7 "padding"
OpName %tint_GammaTransferParams "tint_GammaTransferParams"
OpMemberName %tint_ExternalTextureParams 3 "gammaDecodeParams"
OpMemberName %tint_ExternalTextureParams 4 "gammaEncodeParams"
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_GammaCorrection "tint_GammaCorrection"
OpName %v "v"
OpName %params_0 "params"
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_GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
%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_GammaTransferParams %tint_GammaTransferParams %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
%112 = OpTypeFunction %v3float %v3float %tint_GammaTransferParams
%v3bool = OpTypeVector %bool 3
%140 = 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
%261 = OpTypeFunction %mat3v4float %uint
%uint_32 = OpConstant %uint 32
%280 = OpTypeFunction %tint_GammaTransferParams %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
%351 = OpTypeFunction %mat3v3float %uint
%v3uint = OpTypeVector %uint 3
%373 = 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_GammaTransferParams %params 3
%105 = OpCompositeExtract %tint_GammaTransferParams %params 4
%106 = OpCompositeExtract %mat3v3float %params 5
%107 = OpFunctionCall %v3float %tint_GammaCorrection %84 %104
%109 = OpMatrixTimesVector %v3float %106 %107
%94 = OpFunctionCall %v3float %tint_GammaCorrection %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_GammaCorrection = OpFunction %v3float None %112
%v = OpFunctionParameter %v3float
%params_0 = OpFunctionParameter %tint_GammaTransferParams
%113 = OpLabel
%114 = OpCompositeExtract %float %params_0 0
%115 = OpCompositeExtract %float %params_0 1
%116 = OpCompositeExtract %float %params_0 2
%117 = OpCompositeExtract %float %params_0 3
%118 = OpCompositeExtract %float %params_0 4
%119 = OpCompositeExtract %float %params_0 5
%120 = OpCompositeExtract %float %params_0 6
%121 = OpCompositeConstruct %v3float %114 %114 %114
%122 = OpCompositeConstruct %v3float %118 %118 %118
%123 = OpExtInst %v3float %44 FAbs %v
%124 = OpExtInst %v3float %44 FSign %v
%125 = OpFOrdLessThan %v3bool %123 %122
%127 = OpVectorTimesScalar %v3float %123 %117
%128 = OpCompositeConstruct %v3float %120 %120 %120
%129 = OpFAdd %v3float %127 %128
%130 = OpFMul %v3float %124 %129
%131 = OpVectorTimesScalar %v3float %123 %115
%132 = OpCompositeConstruct %v3float %116 %116 %116
%133 = OpFAdd %v3float %131 %132
%134 = OpExtInst %v3float %44 Pow %133 %121
%135 = OpCompositeConstruct %v3float %119 %119 %119
%136 = OpFAdd %v3float %134 %135
%137 = OpFMul %v3float %124 %136
%138 = OpSelect %v3float %125 %130 %137
OpReturnValue %138
OpFunctionEnd
%35 = OpFunction %tint_ExternalTextureParams None %140
%start_byte_offset = OpFunctionParameter %uint
%141 = OpLabel
%142 = OpUDiv %uint %start_byte_offset %uint_16
%144 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %142
%146 = OpBitwiseAnd %uint %start_byte_offset %uint_15
%148 = OpShiftRightLogical %uint %146 %uint_2
%150 = OpLoad %v4uint %144 None
%151 = OpVectorExtractDynamic %uint %150 %148
%152 = OpIAdd %uint %uint_4 %start_byte_offset
%154 = OpUDiv %uint %152 %uint_16
%155 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %154
%156 = OpBitwiseAnd %uint %152 %uint_15
%157 = OpShiftRightLogical %uint %156 %uint_2
%158 = OpLoad %v4uint %155 None
%159 = OpVectorExtractDynamic %uint %158 %157
%160 = OpIAdd %uint %uint_16 %start_byte_offset
%161 = OpFunctionCall %mat3v4float %162 %160
%163 = OpIAdd %uint %uint_64 %start_byte_offset
%165 = OpFunctionCall %tint_GammaTransferParams %166 %163
%167 = OpIAdd %uint %uint_96 %start_byte_offset
%169 = OpFunctionCall %tint_GammaTransferParams %166 %167
%170 = OpIAdd %uint %uint_128 %start_byte_offset
%172 = OpFunctionCall %mat3v3float %173 %170
%174 = OpIAdd %uint %uint_176 %start_byte_offset
%176 = OpFunctionCall %mat3v2float %177 %174
%178 = OpIAdd %uint %uint_200 %start_byte_offset
%180 = OpFunctionCall %mat3v2float %177 %178
%181 = OpIAdd %uint %uint_224 %start_byte_offset
%183 = OpUDiv %uint %181 %uint_16
%184 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %183
%185 = OpLoad %v4uint %184 None
%186 = OpBitwiseAnd %uint %181 %uint_15
%187 = OpShiftRightLogical %uint %186 %uint_2
%188 = OpVectorShuffle %v2uint %185 %185 2 3
%189 = OpVectorShuffle %v2uint %185 %185 0 1
%190 = OpIEqual %bool %187 %uint_2
%192 = OpCompositeConstruct %v2bool %190 %190
%193 = OpSelect %v2uint %192 %188 %189
%194 = OpBitcast %v2float %193
%195 = OpIAdd %uint %uint_232 %start_byte_offset
%197 = OpUDiv %uint %195 %uint_16
%198 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %197
%199 = OpLoad %v4uint %198 None
%200 = OpBitwiseAnd %uint %195 %uint_15
%201 = OpShiftRightLogical %uint %200 %uint_2
%202 = OpVectorShuffle %v2uint %199 %199 2 3
%203 = OpVectorShuffle %v2uint %199 %199 0 1
%204 = OpIEqual %bool %201 %uint_2
%205 = OpCompositeConstruct %v2bool %204 %204
%206 = OpSelect %v2uint %205 %202 %203
%207 = OpBitcast %v2float %206
%208 = OpIAdd %uint %uint_240 %start_byte_offset
%210 = OpUDiv %uint %208 %uint_16
%211 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %210
%212 = OpLoad %v4uint %211 None
%213 = OpBitwiseAnd %uint %208 %uint_15
%214 = OpShiftRightLogical %uint %213 %uint_2
%215 = OpVectorShuffle %v2uint %212 %212 2 3
%216 = OpVectorShuffle %v2uint %212 %212 0 1
%217 = OpIEqual %bool %214 %uint_2
%218 = OpCompositeConstruct %v2bool %217 %217
%219 = OpSelect %v2uint %218 %215 %216
%220 = OpBitcast %v2float %219
%221 = OpIAdd %uint %uint_248 %start_byte_offset
%223 = OpUDiv %uint %221 %uint_16
%224 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %223
%225 = OpLoad %v4uint %224 None
%226 = OpBitwiseAnd %uint %221 %uint_15
%227 = OpShiftRightLogical %uint %226 %uint_2
%228 = OpVectorShuffle %v2uint %225 %225 2 3
%229 = OpVectorShuffle %v2uint %225 %225 0 1
%230 = OpIEqual %bool %227 %uint_2
%231 = OpCompositeConstruct %v2bool %230 %230
%232 = OpSelect %v2uint %231 %228 %229
%233 = OpBitcast %v2float %232
%234 = OpIAdd %uint %uint_256 %start_byte_offset
%236 = OpUDiv %uint %234 %uint_16
%237 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %236
%238 = OpLoad %v4uint %237 None
%239 = OpBitwiseAnd %uint %234 %uint_15
%240 = OpShiftRightLogical %uint %239 %uint_2
%241 = OpVectorShuffle %v2uint %238 %238 2 3
%242 = OpVectorShuffle %v2uint %238 %238 0 1
%243 = OpIEqual %bool %240 %uint_2
%244 = OpCompositeConstruct %v2bool %243 %243
%245 = OpSelect %v2uint %244 %241 %242
%246 = OpIAdd %uint %uint_264 %start_byte_offset
%248 = OpUDiv %uint %246 %uint_16
%249 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %248
%250 = OpLoad %v4uint %249 None
%251 = OpBitwiseAnd %uint %246 %uint_15
%252 = OpShiftRightLogical %uint %251 %uint_2
%253 = OpVectorShuffle %v2uint %250 %250 2 3
%254 = OpVectorShuffle %v2uint %250 %250 0 1
%255 = OpIEqual %bool %252 %uint_2
%256 = OpCompositeConstruct %v2bool %255 %255
%257 = OpSelect %v2uint %256 %253 %254
%258 = OpBitcast %v2float %257
%259 = OpCompositeConstruct %tint_ExternalTextureParams %151 %159 %161 %165 %169 %172 %176 %180 %194 %207 %220 %233 %245 %258
OpReturnValue %259
OpFunctionEnd
%162 = OpFunction %mat3v4float None %261
%start_byte_offset_0 = OpFunctionParameter %uint
%262 = OpLabel
%263 = OpUDiv %uint %start_byte_offset_0 %uint_16
%264 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %263
%265 = OpLoad %v4uint %264 None
%266 = OpBitcast %v4float %265
%267 = OpIAdd %uint %uint_16 %start_byte_offset_0
%268 = OpUDiv %uint %267 %uint_16
%269 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %268
%270 = OpLoad %v4uint %269 None
%271 = OpBitcast %v4float %270
%272 = OpIAdd %uint %uint_32 %start_byte_offset_0
%274 = OpUDiv %uint %272 %uint_16
%275 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %274
%276 = OpLoad %v4uint %275 None
%277 = OpBitcast %v4float %276
%278 = OpCompositeConstruct %mat3v4float %266 %271 %277
OpReturnValue %278
OpFunctionEnd
%166 = OpFunction %tint_GammaTransferParams None %280
%start_byte_offset_1 = OpFunctionParameter %uint
%281 = OpLabel
%282 = OpUDiv %uint %start_byte_offset_1 %uint_16
%283 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %282
%284 = OpBitwiseAnd %uint %start_byte_offset_1 %uint_15
%285 = OpShiftRightLogical %uint %284 %uint_2
%286 = OpLoad %v4uint %283 None
%287 = OpVectorExtractDynamic %uint %286 %285
%288 = OpBitcast %float %287
%289 = OpIAdd %uint %uint_4 %start_byte_offset_1
%290 = OpUDiv %uint %289 %uint_16
%291 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %290
%292 = OpBitwiseAnd %uint %289 %uint_15
%293 = OpShiftRightLogical %uint %292 %uint_2
%294 = OpLoad %v4uint %291 None
%295 = OpVectorExtractDynamic %uint %294 %293
%296 = OpBitcast %float %295
%297 = OpIAdd %uint %uint_8 %start_byte_offset_1
%299 = OpUDiv %uint %297 %uint_16
%300 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %299
%301 = OpBitwiseAnd %uint %297 %uint_15
%302 = OpShiftRightLogical %uint %301 %uint_2
%303 = OpLoad %v4uint %300 None
%304 = OpVectorExtractDynamic %uint %303 %302
%305 = OpBitcast %float %304
%306 = OpIAdd %uint %uint_12 %start_byte_offset_1
%308 = OpUDiv %uint %306 %uint_16
%309 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %308
%310 = OpBitwiseAnd %uint %306 %uint_15
%311 = OpShiftRightLogical %uint %310 %uint_2
%312 = OpLoad %v4uint %309 None
%313 = OpVectorExtractDynamic %uint %312 %311
%314 = OpBitcast %float %313
%315 = OpIAdd %uint %uint_16 %start_byte_offset_1
%316 = OpUDiv %uint %315 %uint_16
%317 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %316
%318 = OpBitwiseAnd %uint %315 %uint_15
%319 = OpShiftRightLogical %uint %318 %uint_2
%320 = OpLoad %v4uint %317 None
%321 = OpVectorExtractDynamic %uint %320 %319
%322 = OpBitcast %float %321
%323 = OpIAdd %uint %uint_20 %start_byte_offset_1
%325 = OpUDiv %uint %323 %uint_16
%326 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %325
%327 = OpBitwiseAnd %uint %323 %uint_15
%328 = OpShiftRightLogical %uint %327 %uint_2
%329 = OpLoad %v4uint %326 None
%330 = OpVectorExtractDynamic %uint %329 %328
%331 = OpBitcast %float %330
%332 = OpIAdd %uint %uint_24 %start_byte_offset_1
%334 = OpUDiv %uint %332 %uint_16
%335 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %334
%336 = OpBitwiseAnd %uint %332 %uint_15
%337 = OpShiftRightLogical %uint %336 %uint_2
%338 = OpLoad %v4uint %335 None
%339 = OpVectorExtractDynamic %uint %338 %337
%340 = OpBitcast %float %339
%341 = OpIAdd %uint %uint_28 %start_byte_offset_1
%343 = OpUDiv %uint %341 %uint_16
%344 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %343
%345 = OpBitwiseAnd %uint %341 %uint_15
%346 = OpShiftRightLogical %uint %345 %uint_2
%347 = OpLoad %v4uint %344 None
%348 = OpVectorExtractDynamic %uint %347 %346
%349 = OpCompositeConstruct %tint_GammaTransferParams %288 %296 %305 %314 %322 %331 %340 %348
OpReturnValue %349
OpFunctionEnd
%173 = OpFunction %mat3v3float None %351
%start_byte_offset_2 = OpFunctionParameter %uint
%352 = OpLabel
%353 = OpUDiv %uint %start_byte_offset_2 %uint_16
%354 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %353
%355 = OpLoad %v4uint %354 None
%356 = OpVectorShuffle %v3uint %355 %355 0 1 2
%358 = OpBitcast %v3float %356
%359 = OpIAdd %uint %uint_16 %start_byte_offset_2
%360 = OpUDiv %uint %359 %uint_16
%361 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %360
%362 = OpLoad %v4uint %361 None
%363 = OpVectorShuffle %v3uint %362 %362 0 1 2
%364 = OpBitcast %v3float %363
%365 = OpIAdd %uint %uint_32 %start_byte_offset_2
%366 = OpUDiv %uint %365 %uint_16
%367 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %366
%368 = OpLoad %v4uint %367 None
%369 = OpVectorShuffle %v3uint %368 %368 0 1 2
%370 = OpBitcast %v3float %369
%371 = OpCompositeConstruct %mat3v3float %358 %364 %370
OpReturnValue %371
OpFunctionEnd
%177 = OpFunction %mat3v2float None %373
%start_byte_offset_3 = OpFunctionParameter %uint
%374 = OpLabel
%375 = OpUDiv %uint %start_byte_offset_3 %uint_16
%376 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %375
%377 = OpLoad %v4uint %376 None
%378 = OpBitwiseAnd %uint %start_byte_offset_3 %uint_15
%379 = OpShiftRightLogical %uint %378 %uint_2
%380 = OpVectorShuffle %v2uint %377 %377 2 3
%381 = OpVectorShuffle %v2uint %377 %377 0 1
%382 = OpIEqual %bool %379 %uint_2
%383 = OpCompositeConstruct %v2bool %382 %382
%384 = OpSelect %v2uint %383 %380 %381
%385 = OpBitcast %v2float %384
%386 = OpIAdd %uint %uint_8 %start_byte_offset_3
%387 = OpUDiv %uint %386 %uint_16
%388 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %387
%389 = OpLoad %v4uint %388 None
%390 = OpBitwiseAnd %uint %386 %uint_15
%391 = OpShiftRightLogical %uint %390 %uint_2
%392 = OpVectorShuffle %v2uint %389 %389 2 3
%393 = OpVectorShuffle %v2uint %389 %389 0 1
%394 = OpIEqual %bool %391 %uint_2
%395 = OpCompositeConstruct %v2bool %394 %394
%396 = OpSelect %v2uint %395 %392 %393
%397 = OpBitcast %v2float %396
%398 = OpIAdd %uint %uint_16 %start_byte_offset_3
%399 = OpUDiv %uint %398 %uint_16
%400 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %399
%401 = OpLoad %v4uint %400 None
%402 = OpBitwiseAnd %uint %398 %uint_15
%403 = OpShiftRightLogical %uint %402 %uint_2
%404 = OpVectorShuffle %v2uint %401 %401 2 3
%405 = OpVectorShuffle %v2uint %401 %401 0 1
%406 = OpIEqual %bool %403 %uint_2
%407 = OpCompositeConstruct %v2bool %406 %406
%408 = OpSelect %v2uint %407 %404 %405
%409 = OpBitcast %v2float %408
%410 = OpCompositeConstruct %mat3v2float %385 %397 %409
OpReturnValue %410
OpFunctionEnd
%vertex_main = OpFunction %void None %49
%412 = OpLabel
%413 = OpFunctionCall %v4float %vertex_main_inner
OpStore %vertex_main_position_Output %413 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: 405
; 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_GammaTransferParams 0 "G"
OpMemberName %tint_GammaTransferParams 1 "A"
OpMemberName %tint_GammaTransferParams 2 "B"
OpMemberName %tint_GammaTransferParams 3 "C"
OpMemberName %tint_GammaTransferParams 4 "D"
OpMemberName %tint_GammaTransferParams 5 "E"
OpMemberName %tint_GammaTransferParams 6 "F"
OpMemberName %tint_GammaTransferParams 7 "padding"
OpName %tint_GammaTransferParams "tint_GammaTransferParams"
OpMemberName %tint_ExternalTextureParams 3 "gammaDecodeParams"
OpMemberName %tint_ExternalTextureParams 4 "gammaEncodeParams"
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_GammaCorrection "tint_GammaCorrection"
OpName %v "v"
OpName %params_0 "params"
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_GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
%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_GammaTransferParams %tint_GammaTransferParams %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
%106 = OpTypeFunction %v3float %v3float %tint_GammaTransferParams
%v3bool = OpTypeVector %bool 3
%134 = 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
%255 = OpTypeFunction %mat3v4float %uint
%uint_32 = OpConstant %uint 32
%274 = OpTypeFunction %tint_GammaTransferParams %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
%345 = OpTypeFunction %mat3v3float %uint
%v3uint = OpTypeVector %uint 3
%367 = 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_GammaTransferParams %params 3
%99 = OpCompositeExtract %tint_GammaTransferParams %params 4
%100 = OpCompositeExtract %mat3v3float %params 5
%101 = OpFunctionCall %v3float %tint_GammaCorrection %78 %98
%103 = OpMatrixTimesVector %v3float %100 %101
%88 = OpFunctionCall %v3float %tint_GammaCorrection %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_GammaCorrection = OpFunction %v3float None %106
%v = OpFunctionParameter %v3float
%params_0 = OpFunctionParameter %tint_GammaTransferParams
%107 = OpLabel
%108 = OpCompositeExtract %float %params_0 0
%109 = OpCompositeExtract %float %params_0 1
%110 = OpCompositeExtract %float %params_0 2
%111 = OpCompositeExtract %float %params_0 3
%112 = OpCompositeExtract %float %params_0 4
%113 = OpCompositeExtract %float %params_0 5
%114 = OpCompositeExtract %float %params_0 6
%115 = OpCompositeConstruct %v3float %108 %108 %108
%116 = OpCompositeConstruct %v3float %112 %112 %112
%117 = OpExtInst %v3float %40 FAbs %v
%118 = OpExtInst %v3float %40 FSign %v
%119 = OpFOrdLessThan %v3bool %117 %116
%121 = OpVectorTimesScalar %v3float %117 %111
%122 = OpCompositeConstruct %v3float %114 %114 %114
%123 = OpFAdd %v3float %121 %122
%124 = OpFMul %v3float %118 %123
%125 = OpVectorTimesScalar %v3float %117 %109
%126 = OpCompositeConstruct %v3float %110 %110 %110
%127 = OpFAdd %v3float %125 %126
%128 = OpExtInst %v3float %40 Pow %127 %115
%129 = OpCompositeConstruct %v3float %113 %113 %113
%130 = OpFAdd %v3float %128 %129
%131 = OpFMul %v3float %118 %130
%132 = OpSelect %v3float %119 %124 %131
OpReturnValue %132
OpFunctionEnd
%31 = OpFunction %tint_ExternalTextureParams None %134
%start_byte_offset = OpFunctionParameter %uint
%135 = OpLabel
%136 = OpUDiv %uint %start_byte_offset %uint_16
%138 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %136
%140 = OpBitwiseAnd %uint %start_byte_offset %uint_15
%142 = OpShiftRightLogical %uint %140 %uint_2
%144 = OpLoad %v4uint %138 None
%145 = OpVectorExtractDynamic %uint %144 %142
%146 = OpIAdd %uint %uint_4 %start_byte_offset
%148 = OpUDiv %uint %146 %uint_16
%149 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %148
%150 = OpBitwiseAnd %uint %146 %uint_15
%151 = OpShiftRightLogical %uint %150 %uint_2
%152 = OpLoad %v4uint %149 None
%153 = OpVectorExtractDynamic %uint %152 %151
%154 = OpIAdd %uint %uint_16 %start_byte_offset
%155 = OpFunctionCall %mat3v4float %156 %154
%157 = OpIAdd %uint %uint_64 %start_byte_offset
%159 = OpFunctionCall %tint_GammaTransferParams %160 %157
%161 = OpIAdd %uint %uint_96 %start_byte_offset
%163 = OpFunctionCall %tint_GammaTransferParams %160 %161
%164 = OpIAdd %uint %uint_128 %start_byte_offset
%166 = OpFunctionCall %mat3v3float %167 %164
%168 = OpIAdd %uint %uint_176 %start_byte_offset
%170 = OpFunctionCall %mat3v2float %171 %168
%172 = OpIAdd %uint %uint_200 %start_byte_offset
%174 = OpFunctionCall %mat3v2float %171 %172
%175 = OpIAdd %uint %uint_224 %start_byte_offset
%177 = OpUDiv %uint %175 %uint_16
%178 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %177
%179 = OpLoad %v4uint %178 None
%180 = OpBitwiseAnd %uint %175 %uint_15
%181 = OpShiftRightLogical %uint %180 %uint_2
%182 = OpVectorShuffle %v2uint %179 %179 2 3
%183 = OpVectorShuffle %v2uint %179 %179 0 1
%184 = OpIEqual %bool %181 %uint_2
%186 = OpCompositeConstruct %v2bool %184 %184
%187 = OpSelect %v2uint %186 %182 %183
%188 = OpBitcast %v2float %187
%189 = OpIAdd %uint %uint_232 %start_byte_offset
%191 = OpUDiv %uint %189 %uint_16
%192 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %191
%193 = OpLoad %v4uint %192 None
%194 = OpBitwiseAnd %uint %189 %uint_15
%195 = OpShiftRightLogical %uint %194 %uint_2
%196 = OpVectorShuffle %v2uint %193 %193 2 3
%197 = OpVectorShuffle %v2uint %193 %193 0 1
%198 = OpIEqual %bool %195 %uint_2
%199 = OpCompositeConstruct %v2bool %198 %198
%200 = OpSelect %v2uint %199 %196 %197
%201 = OpBitcast %v2float %200
%202 = OpIAdd %uint %uint_240 %start_byte_offset
%204 = OpUDiv %uint %202 %uint_16
%205 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %204
%206 = OpLoad %v4uint %205 None
%207 = OpBitwiseAnd %uint %202 %uint_15
%208 = OpShiftRightLogical %uint %207 %uint_2
%209 = OpVectorShuffle %v2uint %206 %206 2 3
%210 = OpVectorShuffle %v2uint %206 %206 0 1
%211 = OpIEqual %bool %208 %uint_2
%212 = OpCompositeConstruct %v2bool %211 %211
%213 = OpSelect %v2uint %212 %209 %210
%214 = OpBitcast %v2float %213
%215 = OpIAdd %uint %uint_248 %start_byte_offset
%217 = OpUDiv %uint %215 %uint_16
%218 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %217
%219 = OpLoad %v4uint %218 None
%220 = OpBitwiseAnd %uint %215 %uint_15
%221 = OpShiftRightLogical %uint %220 %uint_2
%222 = OpVectorShuffle %v2uint %219 %219 2 3
%223 = OpVectorShuffle %v2uint %219 %219 0 1
%224 = OpIEqual %bool %221 %uint_2
%225 = OpCompositeConstruct %v2bool %224 %224
%226 = OpSelect %v2uint %225 %222 %223
%227 = OpBitcast %v2float %226
%228 = OpIAdd %uint %uint_256 %start_byte_offset
%230 = OpUDiv %uint %228 %uint_16
%231 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %230
%232 = OpLoad %v4uint %231 None
%233 = OpBitwiseAnd %uint %228 %uint_15
%234 = OpShiftRightLogical %uint %233 %uint_2
%235 = OpVectorShuffle %v2uint %232 %232 2 3
%236 = OpVectorShuffle %v2uint %232 %232 0 1
%237 = OpIEqual %bool %234 %uint_2
%238 = OpCompositeConstruct %v2bool %237 %237
%239 = OpSelect %v2uint %238 %235 %236
%240 = OpIAdd %uint %uint_264 %start_byte_offset
%242 = OpUDiv %uint %240 %uint_16
%243 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %242
%244 = OpLoad %v4uint %243 None
%245 = OpBitwiseAnd %uint %240 %uint_15
%246 = OpShiftRightLogical %uint %245 %uint_2
%247 = OpVectorShuffle %v2uint %244 %244 2 3
%248 = OpVectorShuffle %v2uint %244 %244 0 1
%249 = OpIEqual %bool %246 %uint_2
%250 = OpCompositeConstruct %v2bool %249 %249
%251 = OpSelect %v2uint %250 %247 %248
%252 = OpBitcast %v2float %251
%253 = OpCompositeConstruct %tint_ExternalTextureParams %145 %153 %155 %159 %163 %166 %170 %174 %188 %201 %214 %227 %239 %252
OpReturnValue %253
OpFunctionEnd
%156 = OpFunction %mat3v4float None %255
%start_byte_offset_0 = OpFunctionParameter %uint
%256 = OpLabel
%257 = OpUDiv %uint %start_byte_offset_0 %uint_16
%258 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %257
%259 = OpLoad %v4uint %258 None
%260 = OpBitcast %v4float %259
%261 = OpIAdd %uint %uint_16 %start_byte_offset_0
%262 = OpUDiv %uint %261 %uint_16
%263 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %262
%264 = OpLoad %v4uint %263 None
%265 = OpBitcast %v4float %264
%266 = OpIAdd %uint %uint_32 %start_byte_offset_0
%268 = OpUDiv %uint %266 %uint_16
%269 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %268
%270 = OpLoad %v4uint %269 None
%271 = OpBitcast %v4float %270
%272 = OpCompositeConstruct %mat3v4float %260 %265 %271
OpReturnValue %272
OpFunctionEnd
%160 = OpFunction %tint_GammaTransferParams None %274
%start_byte_offset_1 = OpFunctionParameter %uint
%275 = OpLabel
%276 = OpUDiv %uint %start_byte_offset_1 %uint_16
%277 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %276
%278 = OpBitwiseAnd %uint %start_byte_offset_1 %uint_15
%279 = OpShiftRightLogical %uint %278 %uint_2
%280 = OpLoad %v4uint %277 None
%281 = OpVectorExtractDynamic %uint %280 %279
%282 = OpBitcast %float %281
%283 = OpIAdd %uint %uint_4 %start_byte_offset_1
%284 = OpUDiv %uint %283 %uint_16
%285 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %284
%286 = OpBitwiseAnd %uint %283 %uint_15
%287 = OpShiftRightLogical %uint %286 %uint_2
%288 = OpLoad %v4uint %285 None
%289 = OpVectorExtractDynamic %uint %288 %287
%290 = OpBitcast %float %289
%291 = OpIAdd %uint %uint_8 %start_byte_offset_1
%293 = OpUDiv %uint %291 %uint_16
%294 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %293
%295 = OpBitwiseAnd %uint %291 %uint_15
%296 = OpShiftRightLogical %uint %295 %uint_2
%297 = OpLoad %v4uint %294 None
%298 = OpVectorExtractDynamic %uint %297 %296
%299 = OpBitcast %float %298
%300 = OpIAdd %uint %uint_12 %start_byte_offset_1
%302 = OpUDiv %uint %300 %uint_16
%303 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %302
%304 = OpBitwiseAnd %uint %300 %uint_15
%305 = OpShiftRightLogical %uint %304 %uint_2
%306 = OpLoad %v4uint %303 None
%307 = OpVectorExtractDynamic %uint %306 %305
%308 = OpBitcast %float %307
%309 = OpIAdd %uint %uint_16 %start_byte_offset_1
%310 = OpUDiv %uint %309 %uint_16
%311 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %310
%312 = OpBitwiseAnd %uint %309 %uint_15
%313 = OpShiftRightLogical %uint %312 %uint_2
%314 = OpLoad %v4uint %311 None
%315 = OpVectorExtractDynamic %uint %314 %313
%316 = OpBitcast %float %315
%317 = OpIAdd %uint %uint_20 %start_byte_offset_1
%319 = OpUDiv %uint %317 %uint_16
%320 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %319
%321 = OpBitwiseAnd %uint %317 %uint_15
%322 = OpShiftRightLogical %uint %321 %uint_2
%323 = OpLoad %v4uint %320 None
%324 = OpVectorExtractDynamic %uint %323 %322
%325 = OpBitcast %float %324
%326 = OpIAdd %uint %uint_24 %start_byte_offset_1
%328 = OpUDiv %uint %326 %uint_16
%329 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %328
%330 = OpBitwiseAnd %uint %326 %uint_15
%331 = OpShiftRightLogical %uint %330 %uint_2
%332 = OpLoad %v4uint %329 None
%333 = OpVectorExtractDynamic %uint %332 %331
%334 = OpBitcast %float %333
%335 = OpIAdd %uint %uint_28 %start_byte_offset_1
%337 = OpUDiv %uint %335 %uint_16
%338 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %337
%339 = OpBitwiseAnd %uint %335 %uint_15
%340 = OpShiftRightLogical %uint %339 %uint_2
%341 = OpLoad %v4uint %338 None
%342 = OpVectorExtractDynamic %uint %341 %340
%343 = OpCompositeConstruct %tint_GammaTransferParams %282 %290 %299 %308 %316 %325 %334 %342
OpReturnValue %343
OpFunctionEnd
%167 = OpFunction %mat3v3float None %345
%start_byte_offset_2 = OpFunctionParameter %uint
%346 = OpLabel
%347 = OpUDiv %uint %start_byte_offset_2 %uint_16
%348 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %347
%349 = OpLoad %v4uint %348 None
%350 = OpVectorShuffle %v3uint %349 %349 0 1 2
%352 = OpBitcast %v3float %350
%353 = OpIAdd %uint %uint_16 %start_byte_offset_2
%354 = OpUDiv %uint %353 %uint_16
%355 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %354
%356 = OpLoad %v4uint %355 None
%357 = OpVectorShuffle %v3uint %356 %356 0 1 2
%358 = OpBitcast %v3float %357
%359 = OpIAdd %uint %uint_32 %start_byte_offset_2
%360 = OpUDiv %uint %359 %uint_16
%361 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %360
%362 = OpLoad %v4uint %361 None
%363 = OpVectorShuffle %v3uint %362 %362 0 1 2
%364 = OpBitcast %v3float %363
%365 = OpCompositeConstruct %mat3v3float %352 %358 %364
OpReturnValue %365
OpFunctionEnd
%171 = OpFunction %mat3v2float None %367
%start_byte_offset_3 = OpFunctionParameter %uint
%368 = OpLabel
%369 = OpUDiv %uint %start_byte_offset_3 %uint_16
%370 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %369
%371 = OpLoad %v4uint %370 None
%372 = OpBitwiseAnd %uint %start_byte_offset_3 %uint_15
%373 = OpShiftRightLogical %uint %372 %uint_2
%374 = OpVectorShuffle %v2uint %371 %371 2 3
%375 = OpVectorShuffle %v2uint %371 %371 0 1
%376 = OpIEqual %bool %373 %uint_2
%377 = OpCompositeConstruct %v2bool %376 %376
%378 = OpSelect %v2uint %377 %374 %375
%379 = OpBitcast %v2float %378
%380 = OpIAdd %uint %uint_8 %start_byte_offset_3
%381 = OpUDiv %uint %380 %uint_16
%382 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %381
%383 = OpLoad %v4uint %382 None
%384 = OpBitwiseAnd %uint %380 %uint_15
%385 = OpShiftRightLogical %uint %384 %uint_2
%386 = OpVectorShuffle %v2uint %383 %383 2 3
%387 = OpVectorShuffle %v2uint %383 %383 0 1
%388 = OpIEqual %bool %385 %uint_2
%389 = OpCompositeConstruct %v2bool %388 %388
%390 = OpSelect %v2uint %389 %386 %387
%391 = OpBitcast %v2float %390
%392 = OpIAdd %uint %uint_16 %start_byte_offset_3
%393 = OpUDiv %uint %392 %uint_16
%394 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %393
%395 = OpLoad %v4uint %394 None
%396 = OpBitwiseAnd %uint %392 %uint_15
%397 = OpShiftRightLogical %uint %396 %uint_2
%398 = OpVectorShuffle %v2uint %395 %395 2 3
%399 = OpVectorShuffle %v2uint %395 %395 0 1
%400 = OpIEqual %bool %397 %uint_2
%401 = OpCompositeConstruct %v2bool %400 %400
%402 = OpSelect %v2uint %401 %398 %399
%403 = OpBitcast %v2float %402
%404 = OpCompositeConstruct %mat3v2float %379 %391 %403
OpReturnValue %404
OpFunctionEnd
;
; compute_main
;
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 1
; Bound: 405
; 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_GammaTransferParams 0 "G"
OpMemberName %tint_GammaTransferParams 1 "A"
OpMemberName %tint_GammaTransferParams 2 "B"
OpMemberName %tint_GammaTransferParams 3 "C"
OpMemberName %tint_GammaTransferParams 4 "D"
OpMemberName %tint_GammaTransferParams 5 "E"
OpMemberName %tint_GammaTransferParams 6 "F"
OpMemberName %tint_GammaTransferParams 7 "padding"
OpName %tint_GammaTransferParams "tint_GammaTransferParams"
OpMemberName %tint_ExternalTextureParams 3 "gammaDecodeParams"
OpMemberName %tint_ExternalTextureParams 4 "gammaEncodeParams"
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_GammaCorrection "tint_GammaCorrection"
OpName %v "v"
OpName %params_0 "params"
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_GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
%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_GammaTransferParams %tint_GammaTransferParams %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
%106 = OpTypeFunction %v3float %v3float %tint_GammaTransferParams
%v3bool = OpTypeVector %bool 3
%134 = 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
%255 = OpTypeFunction %mat3v4float %uint
%uint_32 = OpConstant %uint 32
%274 = OpTypeFunction %tint_GammaTransferParams %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
%345 = OpTypeFunction %mat3v3float %uint
%v3uint = OpTypeVector %uint 3
%367 = 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_GammaTransferParams %params 3
%99 = OpCompositeExtract %tint_GammaTransferParams %params 4
%100 = OpCompositeExtract %mat3v3float %params 5
%101 = OpFunctionCall %v3float %tint_GammaCorrection %78 %98
%103 = OpMatrixTimesVector %v3float %100 %101
%88 = OpFunctionCall %v3float %tint_GammaCorrection %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_GammaCorrection = OpFunction %v3float None %106
%v = OpFunctionParameter %v3float
%params_0 = OpFunctionParameter %tint_GammaTransferParams
%107 = OpLabel
%108 = OpCompositeExtract %float %params_0 0
%109 = OpCompositeExtract %float %params_0 1
%110 = OpCompositeExtract %float %params_0 2
%111 = OpCompositeExtract %float %params_0 3
%112 = OpCompositeExtract %float %params_0 4
%113 = OpCompositeExtract %float %params_0 5
%114 = OpCompositeExtract %float %params_0 6
%115 = OpCompositeConstruct %v3float %108 %108 %108
%116 = OpCompositeConstruct %v3float %112 %112 %112
%117 = OpExtInst %v3float %40 FAbs %v
%118 = OpExtInst %v3float %40 FSign %v
%119 = OpFOrdLessThan %v3bool %117 %116
%121 = OpVectorTimesScalar %v3float %117 %111
%122 = OpCompositeConstruct %v3float %114 %114 %114
%123 = OpFAdd %v3float %121 %122
%124 = OpFMul %v3float %118 %123
%125 = OpVectorTimesScalar %v3float %117 %109
%126 = OpCompositeConstruct %v3float %110 %110 %110
%127 = OpFAdd %v3float %125 %126
%128 = OpExtInst %v3float %40 Pow %127 %115
%129 = OpCompositeConstruct %v3float %113 %113 %113
%130 = OpFAdd %v3float %128 %129
%131 = OpFMul %v3float %118 %130
%132 = OpSelect %v3float %119 %124 %131
OpReturnValue %132
OpFunctionEnd
%31 = OpFunction %tint_ExternalTextureParams None %134
%start_byte_offset = OpFunctionParameter %uint
%135 = OpLabel
%136 = OpUDiv %uint %start_byte_offset %uint_16
%138 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %136
%140 = OpBitwiseAnd %uint %start_byte_offset %uint_15
%142 = OpShiftRightLogical %uint %140 %uint_2
%144 = OpLoad %v4uint %138 None
%145 = OpVectorExtractDynamic %uint %144 %142
%146 = OpIAdd %uint %uint_4 %start_byte_offset
%148 = OpUDiv %uint %146 %uint_16
%149 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %148
%150 = OpBitwiseAnd %uint %146 %uint_15
%151 = OpShiftRightLogical %uint %150 %uint_2
%152 = OpLoad %v4uint %149 None
%153 = OpVectorExtractDynamic %uint %152 %151
%154 = OpIAdd %uint %uint_16 %start_byte_offset
%155 = OpFunctionCall %mat3v4float %156 %154
%157 = OpIAdd %uint %uint_64 %start_byte_offset
%159 = OpFunctionCall %tint_GammaTransferParams %160 %157
%161 = OpIAdd %uint %uint_96 %start_byte_offset
%163 = OpFunctionCall %tint_GammaTransferParams %160 %161
%164 = OpIAdd %uint %uint_128 %start_byte_offset
%166 = OpFunctionCall %mat3v3float %167 %164
%168 = OpIAdd %uint %uint_176 %start_byte_offset
%170 = OpFunctionCall %mat3v2float %171 %168
%172 = OpIAdd %uint %uint_200 %start_byte_offset
%174 = OpFunctionCall %mat3v2float %171 %172
%175 = OpIAdd %uint %uint_224 %start_byte_offset
%177 = OpUDiv %uint %175 %uint_16
%178 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %177
%179 = OpLoad %v4uint %178 None
%180 = OpBitwiseAnd %uint %175 %uint_15
%181 = OpShiftRightLogical %uint %180 %uint_2
%182 = OpVectorShuffle %v2uint %179 %179 2 3
%183 = OpVectorShuffle %v2uint %179 %179 0 1
%184 = OpIEqual %bool %181 %uint_2
%186 = OpCompositeConstruct %v2bool %184 %184
%187 = OpSelect %v2uint %186 %182 %183
%188 = OpBitcast %v2float %187
%189 = OpIAdd %uint %uint_232 %start_byte_offset
%191 = OpUDiv %uint %189 %uint_16
%192 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %191
%193 = OpLoad %v4uint %192 None
%194 = OpBitwiseAnd %uint %189 %uint_15
%195 = OpShiftRightLogical %uint %194 %uint_2
%196 = OpVectorShuffle %v2uint %193 %193 2 3
%197 = OpVectorShuffle %v2uint %193 %193 0 1
%198 = OpIEqual %bool %195 %uint_2
%199 = OpCompositeConstruct %v2bool %198 %198
%200 = OpSelect %v2uint %199 %196 %197
%201 = OpBitcast %v2float %200
%202 = OpIAdd %uint %uint_240 %start_byte_offset
%204 = OpUDiv %uint %202 %uint_16
%205 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %204
%206 = OpLoad %v4uint %205 None
%207 = OpBitwiseAnd %uint %202 %uint_15
%208 = OpShiftRightLogical %uint %207 %uint_2
%209 = OpVectorShuffle %v2uint %206 %206 2 3
%210 = OpVectorShuffle %v2uint %206 %206 0 1
%211 = OpIEqual %bool %208 %uint_2
%212 = OpCompositeConstruct %v2bool %211 %211
%213 = OpSelect %v2uint %212 %209 %210
%214 = OpBitcast %v2float %213
%215 = OpIAdd %uint %uint_248 %start_byte_offset
%217 = OpUDiv %uint %215 %uint_16
%218 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %217
%219 = OpLoad %v4uint %218 None
%220 = OpBitwiseAnd %uint %215 %uint_15
%221 = OpShiftRightLogical %uint %220 %uint_2
%222 = OpVectorShuffle %v2uint %219 %219 2 3
%223 = OpVectorShuffle %v2uint %219 %219 0 1
%224 = OpIEqual %bool %221 %uint_2
%225 = OpCompositeConstruct %v2bool %224 %224
%226 = OpSelect %v2uint %225 %222 %223
%227 = OpBitcast %v2float %226
%228 = OpIAdd %uint %uint_256 %start_byte_offset
%230 = OpUDiv %uint %228 %uint_16
%231 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %230
%232 = OpLoad %v4uint %231 None
%233 = OpBitwiseAnd %uint %228 %uint_15
%234 = OpShiftRightLogical %uint %233 %uint_2
%235 = OpVectorShuffle %v2uint %232 %232 2 3
%236 = OpVectorShuffle %v2uint %232 %232 0 1
%237 = OpIEqual %bool %234 %uint_2
%238 = OpCompositeConstruct %v2bool %237 %237
%239 = OpSelect %v2uint %238 %235 %236
%240 = OpIAdd %uint %uint_264 %start_byte_offset
%242 = OpUDiv %uint %240 %uint_16
%243 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %242
%244 = OpLoad %v4uint %243 None
%245 = OpBitwiseAnd %uint %240 %uint_15
%246 = OpShiftRightLogical %uint %245 %uint_2
%247 = OpVectorShuffle %v2uint %244 %244 2 3
%248 = OpVectorShuffle %v2uint %244 %244 0 1
%249 = OpIEqual %bool %246 %uint_2
%250 = OpCompositeConstruct %v2bool %249 %249
%251 = OpSelect %v2uint %250 %247 %248
%252 = OpBitcast %v2float %251
%253 = OpCompositeConstruct %tint_ExternalTextureParams %145 %153 %155 %159 %163 %166 %170 %174 %188 %201 %214 %227 %239 %252
OpReturnValue %253
OpFunctionEnd
%156 = OpFunction %mat3v4float None %255
%start_byte_offset_0 = OpFunctionParameter %uint
%256 = OpLabel
%257 = OpUDiv %uint %start_byte_offset_0 %uint_16
%258 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %257
%259 = OpLoad %v4uint %258 None
%260 = OpBitcast %v4float %259
%261 = OpIAdd %uint %uint_16 %start_byte_offset_0
%262 = OpUDiv %uint %261 %uint_16
%263 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %262
%264 = OpLoad %v4uint %263 None
%265 = OpBitcast %v4float %264
%266 = OpIAdd %uint %uint_32 %start_byte_offset_0
%268 = OpUDiv %uint %266 %uint_16
%269 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %268
%270 = OpLoad %v4uint %269 None
%271 = OpBitcast %v4float %270
%272 = OpCompositeConstruct %mat3v4float %260 %265 %271
OpReturnValue %272
OpFunctionEnd
%160 = OpFunction %tint_GammaTransferParams None %274
%start_byte_offset_1 = OpFunctionParameter %uint
%275 = OpLabel
%276 = OpUDiv %uint %start_byte_offset_1 %uint_16
%277 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %276
%278 = OpBitwiseAnd %uint %start_byte_offset_1 %uint_15
%279 = OpShiftRightLogical %uint %278 %uint_2
%280 = OpLoad %v4uint %277 None
%281 = OpVectorExtractDynamic %uint %280 %279
%282 = OpBitcast %float %281
%283 = OpIAdd %uint %uint_4 %start_byte_offset_1
%284 = OpUDiv %uint %283 %uint_16
%285 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %284
%286 = OpBitwiseAnd %uint %283 %uint_15
%287 = OpShiftRightLogical %uint %286 %uint_2
%288 = OpLoad %v4uint %285 None
%289 = OpVectorExtractDynamic %uint %288 %287
%290 = OpBitcast %float %289
%291 = OpIAdd %uint %uint_8 %start_byte_offset_1
%293 = OpUDiv %uint %291 %uint_16
%294 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %293
%295 = OpBitwiseAnd %uint %291 %uint_15
%296 = OpShiftRightLogical %uint %295 %uint_2
%297 = OpLoad %v4uint %294 None
%298 = OpVectorExtractDynamic %uint %297 %296
%299 = OpBitcast %float %298
%300 = OpIAdd %uint %uint_12 %start_byte_offset_1
%302 = OpUDiv %uint %300 %uint_16
%303 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %302
%304 = OpBitwiseAnd %uint %300 %uint_15
%305 = OpShiftRightLogical %uint %304 %uint_2
%306 = OpLoad %v4uint %303 None
%307 = OpVectorExtractDynamic %uint %306 %305
%308 = OpBitcast %float %307
%309 = OpIAdd %uint %uint_16 %start_byte_offset_1
%310 = OpUDiv %uint %309 %uint_16
%311 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %310
%312 = OpBitwiseAnd %uint %309 %uint_15
%313 = OpShiftRightLogical %uint %312 %uint_2
%314 = OpLoad %v4uint %311 None
%315 = OpVectorExtractDynamic %uint %314 %313
%316 = OpBitcast %float %315
%317 = OpIAdd %uint %uint_20 %start_byte_offset_1
%319 = OpUDiv %uint %317 %uint_16
%320 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %319
%321 = OpBitwiseAnd %uint %317 %uint_15
%322 = OpShiftRightLogical %uint %321 %uint_2
%323 = OpLoad %v4uint %320 None
%324 = OpVectorExtractDynamic %uint %323 %322
%325 = OpBitcast %float %324
%326 = OpIAdd %uint %uint_24 %start_byte_offset_1
%328 = OpUDiv %uint %326 %uint_16
%329 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %328
%330 = OpBitwiseAnd %uint %326 %uint_15
%331 = OpShiftRightLogical %uint %330 %uint_2
%332 = OpLoad %v4uint %329 None
%333 = OpVectorExtractDynamic %uint %332 %331
%334 = OpBitcast %float %333
%335 = OpIAdd %uint %uint_28 %start_byte_offset_1
%337 = OpUDiv %uint %335 %uint_16
%338 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %337
%339 = OpBitwiseAnd %uint %335 %uint_15
%340 = OpShiftRightLogical %uint %339 %uint_2
%341 = OpLoad %v4uint %338 None
%342 = OpVectorExtractDynamic %uint %341 %340
%343 = OpCompositeConstruct %tint_GammaTransferParams %282 %290 %299 %308 %316 %325 %334 %342
OpReturnValue %343
OpFunctionEnd
%167 = OpFunction %mat3v3float None %345
%start_byte_offset_2 = OpFunctionParameter %uint
%346 = OpLabel
%347 = OpUDiv %uint %start_byte_offset_2 %uint_16
%348 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %347
%349 = OpLoad %v4uint %348 None
%350 = OpVectorShuffle %v3uint %349 %349 0 1 2
%352 = OpBitcast %v3float %350
%353 = OpIAdd %uint %uint_16 %start_byte_offset_2
%354 = OpUDiv %uint %353 %uint_16
%355 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %354
%356 = OpLoad %v4uint %355 None
%357 = OpVectorShuffle %v3uint %356 %356 0 1 2
%358 = OpBitcast %v3float %357
%359 = OpIAdd %uint %uint_32 %start_byte_offset_2
%360 = OpUDiv %uint %359 %uint_16
%361 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %360
%362 = OpLoad %v4uint %361 None
%363 = OpVectorShuffle %v3uint %362 %362 0 1 2
%364 = OpBitcast %v3float %363
%365 = OpCompositeConstruct %mat3v3float %352 %358 %364
OpReturnValue %365
OpFunctionEnd
%171 = OpFunction %mat3v2float None %367
%start_byte_offset_3 = OpFunctionParameter %uint
%368 = OpLabel
%369 = OpUDiv %uint %start_byte_offset_3 %uint_16
%370 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %369
%371 = OpLoad %v4uint %370 None
%372 = OpBitwiseAnd %uint %start_byte_offset_3 %uint_15
%373 = OpShiftRightLogical %uint %372 %uint_2
%374 = OpVectorShuffle %v2uint %371 %371 2 3
%375 = OpVectorShuffle %v2uint %371 %371 0 1
%376 = OpIEqual %bool %373 %uint_2
%377 = OpCompositeConstruct %v2bool %376 %376
%378 = OpSelect %v2uint %377 %374 %375
%379 = OpBitcast %v2float %378
%380 = OpIAdd %uint %uint_8 %start_byte_offset_3
%381 = OpUDiv %uint %380 %uint_16
%382 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %381
%383 = OpLoad %v4uint %382 None
%384 = OpBitwiseAnd %uint %380 %uint_15
%385 = OpShiftRightLogical %uint %384 %uint_2
%386 = OpVectorShuffle %v2uint %383 %383 2 3
%387 = OpVectorShuffle %v2uint %383 %383 0 1
%388 = OpIEqual %bool %385 %uint_2
%389 = OpCompositeConstruct %v2bool %388 %388
%390 = OpSelect %v2uint %389 %386 %387
%391 = OpBitcast %v2float %390
%392 = OpIAdd %uint %uint_16 %start_byte_offset_3
%393 = OpUDiv %uint %392 %uint_16
%394 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %393
%395 = OpLoad %v4uint %394 None
%396 = OpBitwiseAnd %uint %392 %uint_15
%397 = OpShiftRightLogical %uint %396 %uint_2
%398 = OpVectorShuffle %v2uint %395 %395 2 3
%399 = OpVectorShuffle %v2uint %395 %395 0 1
%400 = OpIEqual %bool %397 %uint_2
%401 = OpCompositeConstruct %v2bool %400 %400
%402 = OpSelect %v2uint %401 %398 %399
%403 = OpBitcast %v2float %402
%404 = OpCompositeConstruct %mat3v2float %379 %391 %403
OpReturnValue %404
OpFunctionEnd