| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 0 |
| ; Bound: 256 |
| ; Schema: 0 |
| OpCapability Shader |
| OpCapability ImageQuery |
| %47 = OpExtInstImport "GLSL.std.450" |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint GLCompute %main "main" |
| OpExecutionMode %main LocalSize 1 1 1 |
| OpName %ext_tex_plane_1 "ext_tex_plane_1" |
| OpName %ext_tex_params_block_std140 "ext_tex_params_block_std140" |
| OpMemberName %ext_tex_params_block_std140 0 "inner" |
| OpName %ExternalTextureParams_std140 "ExternalTextureParams_std140" |
| OpMemberName %ExternalTextureParams_std140 0 "numPlanes" |
| OpMemberName %ExternalTextureParams_std140 1 "doYuvToRgbConversionOnly" |
| OpMemberName %ExternalTextureParams_std140 2 "yuvToRgbConversionMatrix" |
| OpMemberName %ExternalTextureParams_std140 3 "gammaDecodeParams" |
| OpName %GammaTransferParams "GammaTransferParams" |
| OpMemberName %GammaTransferParams 0 "G" |
| OpMemberName %GammaTransferParams 1 "A" |
| OpMemberName %GammaTransferParams 2 "B" |
| OpMemberName %GammaTransferParams 3 "C" |
| OpMemberName %GammaTransferParams 4 "D" |
| OpMemberName %GammaTransferParams 5 "E" |
| OpMemberName %GammaTransferParams 6 "F" |
| OpMemberName %GammaTransferParams 7 "padding" |
| OpMemberName %ExternalTextureParams_std140 4 "gammaEncodeParams" |
| OpMemberName %ExternalTextureParams_std140 5 "gamutConversionMatrix" |
| OpMemberName %ExternalTextureParams_std140 6 "coordTransformationMatrix_0" |
| OpMemberName %ExternalTextureParams_std140 7 "coordTransformationMatrix_1" |
| OpMemberName %ExternalTextureParams_std140 8 "coordTransformationMatrix_2" |
| OpMemberName %ExternalTextureParams_std140 9 "loadTransformationMatrix_0" |
| OpMemberName %ExternalTextureParams_std140 10 "loadTransformationMatrix_1" |
| OpMemberName %ExternalTextureParams_std140 11 "loadTransformationMatrix_2" |
| OpMemberName %ExternalTextureParams_std140 12 "samplePlane0RectMin" |
| OpMemberName %ExternalTextureParams_std140 13 "samplePlane0RectMax" |
| OpMemberName %ExternalTextureParams_std140 14 "samplePlane1RectMin" |
| OpMemberName %ExternalTextureParams_std140 15 "samplePlane1RectMax" |
| OpMemberName %ExternalTextureParams_std140 16 "displayVisibleRectMax" |
| OpMemberName %ExternalTextureParams_std140 17 "plane1CoordFactor" |
| OpName %ext_tex_params "ext_tex_params" |
| OpName %t "t" |
| OpName %outImage "outImage" |
| OpName %tint_ftou "tint_ftou" |
| OpName %v "v" |
| OpName %tint_clamp "tint_clamp" |
| OpName %e "e" |
| OpName %low "low" |
| OpName %high "high" |
| OpName %gammaCorrection "gammaCorrection" |
| OpName %v_0 "v" |
| OpName %params "params" |
| OpName %ExternalTextureParams "ExternalTextureParams" |
| OpMemberName %ExternalTextureParams 0 "numPlanes" |
| OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly" |
| OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix" |
| OpMemberName %ExternalTextureParams 3 "gammaDecodeParams" |
| OpMemberName %ExternalTextureParams 4 "gammaEncodeParams" |
| OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix" |
| OpMemberName %ExternalTextureParams 6 "coordTransformationMatrix" |
| OpMemberName %ExternalTextureParams 7 "loadTransformationMatrix" |
| OpMemberName %ExternalTextureParams 8 "samplePlane0RectMin" |
| OpMemberName %ExternalTextureParams 9 "samplePlane0RectMax" |
| OpMemberName %ExternalTextureParams 10 "samplePlane1RectMin" |
| OpMemberName %ExternalTextureParams 11 "samplePlane1RectMax" |
| OpMemberName %ExternalTextureParams 12 "displayVisibleRectMax" |
| OpMemberName %ExternalTextureParams 13 "plane1CoordFactor" |
| OpName %textureLoadExternal "textureLoadExternal" |
| OpName %plane0 "plane0" |
| OpName %plane1 "plane1" |
| OpName %coord "coord" |
| OpName %params_0 "params" |
| OpName %color "color" |
| OpName %conv_ExternalTextureParams "conv_ExternalTextureParams" |
| OpName %val "val" |
| OpName %main "main" |
| OpName %red "red" |
| OpName %green "green" |
| OpDecorate %ext_tex_plane_1 DescriptorSet 0 |
| OpDecorate %ext_tex_plane_1 Binding 2 |
| OpDecorate %ext_tex_params_block_std140 Block |
| OpMemberDecorate %ext_tex_params_block_std140 0 Offset 0 |
| OpMemberDecorate %ExternalTextureParams_std140 0 Offset 0 |
| OpMemberDecorate %ExternalTextureParams_std140 1 Offset 4 |
| OpMemberDecorate %ExternalTextureParams_std140 2 Offset 16 |
| OpMemberDecorate %ExternalTextureParams_std140 2 ColMajor |
| OpMemberDecorate %ExternalTextureParams_std140 2 MatrixStride 16 |
| OpMemberDecorate %ExternalTextureParams_std140 3 Offset 64 |
| OpMemberDecorate %GammaTransferParams 0 Offset 0 |
| OpMemberDecorate %GammaTransferParams 1 Offset 4 |
| OpMemberDecorate %GammaTransferParams 2 Offset 8 |
| OpMemberDecorate %GammaTransferParams 3 Offset 12 |
| OpMemberDecorate %GammaTransferParams 4 Offset 16 |
| OpMemberDecorate %GammaTransferParams 5 Offset 20 |
| OpMemberDecorate %GammaTransferParams 6 Offset 24 |
| OpMemberDecorate %GammaTransferParams 7 Offset 28 |
| OpMemberDecorate %ExternalTextureParams_std140 4 Offset 96 |
| OpMemberDecorate %ExternalTextureParams_std140 5 Offset 128 |
| OpMemberDecorate %ExternalTextureParams_std140 5 ColMajor |
| OpMemberDecorate %ExternalTextureParams_std140 5 MatrixStride 16 |
| OpMemberDecorate %ExternalTextureParams_std140 6 Offset 176 |
| OpMemberDecorate %ExternalTextureParams_std140 7 Offset 184 |
| OpMemberDecorate %ExternalTextureParams_std140 8 Offset 192 |
| OpMemberDecorate %ExternalTextureParams_std140 9 Offset 200 |
| OpMemberDecorate %ExternalTextureParams_std140 10 Offset 208 |
| OpMemberDecorate %ExternalTextureParams_std140 11 Offset 216 |
| OpMemberDecorate %ExternalTextureParams_std140 12 Offset 224 |
| OpMemberDecorate %ExternalTextureParams_std140 13 Offset 232 |
| OpMemberDecorate %ExternalTextureParams_std140 14 Offset 240 |
| OpMemberDecorate %ExternalTextureParams_std140 15 Offset 248 |
| OpMemberDecorate %ExternalTextureParams_std140 16 Offset 256 |
| OpMemberDecorate %ExternalTextureParams_std140 17 Offset 264 |
| OpDecorate %ext_tex_params NonWritable |
| OpDecorate %ext_tex_params DescriptorSet 0 |
| OpDecorate %ext_tex_params Binding 3 |
| OpDecorate %t DescriptorSet 0 |
| OpDecorate %t Binding 0 |
| OpDecorate %outImage NonReadable |
| OpDecorate %outImage DescriptorSet 0 |
| OpDecorate %outImage Binding 1 |
| OpMemberDecorate %ExternalTextureParams 0 Offset 0 |
| OpMemberDecorate %ExternalTextureParams 1 Offset 4 |
| OpMemberDecorate %ExternalTextureParams 2 Offset 16 |
| OpMemberDecorate %ExternalTextureParams 2 ColMajor |
| OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16 |
| OpMemberDecorate %ExternalTextureParams 3 Offset 64 |
| OpMemberDecorate %ExternalTextureParams 4 Offset 96 |
| OpMemberDecorate %ExternalTextureParams 5 Offset 128 |
| OpMemberDecorate %ExternalTextureParams 5 ColMajor |
| OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16 |
| OpMemberDecorate %ExternalTextureParams 6 Offset 176 |
| OpMemberDecorate %ExternalTextureParams 6 ColMajor |
| OpMemberDecorate %ExternalTextureParams 6 MatrixStride 8 |
| OpMemberDecorate %ExternalTextureParams 7 Offset 200 |
| OpMemberDecorate %ExternalTextureParams 7 ColMajor |
| OpMemberDecorate %ExternalTextureParams 7 MatrixStride 8 |
| OpMemberDecorate %ExternalTextureParams 8 Offset 224 |
| OpMemberDecorate %ExternalTextureParams 9 Offset 232 |
| OpMemberDecorate %ExternalTextureParams 10 Offset 240 |
| OpMemberDecorate %ExternalTextureParams 11 Offset 248 |
| OpMemberDecorate %ExternalTextureParams 12 Offset 256 |
| OpMemberDecorate %ExternalTextureParams 13 Offset 264 |
| %float = OpTypeFloat 32 |
| %3 = OpTypeImage %float 2D 0 0 0 1 Unknown |
| %_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3 |
| %ext_tex_plane_1 = OpVariable %_ptr_UniformConstant_3 UniformConstant |
| %uint = OpTypeInt 32 0 |
| %v4float = OpTypeVector %float 4 |
| %mat3v4float = OpTypeMatrix %v4float 3 |
| %GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint |
| %v3float = OpTypeVector %float 3 |
| %mat3v3float = OpTypeMatrix %v3float 3 |
| %v2float = OpTypeVector %float 2 |
| %v2uint = OpTypeVector %uint 2 |
| %ExternalTextureParams_std140 = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %v2float %v2float %v2float %v2float %v2float %v2float %v2float %v2float %v2float %v2float %v2uint %v2float |
| %ext_tex_params_block_std140 = OpTypeStruct %ExternalTextureParams_std140 |
| %_ptr_Uniform_ext_tex_params_block_std140 = OpTypePointer Uniform %ext_tex_params_block_std140 |
| %ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block_std140 Uniform |
| %t = OpVariable %_ptr_UniformConstant_3 UniformConstant |
| %20 = OpTypeImage %float 2D 0 0 0 2 Rgba8 |
| %_ptr_UniformConstant_20 = OpTypePointer UniformConstant %20 |
| %outImage = OpVariable %_ptr_UniformConstant_20 UniformConstant |
| %21 = OpTypeFunction %v2uint %v2float |
| %float_4_29496704e_09 = OpConstant %float 4.29496704e+09 |
| %27 = OpConstantComposite %v2float %float_4_29496704e_09 %float_4_29496704e_09 |
| %bool = OpTypeBool |
| %v2bool = OpTypeVector %bool 2 |
| %32 = OpConstantNull %v2float |
| %34 = OpConstantNull %v2uint |
| %uint_4294967295 = OpConstant %uint 4294967295 |
| %37 = OpConstantComposite %v2uint %uint_4294967295 %uint_4294967295 |
| %int = OpTypeInt 32 1 |
| %v2int = OpTypeVector %int 2 |
| %38 = OpTypeFunction %v2int %v2int %v2int %v2int |
| %49 = OpTypeFunction %v3float %v3float %GammaTransferParams |
| %v3bool = OpTypeVector %bool 3 |
| %_ptr_Function_v3float = OpTypePointer Function %v3float |
| %67 = OpConstantNull %v3float |
| %mat3v2float = OpTypeMatrix %v2float 3 |
| %ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat3v2float %mat3v2float %v2float %v2float %v2float %v2float %v2uint %v2float |
| %87 = OpTypeFunction %v4float %3 %3 %v2int %ExternalTextureParams |
| %float_1 = OpConstant %float 1 |
| %_ptr_Function_v4float = OpTypePointer Function %v4float |
| %110 = OpConstantNull %v4float |
| %uint_1 = OpConstant %uint 1 |
| %118 = OpConstantNull %int |
| %138 = OpConstantNull %uint |
| %uint_3 = OpConstant %uint 3 |
| %_ptr_Function_float = OpTypePointer Function %float |
| %175 = OpTypeFunction %ExternalTextureParams %ExternalTextureParams_std140 |
| %void = OpTypeVoid |
| %200 = OpTypeFunction %void |
| %int_10 = OpConstant %int 10 |
| %209 = OpConstantComposite %v2int %int_10 %int_10 |
| %210 = OpConstantNull %v2int |
| %int_0 = OpConstant %int 0 |
| %215 = OpConstantComposite %v2uint %uint_1 %uint_1 |
| %uint_0 = OpConstant %uint 0 |
| %_ptr_Uniform_ExternalTextureParams_std140 = OpTypePointer Uniform %ExternalTextureParams_std140 |
| %int_70 = OpConstant %int 70 |
| %int_118 = OpConstant %int 118 |
| %237 = OpConstantComposite %v2int %int_70 %int_118 |
| %int_1 = OpConstant %int 1 |
| %250 = OpConstantComposite %v2int %int_1 %118 |
| %tint_ftou = OpFunction %v2uint None %21 |
| %v = OpFunctionParameter %v2float |
| %24 = OpLabel |
| %28 = OpFOrdLessThan %v2bool %v %27 |
| %33 = OpFOrdLessThan %v2bool %v %32 |
| %35 = OpConvertFToU %v2uint %v |
| %31 = OpSelect %v2uint %33 %34 %35 |
| %25 = OpSelect %v2uint %28 %31 %37 |
| OpReturnValue %25 |
| OpFunctionEnd |
| %tint_clamp = OpFunction %v2int None %38 |
| %e = OpFunctionParameter %v2int |
| %low = OpFunctionParameter %v2int |
| %high = OpFunctionParameter %v2int |
| %45 = OpLabel |
| %48 = OpExtInst %v2int %47 SMax %e %low |
| %46 = OpExtInst %v2int %47 SMin %48 %high |
| OpReturnValue %46 |
| OpFunctionEnd |
| %gammaCorrection = OpFunction %v3float None %49 |
| %v_0 = OpFunctionParameter %v3float |
| %params = OpFunctionParameter %GammaTransferParams |
| %53 = OpLabel |
| %65 = OpVariable %_ptr_Function_v3float Function %67 |
| %77 = OpVariable %_ptr_Function_v3float Function %67 |
| %83 = OpVariable %_ptr_Function_v3float Function %67 |
| %54 = OpExtInst %v3float %47 FAbs %v_0 |
| %55 = OpCompositeExtract %float %params 4 |
| %56 = OpCompositeConstruct %v3float %55 %55 %55 |
| %57 = OpFOrdLessThan %v3bool %54 %56 |
| %59 = OpExtInst %v3float %47 FSign %v_0 |
| %60 = OpCompositeExtract %float %params 3 |
| %61 = OpExtInst %v3float %47 FAbs %v_0 |
| %62 = OpVectorTimesScalar %v3float %61 %60 |
| %63 = OpCompositeExtract %float %params 6 |
| %68 = OpCompositeConstruct %v3float %63 %63 %63 |
| %64 = OpFAdd %v3float %62 %68 |
| %69 = OpFMul %v3float %59 %64 |
| %70 = OpExtInst %v3float %47 FSign %v_0 |
| %72 = OpCompositeExtract %float %params 1 |
| %73 = OpExtInst %v3float %47 FAbs %v_0 |
| %74 = OpVectorTimesScalar %v3float %73 %72 |
| %75 = OpCompositeExtract %float %params 2 |
| %78 = OpCompositeConstruct %v3float %75 %75 %75 |
| %76 = OpFAdd %v3float %74 %78 |
| %79 = OpCompositeExtract %float %params 0 |
| %80 = OpCompositeConstruct %v3float %79 %79 %79 |
| %71 = OpExtInst %v3float %47 Pow %76 %80 |
| %81 = OpCompositeExtract %float %params 5 |
| %84 = OpCompositeConstruct %v3float %81 %81 %81 |
| %82 = OpFAdd %v3float %71 %84 |
| %85 = OpFMul %v3float %70 %82 |
| %86 = OpSelect %v3float %57 %69 %85 |
| OpReturnValue %86 |
| OpFunctionEnd |
| %textureLoadExternal = OpFunction %v4float None %87 |
| %plane0 = OpFunctionParameter %3 |
| %plane1 = OpFunctionParameter %3 |
| %coord = OpFunctionParameter %v2int |
| %params_0 = OpFunctionParameter %ExternalTextureParams |
| %95 = OpLabel |
| %color = OpVariable %_ptr_Function_v4float Function %110 |
| %97 = OpBitcast %v2uint %coord |
| %98 = OpCompositeExtract %v2uint %params_0 12 |
| %96 = OpExtInst %v2uint %47 UMin %97 %98 |
| %101 = OpCompositeExtract %mat3v2float %params_0 7 |
| %102 = OpConvertUToF %v2float %96 |
| %103 = OpCompositeExtract %float %102 0 |
| %104 = OpCompositeExtract %float %102 1 |
| %106 = OpCompositeConstruct %v3float %103 %104 %float_1 |
| %107 = OpMatrixTimesVector %v2float %101 %106 |
| %100 = OpExtInst %v2float %47 RoundEven %107 |
| %99 = OpFunctionCall %v2uint %tint_ftou %100 |
| %111 = OpCompositeExtract %uint %params_0 0 |
| %113 = OpIEqual %bool %111 %uint_1 |
| OpSelectionMerge %114 None |
| OpBranchConditional %113 %115 %116 |
| %115 = OpLabel |
| %117 = OpImageFetch %v4float %plane0 %99 Lod %118 |
| %119 = OpVectorShuffle %v4float %117 %117 0 1 2 3 |
| OpStore %color %119 |
| OpBranch %114 |
| %116 = OpLabel |
| %121 = OpConvertUToF %v2float %99 |
| %122 = OpCompositeExtract %v2float %params_0 13 |
| %123 = OpFMul %v2float %121 %122 |
| %120 = OpFunctionCall %v2uint %tint_ftou %123 |
| %124 = OpImageFetch %v4float %plane0 %99 Lod %118 |
| %125 = OpCompositeExtract %float %124 0 |
| %126 = OpImageFetch %v4float %plane1 %120 Lod %118 |
| %127 = OpVectorShuffle %v2float %126 %126 0 1 |
| %128 = OpCompositeExtract %float %127 0 |
| %129 = OpCompositeExtract %float %127 1 |
| %130 = OpCompositeConstruct %v4float %125 %128 %129 %float_1 |
| %131 = OpCompositeExtract %mat3v4float %params_0 2 |
| %132 = OpVectorTimesMatrix %v3float %130 %131 |
| %133 = OpCompositeExtract %float %132 0 |
| %134 = OpCompositeExtract %float %132 1 |
| %135 = OpCompositeExtract %float %132 2 |
| %136 = OpCompositeConstruct %v4float %133 %134 %135 %float_1 |
| OpStore %color %136 |
| OpBranch %114 |
| %114 = OpLabel |
| %137 = OpCompositeExtract %uint %params_0 1 |
| %139 = OpIEqual %bool %137 %138 |
| OpSelectionMerge %140 None |
| OpBranchConditional %139 %141 %140 |
| %141 = OpLabel |
| %143 = OpLoad %v4float %color |
| %144 = OpVectorShuffle %v3float %143 %143 0 1 2 |
| %145 = OpCompositeExtract %GammaTransferParams %params_0 3 |
| %142 = OpFunctionCall %v3float %gammaCorrection %144 %145 |
| %146 = OpCompositeExtract %float %142 0 |
| %147 = OpCompositeExtract %float %142 1 |
| %148 = OpCompositeExtract %float %142 2 |
| %151 = OpAccessChain %_ptr_Function_float %color %uint_3 |
| %152 = OpLoad %float %151 |
| %153 = OpCompositeConstruct %v4float %146 %147 %148 %152 |
| OpStore %color %153 |
| %154 = OpCompositeExtract %mat3v3float %params_0 5 |
| %155 = OpLoad %v4float %color |
| %156 = OpVectorShuffle %v3float %155 %155 0 1 2 |
| %157 = OpMatrixTimesVector %v3float %154 %156 |
| %158 = OpCompositeExtract %float %157 0 |
| %159 = OpCompositeExtract %float %157 1 |
| %160 = OpCompositeExtract %float %157 2 |
| %161 = OpAccessChain %_ptr_Function_float %color %uint_3 |
| %162 = OpLoad %float %161 |
| %163 = OpCompositeConstruct %v4float %158 %159 %160 %162 |
| OpStore %color %163 |
| %165 = OpLoad %v4float %color |
| %166 = OpVectorShuffle %v3float %165 %165 0 1 2 |
| %167 = OpCompositeExtract %GammaTransferParams %params_0 4 |
| %164 = OpFunctionCall %v3float %gammaCorrection %166 %167 |
| %168 = OpCompositeExtract %float %164 0 |
| %169 = OpCompositeExtract %float %164 1 |
| %170 = OpCompositeExtract %float %164 2 |
| %171 = OpAccessChain %_ptr_Function_float %color %uint_3 |
| %172 = OpLoad %float %171 |
| %173 = OpCompositeConstruct %v4float %168 %169 %170 %172 |
| OpStore %color %173 |
| OpBranch %140 |
| %140 = OpLabel |
| %174 = OpLoad %v4float %color |
| OpReturnValue %174 |
| OpFunctionEnd |
| %conv_ExternalTextureParams = OpFunction %ExternalTextureParams None %175 |
| %val = OpFunctionParameter %ExternalTextureParams_std140 |
| %178 = OpLabel |
| %179 = OpCompositeExtract %uint %val 0 |
| %180 = OpCompositeExtract %uint %val 1 |
| %181 = OpCompositeExtract %mat3v4float %val 2 |
| %182 = OpCompositeExtract %GammaTransferParams %val 3 |
| %183 = OpCompositeExtract %GammaTransferParams %val 4 |
| %184 = OpCompositeExtract %mat3v3float %val 5 |
| %185 = OpCompositeExtract %v2float %val 6 |
| %186 = OpCompositeExtract %v2float %val 7 |
| %187 = OpCompositeExtract %v2float %val 8 |
| %188 = OpCompositeConstruct %mat3v2float %185 %186 %187 |
| %189 = OpCompositeExtract %v2float %val 9 |
| %190 = OpCompositeExtract %v2float %val 10 |
| %191 = OpCompositeExtract %v2float %val 11 |
| %192 = OpCompositeConstruct %mat3v2float %189 %190 %191 |
| %193 = OpCompositeExtract %v2float %val 12 |
| %194 = OpCompositeExtract %v2float %val 13 |
| %195 = OpCompositeExtract %v2float %val 14 |
| %196 = OpCompositeExtract %v2float %val 15 |
| %197 = OpCompositeExtract %v2uint %val 16 |
| %198 = OpCompositeExtract %v2float %val 17 |
| %199 = OpCompositeConstruct %ExternalTextureParams %179 %180 %181 %182 %183 %184 %188 %192 %193 %194 %195 %196 %197 %198 |
| OpReturnValue %199 |
| OpFunctionEnd |
| %main = OpFunction %void None %200 |
| %203 = OpLabel |
| %red = OpVariable %_ptr_Function_v4float Function %110 |
| %green = OpVariable %_ptr_Function_v4float Function %110 |
| %205 = OpLoad %3 %t |
| %206 = OpLoad %3 %ext_tex_plane_1 |
| %213 = OpLoad %3 %t |
| %212 = OpImageQuerySizeLod %v2uint %213 %int_0 |
| %216 = OpISub %v2uint %212 %215 |
| %211 = OpBitcast %v2int %216 |
| %207 = OpFunctionCall %v2int %tint_clamp %209 %210 %211 |
| %220 = OpAccessChain %_ptr_Uniform_ExternalTextureParams_std140 %ext_tex_params %uint_0 |
| %221 = OpLoad %ExternalTextureParams_std140 %220 |
| %217 = OpFunctionCall %ExternalTextureParams %conv_ExternalTextureParams %221 |
| %204 = OpFunctionCall %v4float %textureLoadExternal %205 %206 %207 %217 |
| OpStore %red %204 |
| %224 = OpLoad %20 %outImage |
| %228 = OpLoad %20 %outImage |
| %227 = OpImageQuerySize %v2uint %228 |
| %229 = OpISub %v2uint %227 %215 |
| %226 = OpBitcast %v2int %229 |
| %225 = OpFunctionCall %v2int %tint_clamp %210 %210 %226 |
| %230 = OpLoad %v4float %red |
| OpImageWrite %224 %225 %230 |
| %232 = OpLoad %3 %t |
| %233 = OpLoad %3 %ext_tex_plane_1 |
| %240 = OpLoad %3 %t |
| %239 = OpImageQuerySizeLod %v2uint %240 %int_0 |
| %241 = OpISub %v2uint %239 %215 |
| %238 = OpBitcast %v2int %241 |
| %234 = OpFunctionCall %v2int %tint_clamp %237 %210 %238 |
| %243 = OpAccessChain %_ptr_Uniform_ExternalTextureParams_std140 %ext_tex_params %uint_0 |
| %244 = OpLoad %ExternalTextureParams_std140 %243 |
| %242 = OpFunctionCall %ExternalTextureParams %conv_ExternalTextureParams %244 |
| %231 = OpFunctionCall %v4float %textureLoadExternal %232 %233 %234 %242 |
| OpStore %green %231 |
| %247 = OpLoad %20 %outImage |
| %253 = OpLoad %20 %outImage |
| %252 = OpImageQuerySize %v2uint %253 |
| %254 = OpISub %v2uint %252 %215 |
| %251 = OpBitcast %v2int %254 |
| %248 = OpFunctionCall %v2int %tint_clamp %250 %210 %251 |
| %255 = OpLoad %v4float %green |
| OpImageWrite %247 %248 %255 |
| OpReturn |
| OpFunctionEnd |