2022-09-22 22:59:16 +00:00
|
|
|
; SPIR-V
|
|
|
|
; Version: 1.3
|
|
|
|
; Generator: Google Tint Compiler; 0
|
2022-12-16 05:41:06 +00:00
|
|
|
; Bound: 176
|
2022-09-22 22:59:16 +00:00
|
|
|
; Schema: 0
|
|
|
|
OpCapability Shader
|
|
|
|
OpCapability ImageQuery
|
2022-11-30 21:32:26 +00:00
|
|
|
%32 = OpExtInstImport "GLSL.std.450"
|
2022-09-22 22:59:16 +00:00
|
|
|
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"
|
2022-12-16 05:41:06 +00:00
|
|
|
OpName %ext_tex_params_block "ext_tex_params_block"
|
|
|
|
OpMemberName %ext_tex_params_block 0 "inner"
|
|
|
|
OpName %ExternalTextureParams "ExternalTextureParams"
|
|
|
|
OpMemberName %ExternalTextureParams 0 "numPlanes"
|
|
|
|
OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
|
|
|
|
OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
|
|
|
|
OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
|
2022-09-22 22:59:16 +00:00
|
|
|
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"
|
2022-12-16 05:41:06 +00:00
|
|
|
OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
|
|
|
|
OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
|
|
|
|
OpMemberName %ExternalTextureParams 6 "coordTransformationMatrix"
|
2022-09-22 22:59:16 +00:00
|
|
|
OpName %ext_tex_params "ext_tex_params"
|
|
|
|
OpName %arg_0 "arg_0"
|
|
|
|
OpName %arg_1 "arg_1"
|
|
|
|
OpName %gammaCorrection "gammaCorrection"
|
|
|
|
OpName %v "v"
|
|
|
|
OpName %params "params"
|
|
|
|
OpName %textureSampleExternal "textureSampleExternal"
|
|
|
|
OpName %plane0 "plane0"
|
|
|
|
OpName %plane1 "plane1"
|
|
|
|
OpName %smp "smp"
|
|
|
|
OpName %coord "coord"
|
|
|
|
OpName %params_0 "params"
|
|
|
|
OpName %color "color"
|
|
|
|
OpName %textureSampleBaseClampToEdge_7c04e6 "textureSampleBaseClampToEdge_7c04e6"
|
|
|
|
OpName %arg_2 "arg_2"
|
|
|
|
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
|
2022-12-16 05:41:06 +00:00
|
|
|
OpDecorate %ext_tex_params_block Block
|
|
|
|
OpMemberDecorate %ext_tex_params_block 0 Offset 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
|
2022-09-22 22:59:16 +00:00
|
|
|
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
|
2022-12-16 05:41:06 +00:00
|
|
|
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 16
|
2022-09-22 22:59:16 +00:00
|
|
|
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
|
|
|
|
%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
|
2022-12-16 05:41:06 +00:00
|
|
|
%mat2v3float = OpTypeMatrix %v3float 2
|
|
|
|
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float %mat2v3float
|
|
|
|
%ext_tex_params_block = OpTypeStruct %ExternalTextureParams
|
|
|
|
%_ptr_Uniform_ext_tex_params_block = OpTypePointer Uniform %ext_tex_params_block
|
|
|
|
%ext_tex_params = OpVariable %_ptr_Uniform_ext_tex_params_block Uniform
|
2022-09-22 22:59:16 +00:00
|
|
|
%arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
|
2022-11-30 21:32:26 +00:00
|
|
|
%25 = OpTypeSampler
|
|
|
|
%_ptr_UniformConstant_25 = OpTypePointer UniformConstant %25
|
|
|
|
%arg_1 = OpVariable %_ptr_UniformConstant_25 UniformConstant
|
|
|
|
%26 = OpTypeFunction %v3float %v3float %GammaTransferParams
|
2022-09-22 22:59:16 +00:00
|
|
|
%bool = OpTypeBool
|
|
|
|
%v3bool = OpTypeVector %bool 3
|
|
|
|
%_ptr_Function_v3float = OpTypePointer Function %v3float
|
2022-11-30 21:32:26 +00:00
|
|
|
%46 = OpConstantNull %v3float
|
2022-12-16 05:41:06 +00:00
|
|
|
%v2float = OpTypeVector %float 2
|
2022-11-30 21:32:26 +00:00
|
|
|
%66 = OpTypeFunction %v4float %11 %11 %25 %v2float %ExternalTextureParams
|
|
|
|
%float_0_5 = OpConstant %float 0.5
|
|
|
|
%_ptr_Function_v2float = OpTypePointer Function %v2float
|
2022-12-16 05:41:06 +00:00
|
|
|
%79 = OpConstantNull %v2float
|
|
|
|
%float_1 = OpConstant %float 1
|
2022-10-26 18:36:44 +00:00
|
|
|
%v2uint = OpTypeVector %uint 2
|
2022-09-22 22:59:16 +00:00
|
|
|
%int = OpTypeInt 32 1
|
2022-11-30 21:32:26 +00:00
|
|
|
%91 = OpConstantNull %int
|
|
|
|
%92 = OpConstantComposite %v2float %float_0_5 %float_0_5
|
2022-09-22 22:59:16 +00:00
|
|
|
%uint_1 = OpConstant %uint 1
|
2022-12-16 05:41:06 +00:00
|
|
|
%113 = OpTypeSampledImage %11
|
|
|
|
%128 = OpConstantNull %uint
|
2022-09-22 22:59:16 +00:00
|
|
|
%void = OpTypeVoid
|
2022-12-16 05:41:06 +00:00
|
|
|
%146 = OpTypeFunction %void
|
|
|
|
%150 = OpConstantComposite %v2float %float_1 %float_1
|
2022-09-22 22:59:16 +00:00
|
|
|
%uint_0 = OpConstant %uint 0
|
2022-12-16 05:41:06 +00:00
|
|
|
%_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams
|
2022-09-22 22:59:16 +00:00
|
|
|
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
2022-12-16 05:41:06 +00:00
|
|
|
%163 = OpTypeFunction %v4float
|
2022-11-30 21:32:26 +00:00
|
|
|
%gammaCorrection = OpFunction %v3float None %26
|
2022-09-22 22:59:16 +00:00
|
|
|
%v = OpFunctionParameter %v3float
|
|
|
|
%params = OpFunctionParameter %GammaTransferParams
|
2022-11-30 21:32:26 +00:00
|
|
|
%30 = OpLabel
|
|
|
|
%44 = OpVariable %_ptr_Function_v3float Function %46
|
|
|
|
%56 = OpVariable %_ptr_Function_v3float Function %46
|
|
|
|
%62 = OpVariable %_ptr_Function_v3float Function %46
|
|
|
|
%31 = OpExtInst %v3float %32 FAbs %v
|
|
|
|
%33 = OpCompositeExtract %float %params 4
|
|
|
|
%34 = OpCompositeConstruct %v3float %33 %33 %33
|
|
|
|
%35 = OpFOrdLessThan %v3bool %31 %34
|
|
|
|
%38 = OpExtInst %v3float %32 FSign %v
|
|
|
|
%39 = OpCompositeExtract %float %params 3
|
|
|
|
%40 = OpExtInst %v3float %32 FAbs %v
|
|
|
|
%41 = OpVectorTimesScalar %v3float %40 %39
|
|
|
|
%42 = OpCompositeExtract %float %params 6
|
|
|
|
%47 = OpCompositeConstruct %v3float %42 %42 %42
|
|
|
|
%43 = OpFAdd %v3float %41 %47
|
|
|
|
%48 = OpFMul %v3float %38 %43
|
|
|
|
%49 = OpExtInst %v3float %32 FSign %v
|
|
|
|
%51 = OpCompositeExtract %float %params 1
|
|
|
|
%52 = OpExtInst %v3float %32 FAbs %v
|
|
|
|
%53 = OpVectorTimesScalar %v3float %52 %51
|
|
|
|
%54 = OpCompositeExtract %float %params 2
|
|
|
|
%57 = OpCompositeConstruct %v3float %54 %54 %54
|
|
|
|
%55 = OpFAdd %v3float %53 %57
|
|
|
|
%58 = OpCompositeExtract %float %params 0
|
|
|
|
%59 = OpCompositeConstruct %v3float %58 %58 %58
|
|
|
|
%50 = OpExtInst %v3float %32 Pow %55 %59
|
|
|
|
%60 = OpCompositeExtract %float %params 5
|
|
|
|
%63 = OpCompositeConstruct %v3float %60 %60 %60
|
|
|
|
%61 = OpFAdd %v3float %50 %63
|
|
|
|
%64 = OpFMul %v3float %49 %61
|
|
|
|
%65 = OpSelect %v3float %35 %48 %64
|
|
|
|
OpReturnValue %65
|
2022-09-22 22:59:16 +00:00
|
|
|
OpFunctionEnd
|
2022-11-30 21:32:26 +00:00
|
|
|
%textureSampleExternal = OpFunction %v4float None %66
|
2022-09-22 22:59:16 +00:00
|
|
|
%plane0 = OpFunctionParameter %11
|
|
|
|
%plane1 = OpFunctionParameter %11
|
2022-11-30 21:32:26 +00:00
|
|
|
%smp = OpFunctionParameter %25
|
2022-09-22 22:59:16 +00:00
|
|
|
%coord = OpFunctionParameter %v2float
|
|
|
|
%params_0 = OpFunctionParameter %ExternalTextureParams
|
2022-12-16 05:41:06 +00:00
|
|
|
%74 = OpLabel
|
|
|
|
%77 = OpVariable %_ptr_Function_v2float Function %79
|
|
|
|
%96 = OpVariable %_ptr_Function_v2float Function %79
|
|
|
|
%103 = OpVariable %_ptr_Function_v2float Function %79
|
2022-11-30 21:32:26 +00:00
|
|
|
%color = OpVariable %_ptr_Function_v3float Function %46
|
2022-12-16 05:41:06 +00:00
|
|
|
%80 = OpCompositeConstruct %v2float %float_0_5 %float_0_5
|
|
|
|
%76 = OpFSub %v2float %coord %80
|
|
|
|
%81 = OpCompositeExtract %float %76 0
|
|
|
|
%82 = OpCompositeExtract %float %76 1
|
|
|
|
%84 = OpCompositeConstruct %v3float %81 %82 %float_1
|
|
|
|
%85 = OpCompositeExtract %mat2v3float %params_0 6
|
|
|
|
%86 = OpVectorTimesMatrix %v2float %84 %85
|
2022-11-30 21:32:26 +00:00
|
|
|
%88 = OpImageQuerySizeLod %v2uint %plane0 %91
|
|
|
|
%87 = OpConvertUToF %v2float %88
|
|
|
|
%93 = OpFDiv %v2float %92 %87
|
2022-12-16 05:41:06 +00:00
|
|
|
%97 = OpCompositeConstruct %v2float %float_1 %float_1
|
|
|
|
%95 = OpFSub %v2float %97 %93
|
|
|
|
%94 = OpExtInst %v2float %32 NClamp %86 %93 %95
|
|
|
|
%99 = OpImageQuerySizeLod %v2uint %plane1 %91
|
|
|
|
%98 = OpConvertUToF %v2float %99
|
|
|
|
%100 = OpFDiv %v2float %92 %98
|
|
|
|
%104 = OpCompositeConstruct %v2float %float_1 %float_1
|
|
|
|
%102 = OpFSub %v2float %104 %100
|
|
|
|
%101 = OpExtInst %v2float %32 NClamp %86 %100 %102
|
|
|
|
%106 = OpCompositeExtract %uint %params_0 0
|
|
|
|
%108 = OpIEqual %bool %106 %uint_1
|
|
|
|
OpSelectionMerge %109 None
|
|
|
|
OpBranchConditional %108 %110 %111
|
2022-11-30 21:32:26 +00:00
|
|
|
%110 = OpLabel
|
2022-12-16 05:41:06 +00:00
|
|
|
%114 = OpSampledImage %113 %plane0 %smp
|
|
|
|
%112 = OpImageSampleExplicitLod %v4float %114 %94 Lod %8
|
|
|
|
%115 = OpVectorShuffle %v3float %112 %112 0 1 2
|
|
|
|
OpStore %color %115
|
|
|
|
OpBranch %109
|
|
|
|
%111 = OpLabel
|
|
|
|
%117 = OpSampledImage %113 %plane0 %smp
|
|
|
|
%116 = OpImageSampleExplicitLod %v4float %117 %94 Lod %8
|
|
|
|
%118 = OpCompositeExtract %float %116 0
|
|
|
|
%120 = OpSampledImage %113 %plane1 %smp
|
|
|
|
%119 = OpImageSampleExplicitLod %v4float %120 %101 Lod %8
|
|
|
|
%121 = OpVectorShuffle %v2float %119 %119 0 1
|
|
|
|
%122 = OpCompositeExtract %float %121 0
|
|
|
|
%123 = OpCompositeExtract %float %121 1
|
|
|
|
%124 = OpCompositeConstruct %v4float %118 %122 %123 %float_1
|
|
|
|
%125 = OpCompositeExtract %mat3v4float %params_0 2
|
|
|
|
%126 = OpVectorTimesMatrix %v3float %124 %125
|
|
|
|
OpStore %color %126
|
|
|
|
OpBranch %109
|
|
|
|
%109 = OpLabel
|
|
|
|
%127 = OpCompositeExtract %uint %params_0 1
|
|
|
|
%129 = OpIEqual %bool %127 %128
|
|
|
|
OpSelectionMerge %130 None
|
|
|
|
OpBranchConditional %129 %131 %130
|
2022-11-30 21:32:26 +00:00
|
|
|
%131 = OpLabel
|
2022-12-16 05:41:06 +00:00
|
|
|
%133 = OpLoad %v3float %color
|
|
|
|
%134 = OpCompositeExtract %GammaTransferParams %params_0 3
|
|
|
|
%132 = OpFunctionCall %v3float %gammaCorrection %133 %134
|
|
|
|
OpStore %color %132
|
|
|
|
%135 = OpCompositeExtract %mat3v3float %params_0 5
|
|
|
|
%136 = OpLoad %v3float %color
|
|
|
|
%137 = OpMatrixTimesVector %v3float %135 %136
|
|
|
|
OpStore %color %137
|
|
|
|
%139 = OpLoad %v3float %color
|
|
|
|
%140 = OpCompositeExtract %GammaTransferParams %params_0 4
|
|
|
|
%138 = OpFunctionCall %v3float %gammaCorrection %139 %140
|
|
|
|
OpStore %color %138
|
|
|
|
OpBranch %130
|
|
|
|
%130 = OpLabel
|
|
|
|
%141 = OpLoad %v3float %color
|
|
|
|
%142 = OpCompositeExtract %float %141 0
|
|
|
|
%143 = OpCompositeExtract %float %141 1
|
|
|
|
%144 = OpCompositeExtract %float %141 2
|
|
|
|
%145 = OpCompositeConstruct %v4float %142 %143 %144 %float_1
|
|
|
|
OpReturnValue %145
|
2022-09-22 22:59:16 +00:00
|
|
|
OpFunctionEnd
|
2022-12-16 05:41:06 +00:00
|
|
|
%textureSampleBaseClampToEdge_7c04e6 = OpFunction %void None %146
|
|
|
|
%149 = OpLabel
|
|
|
|
%arg_2 = OpVariable %_ptr_Function_v2float Function %79
|
2022-09-22 22:59:16 +00:00
|
|
|
%res = OpVariable %_ptr_Function_v4float Function %5
|
2022-12-16 05:41:06 +00:00
|
|
|
OpStore %arg_2 %150
|
|
|
|
%153 = OpLoad %11 %arg_0
|
|
|
|
%154 = OpLoad %11 %ext_tex_plane_1
|
|
|
|
%155 = OpLoad %25 %arg_1
|
|
|
|
%156 = OpLoad %v2float %arg_2
|
|
|
|
%159 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0
|
|
|
|
%160 = OpLoad %ExternalTextureParams %159
|
|
|
|
%152 = OpFunctionCall %v4float %textureSampleExternal %153 %154 %155 %156 %160
|
|
|
|
OpStore %res %152
|
2022-09-22 22:59:16 +00:00
|
|
|
OpReturn
|
|
|
|
OpFunctionEnd
|
2022-12-16 05:41:06 +00:00
|
|
|
%vertex_main_inner = OpFunction %v4float None %163
|
|
|
|
%165 = OpLabel
|
|
|
|
%166 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6
|
2022-09-22 22:59:16 +00:00
|
|
|
OpReturnValue %5
|
|
|
|
OpFunctionEnd
|
2022-12-16 05:41:06 +00:00
|
|
|
%vertex_main = OpFunction %void None %146
|
|
|
|
%168 = OpLabel
|
|
|
|
%169 = OpFunctionCall %v4float %vertex_main_inner
|
|
|
|
OpStore %value %169
|
2022-09-22 22:59:16 +00:00
|
|
|
OpStore %vertex_point_size %float_1
|
|
|
|
OpReturn
|
|
|
|
OpFunctionEnd
|
2022-12-16 05:41:06 +00:00
|
|
|
%fragment_main = OpFunction %void None %146
|
|
|
|
%171 = OpLabel
|
|
|
|
%172 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6
|
2022-09-22 22:59:16 +00:00
|
|
|
OpReturn
|
|
|
|
OpFunctionEnd
|
2022-12-16 05:41:06 +00:00
|
|
|
%compute_main = OpFunction %void None %146
|
|
|
|
%174 = OpLabel
|
|
|
|
%175 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6
|
2022-09-22 22:59:16 +00:00
|
|
|
OpReturn
|
|
|
|
OpFunctionEnd
|