2022-09-22 22:59:16 +00:00
|
|
|
; SPIR-V
|
|
|
|
; Version: 1.3
|
|
|
|
; Generator: Google Tint Compiler; 0
|
|
|
|
; Bound: 164
|
|
|
|
; Schema: 0
|
|
|
|
OpCapability Shader
|
|
|
|
OpCapability ImageQuery
|
|
|
|
%31 = 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 "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"
|
|
|
|
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 4 "gammaEncodeParams"
|
|
|
|
OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
|
|
|
|
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 %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 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
|
|
|
|
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 4 Offset 96
|
|
|
|
OpMemberDecorate %ExternalTextureParams 5 Offset 128
|
|
|
|
OpMemberDecorate %ExternalTextureParams 5 ColMajor
|
|
|
|
OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16
|
|
|
|
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
|
|
|
|
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float
|
|
|
|
%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
|
|
|
|
%arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
|
|
|
|
%24 = OpTypeSampler
|
|
|
|
%_ptr_UniformConstant_24 = OpTypePointer UniformConstant %24
|
|
|
|
%arg_1 = OpVariable %_ptr_UniformConstant_24 UniformConstant
|
|
|
|
%25 = OpTypeFunction %v3float %v3float %GammaTransferParams
|
|
|
|
%bool = OpTypeBool
|
|
|
|
%v3bool = OpTypeVector %bool 3
|
|
|
|
%_ptr_Function_v3float = OpTypePointer Function %v3float
|
|
|
|
%45 = OpConstantNull %v3float
|
|
|
|
%v2float = OpTypeVector %float 2
|
|
|
|
%65 = OpTypeFunction %v4float %11 %11 %24 %v2float %ExternalTextureParams
|
2022-10-26 18:36:44 +00:00
|
|
|
%v2uint = OpTypeVector %uint 2
|
2022-09-22 22:59:16 +00:00
|
|
|
%int = OpTypeInt 32 1
|
|
|
|
%78 = OpConstantNull %int
|
|
|
|
%float_0_5 = OpConstant %float 0.5
|
|
|
|
%80 = OpConstantComposite %v2float %float_0_5 %float_0_5
|
|
|
|
%float_1 = OpConstant %float 1
|
|
|
|
%_ptr_Function_v2float = OpTypePointer Function %v2float
|
|
|
|
%87 = OpConstantNull %v2float
|
|
|
|
%uint_1 = OpConstant %uint 1
|
|
|
|
%104 = OpTypeSampledImage %11
|
|
|
|
%119 = OpConstantNull %uint
|
|
|
|
%void = OpTypeVoid
|
|
|
|
%137 = OpTypeFunction %void
|
|
|
|
%uint_0 = OpConstant %uint 0
|
|
|
|
%_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams
|
|
|
|
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
|
|
|
%151 = OpTypeFunction %v4float
|
|
|
|
%gammaCorrection = OpFunction %v3float None %25
|
|
|
|
%v = OpFunctionParameter %v3float
|
|
|
|
%params = OpFunctionParameter %GammaTransferParams
|
|
|
|
%29 = OpLabel
|
|
|
|
%43 = OpVariable %_ptr_Function_v3float Function %45
|
|
|
|
%55 = OpVariable %_ptr_Function_v3float Function %45
|
|
|
|
%61 = OpVariable %_ptr_Function_v3float Function %45
|
|
|
|
%30 = OpExtInst %v3float %31 FAbs %v
|
|
|
|
%32 = OpCompositeExtract %float %params 4
|
|
|
|
%33 = OpCompositeConstruct %v3float %32 %32 %32
|
|
|
|
%34 = OpFOrdLessThan %v3bool %30 %33
|
|
|
|
%37 = OpExtInst %v3float %31 FSign %v
|
|
|
|
%38 = OpCompositeExtract %float %params 3
|
|
|
|
%39 = OpExtInst %v3float %31 FAbs %v
|
|
|
|
%40 = OpVectorTimesScalar %v3float %39 %38
|
|
|
|
%41 = OpCompositeExtract %float %params 6
|
|
|
|
%46 = OpCompositeConstruct %v3float %41 %41 %41
|
|
|
|
%42 = OpFAdd %v3float %40 %46
|
|
|
|
%47 = OpFMul %v3float %37 %42
|
|
|
|
%48 = OpExtInst %v3float %31 FSign %v
|
|
|
|
%50 = OpCompositeExtract %float %params 1
|
|
|
|
%51 = OpExtInst %v3float %31 FAbs %v
|
|
|
|
%52 = OpVectorTimesScalar %v3float %51 %50
|
|
|
|
%53 = OpCompositeExtract %float %params 2
|
|
|
|
%56 = OpCompositeConstruct %v3float %53 %53 %53
|
|
|
|
%54 = OpFAdd %v3float %52 %56
|
|
|
|
%57 = OpCompositeExtract %float %params 0
|
|
|
|
%58 = OpCompositeConstruct %v3float %57 %57 %57
|
|
|
|
%49 = OpExtInst %v3float %31 Pow %54 %58
|
|
|
|
%59 = OpCompositeExtract %float %params 5
|
|
|
|
%62 = OpCompositeConstruct %v3float %59 %59 %59
|
|
|
|
%60 = OpFAdd %v3float %49 %62
|
|
|
|
%63 = OpFMul %v3float %48 %60
|
|
|
|
%64 = OpSelect %v3float %34 %47 %63
|
|
|
|
OpReturnValue %64
|
|
|
|
OpFunctionEnd
|
|
|
|
%textureSampleExternal = OpFunction %v4float None %65
|
|
|
|
%plane0 = OpFunctionParameter %11
|
|
|
|
%plane1 = OpFunctionParameter %11
|
|
|
|
%smp = OpFunctionParameter %24
|
|
|
|
%coord = OpFunctionParameter %v2float
|
|
|
|
%params_0 = OpFunctionParameter %ExternalTextureParams
|
|
|
|
%73 = OpLabel
|
|
|
|
%85 = OpVariable %_ptr_Function_v2float Function %87
|
|
|
|
%94 = OpVariable %_ptr_Function_v2float Function %87
|
|
|
|
%color = OpVariable %_ptr_Function_v3float Function %45
|
2022-10-26 18:36:44 +00:00
|
|
|
%75 = OpImageQuerySizeLod %v2uint %plane0 %78
|
|
|
|
%74 = OpConvertUToF %v2float %75
|
2022-09-22 22:59:16 +00:00
|
|
|
%81 = OpFDiv %v2float %80 %74
|
|
|
|
%88 = OpCompositeConstruct %v2float %float_1 %float_1
|
|
|
|
%84 = OpFSub %v2float %88 %81
|
|
|
|
%82 = OpExtInst %v2float %31 NClamp %coord %81 %84
|
2022-10-26 18:36:44 +00:00
|
|
|
%90 = OpImageQuerySizeLod %v2uint %plane1 %78
|
|
|
|
%89 = OpConvertUToF %v2float %90
|
2022-09-22 22:59:16 +00:00
|
|
|
%91 = OpFDiv %v2float %80 %89
|
|
|
|
%95 = OpCompositeConstruct %v2float %float_1 %float_1
|
|
|
|
%93 = OpFSub %v2float %95 %91
|
|
|
|
%92 = OpExtInst %v2float %31 NClamp %coord %91 %93
|
|
|
|
%97 = OpCompositeExtract %uint %params_0 0
|
|
|
|
%99 = OpIEqual %bool %97 %uint_1
|
|
|
|
OpSelectionMerge %100 None
|
|
|
|
OpBranchConditional %99 %101 %102
|
|
|
|
%101 = OpLabel
|
|
|
|
%105 = OpSampledImage %104 %plane0 %smp
|
|
|
|
%103 = OpImageSampleExplicitLod %v4float %105 %82 Lod %8
|
|
|
|
%106 = OpVectorShuffle %v3float %103 %103 0 1 2
|
|
|
|
OpStore %color %106
|
|
|
|
OpBranch %100
|
|
|
|
%102 = OpLabel
|
|
|
|
%108 = OpSampledImage %104 %plane0 %smp
|
|
|
|
%107 = OpImageSampleExplicitLod %v4float %108 %82 Lod %8
|
|
|
|
%109 = OpCompositeExtract %float %107 0
|
|
|
|
%111 = OpSampledImage %104 %plane1 %smp
|
|
|
|
%110 = OpImageSampleExplicitLod %v4float %111 %92 Lod %8
|
|
|
|
%112 = OpVectorShuffle %v2float %110 %110 0 1
|
|
|
|
%113 = OpCompositeExtract %float %112 0
|
|
|
|
%114 = OpCompositeExtract %float %112 1
|
|
|
|
%115 = OpCompositeConstruct %v4float %109 %113 %114 %float_1
|
|
|
|
%116 = OpCompositeExtract %mat3v4float %params_0 2
|
|
|
|
%117 = OpVectorTimesMatrix %v3float %115 %116
|
|
|
|
OpStore %color %117
|
|
|
|
OpBranch %100
|
|
|
|
%100 = OpLabel
|
|
|
|
%118 = OpCompositeExtract %uint %params_0 1
|
|
|
|
%120 = OpIEqual %bool %118 %119
|
|
|
|
OpSelectionMerge %121 None
|
|
|
|
OpBranchConditional %120 %122 %121
|
|
|
|
%122 = OpLabel
|
|
|
|
%124 = OpLoad %v3float %color
|
|
|
|
%125 = OpCompositeExtract %GammaTransferParams %params_0 3
|
|
|
|
%123 = OpFunctionCall %v3float %gammaCorrection %124 %125
|
|
|
|
OpStore %color %123
|
|
|
|
%126 = OpCompositeExtract %mat3v3float %params_0 5
|
|
|
|
%127 = OpLoad %v3float %color
|
|
|
|
%128 = OpMatrixTimesVector %v3float %126 %127
|
|
|
|
OpStore %color %128
|
|
|
|
%130 = OpLoad %v3float %color
|
|
|
|
%131 = OpCompositeExtract %GammaTransferParams %params_0 4
|
|
|
|
%129 = OpFunctionCall %v3float %gammaCorrection %130 %131
|
|
|
|
OpStore %color %129
|
|
|
|
OpBranch %121
|
|
|
|
%121 = OpLabel
|
|
|
|
%132 = OpLoad %v3float %color
|
|
|
|
%133 = OpCompositeExtract %float %132 0
|
|
|
|
%134 = OpCompositeExtract %float %132 1
|
|
|
|
%135 = OpCompositeExtract %float %132 2
|
|
|
|
%136 = OpCompositeConstruct %v4float %133 %134 %135 %float_1
|
|
|
|
OpReturnValue %136
|
|
|
|
OpFunctionEnd
|
|
|
|
%textureSampleBaseClampToEdge_7c04e6 = OpFunction %void None %137
|
|
|
|
%140 = OpLabel
|
|
|
|
%res = OpVariable %_ptr_Function_v4float Function %5
|
|
|
|
%142 = OpLoad %11 %arg_0
|
|
|
|
%143 = OpLoad %11 %ext_tex_plane_1
|
|
|
|
%144 = OpLoad %24 %arg_1
|
|
|
|
%147 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0
|
|
|
|
%148 = OpLoad %ExternalTextureParams %147
|
|
|
|
%141 = OpFunctionCall %v4float %textureSampleExternal %142 %143 %144 %87 %148
|
|
|
|
OpStore %res %141
|
|
|
|
OpReturn
|
|
|
|
OpFunctionEnd
|
|
|
|
%vertex_main_inner = OpFunction %v4float None %151
|
|
|
|
%153 = OpLabel
|
|
|
|
%154 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6
|
|
|
|
OpReturnValue %5
|
|
|
|
OpFunctionEnd
|
|
|
|
%vertex_main = OpFunction %void None %137
|
|
|
|
%156 = OpLabel
|
|
|
|
%157 = OpFunctionCall %v4float %vertex_main_inner
|
|
|
|
OpStore %value %157
|
|
|
|
OpStore %vertex_point_size %float_1
|
|
|
|
OpReturn
|
|
|
|
OpFunctionEnd
|
|
|
|
%fragment_main = OpFunction %void None %137
|
|
|
|
%159 = OpLabel
|
|
|
|
%160 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6
|
|
|
|
OpReturn
|
|
|
|
OpFunctionEnd
|
|
|
|
%compute_main = OpFunction %void None %137
|
|
|
|
%162 = OpLabel
|
|
|
|
%163 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6
|
|
|
|
OpReturn
|
|
|
|
OpFunctionEnd
|