|  | ; SPIR-V | 
|  | ; Version: 1.3 | 
|  | ; Generator: Google Tint Compiler; 0 | 
|  | ; Bound: 190 | 
|  | ; Schema: 0 | 
|  | OpCapability Shader | 
|  | %29 = OpExtInstImport "GLSL.std.450" | 
|  | OpMemoryModel Logical GLSL450 | 
|  | OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size | 
|  | OpEntryPoint Fragment %fragment_main "fragment_main" | 
|  | OpEntryPoint GLCompute %compute_main "compute_main" | 
|  | OpExecutionMode %fragment_main OriginUpperLeft | 
|  | OpExecutionMode %compute_main LocalSize 1 1 1 | 
|  | OpName %value "value" | 
|  | OpName %vertex_point_size "vertex_point_size" | 
|  | 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" | 
|  | OpName %ext_tex_params "ext_tex_params" | 
|  | OpName %arg_0 "arg_0" | 
|  | OpName %gammaCorrection "gammaCorrection" | 
|  | OpName %v "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" | 
|  | OpName %textureLoadExternal "textureLoadExternal" | 
|  | OpName %plane0 "plane0" | 
|  | OpName %plane1 "plane1" | 
|  | OpName %coord "coord" | 
|  | OpName %params_0 "params" | 
|  | OpName %color "color" | 
|  | OpName %textureLoad2d "textureLoad2d" | 
|  | OpName %texture "texture" | 
|  | OpName %ext_tex_plane_1_1 "ext_tex_plane_1_1" | 
|  | OpName %ext_tex_params_1 "ext_tex_params_1" | 
|  | OpName %coords "coords" | 
|  | OpName %conv_ExternalTextureParams "conv_ExternalTextureParams" | 
|  | OpName %val "val" | 
|  | OpName %doTextureLoad "doTextureLoad" | 
|  | OpName %res "res" | 
|  | OpName %vertex_main_inner "vertex_main_inner" | 
|  | OpName %vertex_main "vertex_main" | 
|  | OpName %fragment_main "fragment_main" | 
|  | OpName %compute_main "compute_main" | 
|  | OpDecorate %value BuiltIn Position | 
|  | OpDecorate %vertex_point_size BuiltIn PointSize | 
|  | OpDecorate %ext_tex_plane_1 DescriptorSet 1 | 
|  | OpDecorate %ext_tex_plane_1 Binding 1 | 
|  | 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 | 
|  | OpDecorate %ext_tex_params NonWritable | 
|  | OpDecorate %ext_tex_params DescriptorSet 1 | 
|  | OpDecorate %ext_tex_params Binding 2 | 
|  | OpDecorate %arg_0 DescriptorSet 1 | 
|  | OpDecorate %arg_0 Binding 0 | 
|  | 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 | 
|  | %float = OpTypeFloat 32 | 
|  | %v4float = OpTypeVector %float 4 | 
|  | %_ptr_Output_v4float = OpTypePointer Output %v4float | 
|  | %5 = OpConstantNull %v4float | 
|  | %value = OpVariable %_ptr_Output_v4float Output %5 | 
|  | %_ptr_Output_float = OpTypePointer Output %float | 
|  | %8 = OpConstantNull %float | 
|  | %vertex_point_size = OpVariable %_ptr_Output_float Output %8 | 
|  | %11 = OpTypeImage %float 2D 0 0 0 1 Unknown | 
|  | %_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11 | 
|  | %ext_tex_plane_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant | 
|  | %uint = OpTypeInt 32 0 | 
|  | %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 | 
|  | %ExternalTextureParams_std140 = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %v2float %v2float %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 | 
|  | %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant | 
|  | %23 = OpTypeFunction %v3float %v3float %GammaTransferParams | 
|  | %bool = OpTypeBool | 
|  | %v3bool = OpTypeVector %bool 3 | 
|  | %_ptr_Function_v3float = OpTypePointer Function %v3float | 
|  | %43 = OpConstantNull %v3float | 
|  | %int = OpTypeInt 32 1 | 
|  | %v2int = OpTypeVector %int 2 | 
|  | %mat3v2float = OpTypeMatrix %v2float 3 | 
|  | %ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat3v2float | 
|  | %63 = OpTypeFunction %v4float %11 %11 %v2int %ExternalTextureParams | 
|  | %v2uint = OpTypeVector %uint 2 | 
|  | %uint_1 = OpConstant %uint 1 | 
|  | %76 = OpConstantComposite %v2uint %uint_1 %uint_1 | 
|  | %_ptr_Function_v4float = OpTypePointer Function %v4float | 
|  | %86 = OpConstantNull %int | 
|  | %float_1 = OpConstant %float 1 | 
|  | %103 = OpConstantNull %uint | 
|  | %uint_3 = OpConstant %uint 3 | 
|  | %_ptr_Function_float = OpTypePointer Function %float | 
|  | %140 = OpTypeFunction %v4float %11 %11 %ExternalTextureParams %v2int | 
|  | %148 = OpTypeFunction %ExternalTextureParams %ExternalTextureParams_std140 | 
|  | %void = OpTypeVoid | 
|  | %163 = OpTypeFunction %void | 
|  | %uint_0 = OpConstant %uint 0 | 
|  | %_ptr_Uniform_ExternalTextureParams_std140 = OpTypePointer Uniform %ExternalTextureParams_std140 | 
|  | %175 = OpConstantNull %v2int | 
|  | %177 = OpTypeFunction %v4float | 
|  | %gammaCorrection = OpFunction %v3float None %23 | 
|  | %v = OpFunctionParameter %v3float | 
|  | %params = OpFunctionParameter %GammaTransferParams | 
|  | %27 = OpLabel | 
|  | %41 = OpVariable %_ptr_Function_v3float Function %43 | 
|  | %53 = OpVariable %_ptr_Function_v3float Function %43 | 
|  | %59 = OpVariable %_ptr_Function_v3float Function %43 | 
|  | %28 = OpExtInst %v3float %29 FAbs %v | 
|  | %30 = OpCompositeExtract %float %params 4 | 
|  | %31 = OpCompositeConstruct %v3float %30 %30 %30 | 
|  | %32 = OpFOrdLessThan %v3bool %28 %31 | 
|  | %35 = OpExtInst %v3float %29 FSign %v | 
|  | %36 = OpCompositeExtract %float %params 3 | 
|  | %37 = OpExtInst %v3float %29 FAbs %v | 
|  | %38 = OpVectorTimesScalar %v3float %37 %36 | 
|  | %39 = OpCompositeExtract %float %params 6 | 
|  | %44 = OpCompositeConstruct %v3float %39 %39 %39 | 
|  | %40 = OpFAdd %v3float %38 %44 | 
|  | %45 = OpFMul %v3float %35 %40 | 
|  | %46 = OpExtInst %v3float %29 FSign %v | 
|  | %48 = OpCompositeExtract %float %params 1 | 
|  | %49 = OpExtInst %v3float %29 FAbs %v | 
|  | %50 = OpVectorTimesScalar %v3float %49 %48 | 
|  | %51 = OpCompositeExtract %float %params 2 | 
|  | %54 = OpCompositeConstruct %v3float %51 %51 %51 | 
|  | %52 = OpFAdd %v3float %50 %54 | 
|  | %55 = OpCompositeExtract %float %params 0 | 
|  | %56 = OpCompositeConstruct %v3float %55 %55 %55 | 
|  | %47 = OpExtInst %v3float %29 Pow %52 %56 | 
|  | %57 = OpCompositeExtract %float %params 5 | 
|  | %60 = OpCompositeConstruct %v3float %57 %57 %57 | 
|  | %58 = OpFAdd %v3float %47 %60 | 
|  | %61 = OpFMul %v3float %46 %58 | 
|  | %62 = OpSelect %v3float %32 %45 %61 | 
|  | OpReturnValue %62 | 
|  | OpFunctionEnd | 
|  | %textureLoadExternal = OpFunction %v4float None %63 | 
|  | %plane0 = OpFunctionParameter %11 | 
|  | %plane1 = OpFunctionParameter %11 | 
|  | %coord = OpFunctionParameter %v2int | 
|  | %params_0 = OpFunctionParameter %ExternalTextureParams | 
|  | %73 = OpLabel | 
|  | %color = OpVariable %_ptr_Function_v4float Function %5 | 
|  | %77 = OpShiftRightArithmetic %v2int %coord %76 | 
|  | %80 = OpCompositeExtract %uint %params_0 0 | 
|  | %81 = OpIEqual %bool %80 %uint_1 | 
|  | OpSelectionMerge %82 None | 
|  | OpBranchConditional %81 %83 %84 | 
|  | %83 = OpLabel | 
|  | %85 = OpImageFetch %v4float %plane0 %coord Lod %86 | 
|  | %87 = OpVectorShuffle %v4float %85 %85 0 1 2 3 | 
|  | OpStore %color %87 | 
|  | OpBranch %82 | 
|  | %84 = OpLabel | 
|  | %88 = OpImageFetch %v4float %plane0 %coord Lod %86 | 
|  | %89 = OpCompositeExtract %float %88 0 | 
|  | %90 = OpImageFetch %v4float %plane1 %77 Lod %86 | 
|  | %91 = OpVectorShuffle %v2float %90 %90 0 1 | 
|  | %92 = OpCompositeExtract %float %91 0 | 
|  | %93 = OpCompositeExtract %float %91 1 | 
|  | %95 = OpCompositeConstruct %v4float %89 %92 %93 %float_1 | 
|  | %96 = OpCompositeExtract %mat3v4float %params_0 2 | 
|  | %97 = OpVectorTimesMatrix %v3float %95 %96 | 
|  | %98 = OpCompositeExtract %float %97 0 | 
|  | %99 = OpCompositeExtract %float %97 1 | 
|  | %100 = OpCompositeExtract %float %97 2 | 
|  | %101 = OpCompositeConstruct %v4float %98 %99 %100 %float_1 | 
|  | OpStore %color %101 | 
|  | OpBranch %82 | 
|  | %82 = OpLabel | 
|  | %102 = OpCompositeExtract %uint %params_0 1 | 
|  | %104 = OpIEqual %bool %102 %103 | 
|  | OpSelectionMerge %105 None | 
|  | OpBranchConditional %104 %106 %105 | 
|  | %106 = OpLabel | 
|  | %108 = OpLoad %v4float %color | 
|  | %109 = OpVectorShuffle %v3float %108 %108 0 1 2 | 
|  | %110 = OpCompositeExtract %GammaTransferParams %params_0 3 | 
|  | %107 = OpFunctionCall %v3float %gammaCorrection %109 %110 | 
|  | %111 = OpCompositeExtract %float %107 0 | 
|  | %112 = OpCompositeExtract %float %107 1 | 
|  | %113 = OpCompositeExtract %float %107 2 | 
|  | %116 = OpAccessChain %_ptr_Function_float %color %uint_3 | 
|  | %117 = OpLoad %float %116 | 
|  | %118 = OpCompositeConstruct %v4float %111 %112 %113 %117 | 
|  | OpStore %color %118 | 
|  | %119 = OpCompositeExtract %mat3v3float %params_0 5 | 
|  | %120 = OpLoad %v4float %color | 
|  | %121 = OpVectorShuffle %v3float %120 %120 0 1 2 | 
|  | %122 = OpMatrixTimesVector %v3float %119 %121 | 
|  | %123 = OpCompositeExtract %float %122 0 | 
|  | %124 = OpCompositeExtract %float %122 1 | 
|  | %125 = OpCompositeExtract %float %122 2 | 
|  | %126 = OpAccessChain %_ptr_Function_float %color %uint_3 | 
|  | %127 = OpLoad %float %126 | 
|  | %128 = OpCompositeConstruct %v4float %123 %124 %125 %127 | 
|  | OpStore %color %128 | 
|  | %130 = OpLoad %v4float %color | 
|  | %131 = OpVectorShuffle %v3float %130 %130 0 1 2 | 
|  | %132 = OpCompositeExtract %GammaTransferParams %params_0 4 | 
|  | %129 = OpFunctionCall %v3float %gammaCorrection %131 %132 | 
|  | %133 = OpCompositeExtract %float %129 0 | 
|  | %134 = OpCompositeExtract %float %129 1 | 
|  | %135 = OpCompositeExtract %float %129 2 | 
|  | %136 = OpAccessChain %_ptr_Function_float %color %uint_3 | 
|  | %137 = OpLoad %float %136 | 
|  | %138 = OpCompositeConstruct %v4float %133 %134 %135 %137 | 
|  | OpStore %color %138 | 
|  | OpBranch %105 | 
|  | %105 = OpLabel | 
|  | %139 = OpLoad %v4float %color | 
|  | OpReturnValue %139 | 
|  | OpFunctionEnd | 
|  | %textureLoad2d = OpFunction %v4float None %140 | 
|  | %texture = OpFunctionParameter %11 | 
|  | %ext_tex_plane_1_1 = OpFunctionParameter %11 | 
|  | %ext_tex_params_1 = OpFunctionParameter %ExternalTextureParams | 
|  | %coords = OpFunctionParameter %v2int | 
|  | %146 = OpLabel | 
|  | %147 = OpFunctionCall %v4float %textureLoadExternal %texture %ext_tex_plane_1_1 %coords %ext_tex_params_1 | 
|  | OpReturnValue %147 | 
|  | OpFunctionEnd | 
|  | %conv_ExternalTextureParams = OpFunction %ExternalTextureParams None %148 | 
|  | %val = OpFunctionParameter %ExternalTextureParams_std140 | 
|  | %151 = OpLabel | 
|  | %152 = OpCompositeExtract %uint %val 0 | 
|  | %153 = OpCompositeExtract %uint %val 1 | 
|  | %154 = OpCompositeExtract %mat3v4float %val 2 | 
|  | %155 = OpCompositeExtract %GammaTransferParams %val 3 | 
|  | %156 = OpCompositeExtract %GammaTransferParams %val 4 | 
|  | %157 = OpCompositeExtract %mat3v3float %val 5 | 
|  | %158 = OpCompositeExtract %v2float %val 6 | 
|  | %159 = OpCompositeExtract %v2float %val 7 | 
|  | %160 = OpCompositeExtract %v2float %val 8 | 
|  | %161 = OpCompositeConstruct %mat3v2float %158 %159 %160 | 
|  | %162 = OpCompositeConstruct %ExternalTextureParams %152 %153 %154 %155 %156 %157 %161 | 
|  | OpReturnValue %162 | 
|  | OpFunctionEnd | 
|  | %doTextureLoad = OpFunction %void None %163 | 
|  | %166 = OpLabel | 
|  | %res = OpVariable %_ptr_Function_v4float Function %5 | 
|  | %168 = OpLoad %11 %arg_0 | 
|  | %169 = OpLoad %11 %ext_tex_plane_1 | 
|  | %173 = OpAccessChain %_ptr_Uniform_ExternalTextureParams_std140 %ext_tex_params %uint_0 | 
|  | %174 = OpLoad %ExternalTextureParams_std140 %173 | 
|  | %170 = OpFunctionCall %ExternalTextureParams %conv_ExternalTextureParams %174 | 
|  | %167 = OpFunctionCall %v4float %textureLoad2d %168 %169 %170 %175 | 
|  | OpStore %res %167 | 
|  | OpReturn | 
|  | OpFunctionEnd | 
|  | %vertex_main_inner = OpFunction %v4float None %177 | 
|  | %179 = OpLabel | 
|  | %180 = OpFunctionCall %void %doTextureLoad | 
|  | OpReturnValue %5 | 
|  | OpFunctionEnd | 
|  | %vertex_main = OpFunction %void None %163 | 
|  | %182 = OpLabel | 
|  | %183 = OpFunctionCall %v4float %vertex_main_inner | 
|  | OpStore %value %183 | 
|  | OpStore %vertex_point_size %float_1 | 
|  | OpReturn | 
|  | OpFunctionEnd | 
|  | %fragment_main = OpFunction %void None %163 | 
|  | %185 = OpLabel | 
|  | %186 = OpFunctionCall %void %doTextureLoad | 
|  | OpReturn | 
|  | OpFunctionEnd | 
|  | %compute_main = OpFunction %void None %163 | 
|  | %188 = OpLabel | 
|  | %189 = OpFunctionCall %void %doTextureLoad | 
|  | OpReturn | 
|  | OpFunctionEnd |