| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 0 |
| ; Bound: 217 |
| ; Schema: 0 |
| OpCapability Shader |
| OpCapability ImageQuery |
| %35 = 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 %arg_1 "arg_1" |
| OpName %prevent_dce_block "prevent_dce_block" |
| OpMemberName %prevent_dce_block 0 "inner" |
| OpName %prevent_dce "prevent_dce" |
| 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 %textureSampleExternal "textureSampleExternal" |
| OpName %plane0 "plane0" |
| OpName %plane1 "plane1" |
| OpName %smp "smp" |
| OpName %coord "coord" |
| OpName %params_0 "params" |
| OpName %color "color" |
| OpName %conv_ExternalTextureParams "conv_ExternalTextureParams" |
| OpName %val "val" |
| OpName %textureSampleBaseClampToEdge_7c04e6 "textureSampleBaseClampToEdge_7c04e6" |
| 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 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 |
| OpDecorate %ext_tex_params NonWritable |
| OpDecorate %ext_tex_params DescriptorSet 1 |
| OpDecorate %ext_tex_params Binding 3 |
| OpDecorate %arg_0 DescriptorSet 1 |
| OpDecorate %arg_0 Binding 0 |
| OpDecorate %arg_1 DescriptorSet 1 |
| OpDecorate %arg_1 Binding 1 |
| OpDecorate %prevent_dce_block Block |
| OpMemberDecorate %prevent_dce_block 0 Offset 0 |
| OpDecorate %prevent_dce DescriptorSet 2 |
| OpDecorate %prevent_dce 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 |
| %25 = OpTypeSampler |
| %_ptr_UniformConstant_25 = OpTypePointer UniformConstant %25 |
| %arg_1 = OpVariable %_ptr_UniformConstant_25 UniformConstant |
| %prevent_dce_block = OpTypeStruct %v4float |
| %_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block |
| %prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer |
| %29 = OpTypeFunction %v3float %v3float %GammaTransferParams |
| %bool = OpTypeBool |
| %v3bool = OpTypeVector %bool 3 |
| %_ptr_Function_v3float = OpTypePointer Function %v3float |
| %49 = OpConstantNull %v3float |
| %mat3v2float = OpTypeMatrix %v2float 3 |
| %ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat3v2float |
| %69 = OpTypeFunction %v4float %11 %11 %25 %v2float %ExternalTextureParams |
| %float_1 = OpConstant %float 1 |
| %v2uint = OpTypeVector %uint 2 |
| %int = OpTypeInt 32 1 |
| %89 = OpConstantNull %int |
| %float_0_5 = OpConstant %float 0.5 |
| %91 = OpConstantComposite %v2float %float_0_5 %float_0_5 |
| %_ptr_Function_v2float = OpTypePointer Function %v2float |
| %97 = OpConstantNull %v2float |
| %_ptr_Function_v4float = OpTypePointer Function %v4float |
| %uint_1 = OpConstant %uint 1 |
| %115 = OpTypeSampledImage %11 |
| %134 = OpConstantNull %uint |
| %uint_3 = OpConstant %uint 3 |
| %_ptr_Function_float = OpTypePointer Function %float |
| %171 = OpTypeFunction %ExternalTextureParams %ExternalTextureParams_std140 |
| %void = OpTypeVoid |
| %186 = OpTypeFunction %void |
| %194 = OpConstantComposite %v2float %float_1 %float_1 |
| %uint_0 = OpConstant %uint 0 |
| %_ptr_Uniform_ExternalTextureParams_std140 = OpTypePointer Uniform %ExternalTextureParams_std140 |
| %_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float |
| %204 = OpTypeFunction %v4float |
| %gammaCorrection = OpFunction %v3float None %29 |
| %v = OpFunctionParameter %v3float |
| %params = OpFunctionParameter %GammaTransferParams |
| %33 = OpLabel |
| %47 = OpVariable %_ptr_Function_v3float Function %49 |
| %59 = OpVariable %_ptr_Function_v3float Function %49 |
| %65 = OpVariable %_ptr_Function_v3float Function %49 |
| %34 = OpExtInst %v3float %35 FAbs %v |
| %36 = OpCompositeExtract %float %params 4 |
| %37 = OpCompositeConstruct %v3float %36 %36 %36 |
| %38 = OpFOrdLessThan %v3bool %34 %37 |
| %41 = OpExtInst %v3float %35 FSign %v |
| %42 = OpCompositeExtract %float %params 3 |
| %43 = OpExtInst %v3float %35 FAbs %v |
| %44 = OpVectorTimesScalar %v3float %43 %42 |
| %45 = OpCompositeExtract %float %params 6 |
| %50 = OpCompositeConstruct %v3float %45 %45 %45 |
| %46 = OpFAdd %v3float %44 %50 |
| %51 = OpFMul %v3float %41 %46 |
| %52 = OpExtInst %v3float %35 FSign %v |
| %54 = OpCompositeExtract %float %params 1 |
| %55 = OpExtInst %v3float %35 FAbs %v |
| %56 = OpVectorTimesScalar %v3float %55 %54 |
| %57 = OpCompositeExtract %float %params 2 |
| %60 = OpCompositeConstruct %v3float %57 %57 %57 |
| %58 = OpFAdd %v3float %56 %60 |
| %61 = OpCompositeExtract %float %params 0 |
| %62 = OpCompositeConstruct %v3float %61 %61 %61 |
| %53 = OpExtInst %v3float %35 Pow %58 %62 |
| %63 = OpCompositeExtract %float %params 5 |
| %66 = OpCompositeConstruct %v3float %63 %63 %63 |
| %64 = OpFAdd %v3float %53 %66 |
| %67 = OpFMul %v3float %52 %64 |
| %68 = OpSelect %v3float %38 %51 %67 |
| OpReturnValue %68 |
| OpFunctionEnd |
| %textureSampleExternal = OpFunction %v4float None %69 |
| %plane0 = OpFunctionParameter %11 |
| %plane1 = OpFunctionParameter %11 |
| %smp = OpFunctionParameter %25 |
| %coord = OpFunctionParameter %v2float |
| %params_0 = OpFunctionParameter %ExternalTextureParams |
| %78 = OpLabel |
| %95 = OpVariable %_ptr_Function_v2float Function %97 |
| %104 = OpVariable %_ptr_Function_v2float Function %97 |
| %color = OpVariable %_ptr_Function_v4float Function %5 |
| %79 = OpCompositeExtract %mat3v2float %params_0 6 |
| %80 = OpCompositeExtract %float %coord 0 |
| %81 = OpCompositeExtract %float %coord 1 |
| %83 = OpCompositeConstruct %v3float %80 %81 %float_1 |
| %84 = OpMatrixTimesVector %v2float %79 %83 |
| %86 = OpImageQuerySizeLod %v2uint %plane0 %89 |
| %85 = OpConvertUToF %v2float %86 |
| %92 = OpFDiv %v2float %91 %85 |
| %98 = OpCompositeConstruct %v2float %float_1 %float_1 |
| %94 = OpFSub %v2float %98 %92 |
| %93 = OpExtInst %v2float %35 NClamp %84 %92 %94 |
| %100 = OpImageQuerySizeLod %v2uint %plane1 %89 |
| %99 = OpConvertUToF %v2float %100 |
| %101 = OpFDiv %v2float %91 %99 |
| %105 = OpCompositeConstruct %v2float %float_1 %float_1 |
| %103 = OpFSub %v2float %105 %101 |
| %102 = OpExtInst %v2float %35 NClamp %84 %101 %103 |
| %108 = OpCompositeExtract %uint %params_0 0 |
| %110 = OpIEqual %bool %108 %uint_1 |
| OpSelectionMerge %111 None |
| OpBranchConditional %110 %112 %113 |
| %112 = OpLabel |
| %116 = OpSampledImage %115 %plane0 %smp |
| %114 = OpImageSampleExplicitLod %v4float %116 %93 Lod %8 |
| %117 = OpVectorShuffle %v4float %114 %114 0 1 2 3 |
| OpStore %color %117 |
| OpBranch %111 |
| %113 = OpLabel |
| %119 = OpSampledImage %115 %plane0 %smp |
| %118 = OpImageSampleExplicitLod %v4float %119 %93 Lod %8 |
| %120 = OpCompositeExtract %float %118 0 |
| %122 = OpSampledImage %115 %plane1 %smp |
| %121 = OpImageSampleExplicitLod %v4float %122 %102 Lod %8 |
| %123 = OpVectorShuffle %v2float %121 %121 0 1 |
| %124 = OpCompositeExtract %float %123 0 |
| %125 = OpCompositeExtract %float %123 1 |
| %126 = OpCompositeConstruct %v4float %120 %124 %125 %float_1 |
| %127 = OpCompositeExtract %mat3v4float %params_0 2 |
| %128 = OpVectorTimesMatrix %v3float %126 %127 |
| %129 = OpCompositeExtract %float %128 0 |
| %130 = OpCompositeExtract %float %128 1 |
| %131 = OpCompositeExtract %float %128 2 |
| %132 = OpCompositeConstruct %v4float %129 %130 %131 %float_1 |
| OpStore %color %132 |
| OpBranch %111 |
| %111 = OpLabel |
| %133 = OpCompositeExtract %uint %params_0 1 |
| %135 = OpIEqual %bool %133 %134 |
| OpSelectionMerge %136 None |
| OpBranchConditional %135 %137 %136 |
| %137 = OpLabel |
| %139 = OpLoad %v4float %color |
| %140 = OpVectorShuffle %v3float %139 %139 0 1 2 |
| %141 = OpCompositeExtract %GammaTransferParams %params_0 3 |
| %138 = OpFunctionCall %v3float %gammaCorrection %140 %141 |
| %142 = OpCompositeExtract %float %138 0 |
| %143 = OpCompositeExtract %float %138 1 |
| %144 = OpCompositeExtract %float %138 2 |
| %147 = OpAccessChain %_ptr_Function_float %color %uint_3 |
| %148 = OpLoad %float %147 |
| %149 = OpCompositeConstruct %v4float %142 %143 %144 %148 |
| OpStore %color %149 |
| %150 = OpCompositeExtract %mat3v3float %params_0 5 |
| %151 = OpLoad %v4float %color |
| %152 = OpVectorShuffle %v3float %151 %151 0 1 2 |
| %153 = OpMatrixTimesVector %v3float %150 %152 |
| %154 = OpCompositeExtract %float %153 0 |
| %155 = OpCompositeExtract %float %153 1 |
| %156 = OpCompositeExtract %float %153 2 |
| %157 = OpAccessChain %_ptr_Function_float %color %uint_3 |
| %158 = OpLoad %float %157 |
| %159 = OpCompositeConstruct %v4float %154 %155 %156 %158 |
| OpStore %color %159 |
| %161 = OpLoad %v4float %color |
| %162 = OpVectorShuffle %v3float %161 %161 0 1 2 |
| %163 = OpCompositeExtract %GammaTransferParams %params_0 4 |
| %160 = OpFunctionCall %v3float %gammaCorrection %162 %163 |
| %164 = OpCompositeExtract %float %160 0 |
| %165 = OpCompositeExtract %float %160 1 |
| %166 = OpCompositeExtract %float %160 2 |
| %167 = OpAccessChain %_ptr_Function_float %color %uint_3 |
| %168 = OpLoad %float %167 |
| %169 = OpCompositeConstruct %v4float %164 %165 %166 %168 |
| OpStore %color %169 |
| OpBranch %136 |
| %136 = OpLabel |
| %170 = OpLoad %v4float %color |
| OpReturnValue %170 |
| OpFunctionEnd |
| %conv_ExternalTextureParams = OpFunction %ExternalTextureParams None %171 |
| %val = OpFunctionParameter %ExternalTextureParams_std140 |
| %174 = OpLabel |
| %175 = OpCompositeExtract %uint %val 0 |
| %176 = OpCompositeExtract %uint %val 1 |
| %177 = OpCompositeExtract %mat3v4float %val 2 |
| %178 = OpCompositeExtract %GammaTransferParams %val 3 |
| %179 = OpCompositeExtract %GammaTransferParams %val 4 |
| %180 = OpCompositeExtract %mat3v3float %val 5 |
| %181 = OpCompositeExtract %v2float %val 6 |
| %182 = OpCompositeExtract %v2float %val 7 |
| %183 = OpCompositeExtract %v2float %val 8 |
| %184 = OpCompositeConstruct %mat3v2float %181 %182 %183 |
| %185 = OpCompositeConstruct %ExternalTextureParams %175 %176 %177 %178 %179 %180 %184 |
| OpReturnValue %185 |
| OpFunctionEnd |
| %textureSampleBaseClampToEdge_7c04e6 = OpFunction %void None %186 |
| %189 = OpLabel |
| %res = OpVariable %_ptr_Function_v4float Function %5 |
| %191 = OpLoad %11 %arg_0 |
| %192 = OpLoad %11 %ext_tex_plane_1 |
| %193 = OpLoad %25 %arg_1 |
| %198 = OpAccessChain %_ptr_Uniform_ExternalTextureParams_std140 %ext_tex_params %uint_0 |
| %199 = OpLoad %ExternalTextureParams_std140 %198 |
| %195 = OpFunctionCall %ExternalTextureParams %conv_ExternalTextureParams %199 |
| %190 = OpFunctionCall %v4float %textureSampleExternal %191 %192 %193 %194 %195 |
| OpStore %res %190 |
| %202 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0 |
| %203 = OpLoad %v4float %res |
| OpStore %202 %203 |
| OpReturn |
| OpFunctionEnd |
| %vertex_main_inner = OpFunction %v4float None %204 |
| %206 = OpLabel |
| %207 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6 |
| OpReturnValue %5 |
| OpFunctionEnd |
| %vertex_main = OpFunction %void None %186 |
| %209 = OpLabel |
| %210 = OpFunctionCall %v4float %vertex_main_inner |
| OpStore %value %210 |
| OpStore %vertex_point_size %float_1 |
| OpReturn |
| OpFunctionEnd |
| %fragment_main = OpFunction %void None %186 |
| %212 = OpLabel |
| %213 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6 |
| OpReturn |
| OpFunctionEnd |
| %compute_main = OpFunction %void None %186 |
| %215 = OpLabel |
| %216 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6 |
| OpReturn |
| OpFunctionEnd |