2022-04-06 13:57:54 +00:00
|
|
|
; SPIR-V
|
|
|
|
; Version: 1.3
|
|
|
|
; Generator: Google Tint Compiler; 0
|
2022-11-04 17:06:03 +00:00
|
|
|
; Bound: 139
|
2022-04-06 13:57:54 +00:00
|
|
|
; Schema: 0
|
|
|
|
OpCapability Shader
|
2022-09-02 19:19:10 +00:00
|
|
|
%28 = OpExtInstImport "GLSL.std.450"
|
2022-04-06 13:57:54 +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-09-02 19:19:10 +00:00
|
|
|
OpName %ext_tex_params_block "ext_tex_params_block"
|
|
|
|
OpMemberName %ext_tex_params_block 0 "inner"
|
2022-04-06 13:57:54 +00:00
|
|
|
OpName %ExternalTextureParams "ExternalTextureParams"
|
|
|
|
OpMemberName %ExternalTextureParams 0 "numPlanes"
|
2022-06-22 03:14:26 +00:00
|
|
|
OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
|
|
|
|
OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
|
|
|
|
OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
|
2022-04-29 21:00:14 +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-06-22 03:14:26 +00:00
|
|
|
OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
|
|
|
|
OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
|
2022-04-06 13:57:54 +00:00
|
|
|
OpName %ext_tex_params "ext_tex_params"
|
|
|
|
OpName %arg_0 "arg_0"
|
2022-04-29 21:00:14 +00:00
|
|
|
OpName %gammaCorrection "gammaCorrection"
|
|
|
|
OpName %v "v"
|
|
|
|
OpName %params "params"
|
2022-04-06 13:57:54 +00:00
|
|
|
OpName %textureLoadExternal "textureLoadExternal"
|
|
|
|
OpName %plane0 "plane0"
|
|
|
|
OpName %plane1 "plane1"
|
|
|
|
OpName %coord "coord"
|
2022-04-29 21:00:14 +00:00
|
|
|
OpName %params_0 "params"
|
2022-04-21 16:02:36 +00:00
|
|
|
OpName %color "color"
|
2022-04-06 13:57:54 +00:00
|
|
|
OpName %textureLoad_8acf41 "textureLoad_8acf41"
|
|
|
|
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
|
2022-09-02 19:19:10 +00:00
|
|
|
OpDecorate %ext_tex_params_block Block
|
|
|
|
OpMemberDecorate %ext_tex_params_block 0 Offset 0
|
2022-04-06 13:57:54 +00:00
|
|
|
OpMemberDecorate %ExternalTextureParams 0 Offset 0
|
2022-06-22 03:14:26 +00:00
|
|
|
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-04-29 21:00:14 +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-06-22 03:14:26 +00:00
|
|
|
OpMemberDecorate %ExternalTextureParams 4 Offset 96
|
|
|
|
OpMemberDecorate %ExternalTextureParams 5 Offset 128
|
|
|
|
OpMemberDecorate %ExternalTextureParams 5 ColMajor
|
|
|
|
OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16
|
2022-04-06 13:57:54 +00:00
|
|
|
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
|
|
|
|
%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
|
2022-04-21 16:02:36 +00:00
|
|
|
%mat3v4float = OpTypeMatrix %v4float 3
|
2022-04-29 21:00:14 +00:00
|
|
|
%GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
|
|
|
|
%v3float = OpTypeVector %float 3
|
|
|
|
%mat3v3float = OpTypeMatrix %v3float 3
|
2022-06-22 03:14:26 +00:00
|
|
|
%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float
|
2022-09-02 19:19:10 +00:00
|
|
|
%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-04-06 13:57:54 +00:00
|
|
|
%arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
|
2022-09-02 19:19:10 +00:00
|
|
|
%22 = OpTypeFunction %v3float %v3float %GammaTransferParams
|
2022-04-29 21:00:14 +00:00
|
|
|
%bool = OpTypeBool
|
|
|
|
%v3bool = OpTypeVector %bool 3
|
|
|
|
%_ptr_Function_v3float = OpTypePointer Function %v3float
|
2022-09-02 19:19:10 +00:00
|
|
|
%42 = OpConstantNull %v3float
|
2022-04-06 13:57:54 +00:00
|
|
|
%int = OpTypeInt 32 1
|
|
|
|
%v2int = OpTypeVector %int 2
|
2022-09-02 19:19:10 +00:00
|
|
|
%62 = OpTypeFunction %v4float %11 %11 %v2int %ExternalTextureParams
|
2022-04-06 13:57:54 +00:00
|
|
|
%uint_1 = OpConstant %uint 1
|
2022-09-02 19:19:10 +00:00
|
|
|
%79 = OpConstantNull %int
|
2022-04-06 13:57:54 +00:00
|
|
|
%v2float = OpTypeVector %float 2
|
|
|
|
%float_1 = OpConstant %float 1
|
2022-09-02 19:19:10 +00:00
|
|
|
%93 = OpConstantNull %uint
|
2022-04-06 13:57:54 +00:00
|
|
|
%void = OpTypeVoid
|
2022-09-02 19:19:10 +00:00
|
|
|
%111 = OpTypeFunction %void
|
2022-11-04 17:06:03 +00:00
|
|
|
%int_1 = OpConstant %int 1
|
|
|
|
%119 = OpConstantComposite %v2int %int_1 %int_1
|
2022-09-02 19:19:10 +00:00
|
|
|
%uint_0 = OpConstant %uint 0
|
|
|
|
%_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams
|
2022-04-06 13:57:54 +00:00
|
|
|
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
2022-11-04 17:06:03 +00:00
|
|
|
%126 = OpTypeFunction %v4float
|
2022-09-02 19:19:10 +00:00
|
|
|
%gammaCorrection = OpFunction %v3float None %22
|
2022-04-29 21:00:14 +00:00
|
|
|
%v = OpFunctionParameter %v3float
|
|
|
|
%params = OpFunctionParameter %GammaTransferParams
|
2022-09-02 19:19:10 +00:00
|
|
|
%26 = OpLabel
|
|
|
|
%40 = OpVariable %_ptr_Function_v3float Function %42
|
|
|
|
%52 = OpVariable %_ptr_Function_v3float Function %42
|
|
|
|
%58 = OpVariable %_ptr_Function_v3float Function %42
|
|
|
|
%27 = OpExtInst %v3float %28 FAbs %v
|
|
|
|
%29 = OpCompositeExtract %float %params 4
|
|
|
|
%30 = OpCompositeConstruct %v3float %29 %29 %29
|
|
|
|
%31 = OpFOrdLessThan %v3bool %27 %30
|
|
|
|
%34 = OpExtInst %v3float %28 FSign %v
|
|
|
|
%35 = OpCompositeExtract %float %params 3
|
|
|
|
%36 = OpExtInst %v3float %28 FAbs %v
|
|
|
|
%37 = OpVectorTimesScalar %v3float %36 %35
|
|
|
|
%38 = OpCompositeExtract %float %params 6
|
|
|
|
%43 = OpCompositeConstruct %v3float %38 %38 %38
|
|
|
|
%39 = OpFAdd %v3float %37 %43
|
|
|
|
%44 = OpFMul %v3float %34 %39
|
|
|
|
%45 = OpExtInst %v3float %28 FSign %v
|
|
|
|
%47 = OpCompositeExtract %float %params 1
|
|
|
|
%48 = OpExtInst %v3float %28 FAbs %v
|
|
|
|
%49 = OpVectorTimesScalar %v3float %48 %47
|
|
|
|
%50 = OpCompositeExtract %float %params 2
|
|
|
|
%53 = OpCompositeConstruct %v3float %50 %50 %50
|
|
|
|
%51 = OpFAdd %v3float %49 %53
|
|
|
|
%54 = OpCompositeExtract %float %params 0
|
|
|
|
%55 = OpCompositeConstruct %v3float %54 %54 %54
|
|
|
|
%46 = OpExtInst %v3float %28 Pow %51 %55
|
|
|
|
%56 = OpCompositeExtract %float %params 5
|
|
|
|
%59 = OpCompositeConstruct %v3float %56 %56 %56
|
|
|
|
%57 = OpFAdd %v3float %46 %59
|
|
|
|
%60 = OpFMul %v3float %45 %57
|
|
|
|
%61 = OpSelect %v3float %31 %44 %60
|
|
|
|
OpReturnValue %61
|
2022-04-29 21:00:14 +00:00
|
|
|
OpFunctionEnd
|
2022-09-02 19:19:10 +00:00
|
|
|
%textureLoadExternal = OpFunction %v4float None %62
|
2022-04-06 13:57:54 +00:00
|
|
|
%plane0 = OpFunctionParameter %11
|
|
|
|
%plane1 = OpFunctionParameter %11
|
|
|
|
%coord = OpFunctionParameter %v2int
|
2022-04-29 21:00:14 +00:00
|
|
|
%params_0 = OpFunctionParameter %ExternalTextureParams
|
2022-09-02 19:19:10 +00:00
|
|
|
%70 = OpLabel
|
|
|
|
%color = OpVariable %_ptr_Function_v3float Function %42
|
|
|
|
%72 = OpCompositeExtract %uint %params_0 0
|
|
|
|
%74 = OpIEqual %bool %72 %uint_1
|
|
|
|
OpSelectionMerge %75 None
|
|
|
|
OpBranchConditional %74 %76 %77
|
2022-04-29 21:00:14 +00:00
|
|
|
%76 = OpLabel
|
2022-09-02 19:19:10 +00:00
|
|
|
%78 = OpImageFetch %v4float %plane0 %coord Lod %79
|
|
|
|
%80 = OpVectorShuffle %v3float %78 %78 0 1 2
|
|
|
|
OpStore %color %80
|
|
|
|
OpBranch %75
|
|
|
|
%77 = OpLabel
|
|
|
|
%81 = OpImageFetch %v4float %plane0 %coord Lod %79
|
|
|
|
%82 = OpCompositeExtract %float %81 0
|
|
|
|
%83 = OpImageFetch %v4float %plane1 %coord Lod %79
|
|
|
|
%85 = OpVectorShuffle %v2float %83 %83 0 1
|
|
|
|
%86 = OpCompositeExtract %float %85 0
|
|
|
|
%87 = OpCompositeExtract %float %85 1
|
|
|
|
%89 = OpCompositeConstruct %v4float %82 %86 %87 %float_1
|
|
|
|
%90 = OpCompositeExtract %mat3v4float %params_0 2
|
|
|
|
%91 = OpVectorTimesMatrix %v3float %89 %90
|
|
|
|
OpStore %color %91
|
|
|
|
OpBranch %75
|
|
|
|
%75 = OpLabel
|
|
|
|
%92 = OpCompositeExtract %uint %params_0 1
|
|
|
|
%94 = OpIEqual %bool %92 %93
|
|
|
|
OpSelectionMerge %95 None
|
|
|
|
OpBranchConditional %94 %96 %95
|
|
|
|
%96 = OpLabel
|
|
|
|
%98 = OpLoad %v3float %color
|
|
|
|
%99 = OpCompositeExtract %GammaTransferParams %params_0 3
|
|
|
|
%97 = OpFunctionCall %v3float %gammaCorrection %98 %99
|
|
|
|
OpStore %color %97
|
|
|
|
%100 = OpCompositeExtract %mat3v3float %params_0 5
|
|
|
|
%101 = OpLoad %v3float %color
|
|
|
|
%102 = OpMatrixTimesVector %v3float %100 %101
|
2022-06-22 03:14:26 +00:00
|
|
|
OpStore %color %102
|
2022-09-02 19:19:10 +00:00
|
|
|
%104 = OpLoad %v3float %color
|
|
|
|
%105 = OpCompositeExtract %GammaTransferParams %params_0 4
|
|
|
|
%103 = OpFunctionCall %v3float %gammaCorrection %104 %105
|
|
|
|
OpStore %color %103
|
|
|
|
OpBranch %95
|
|
|
|
%95 = OpLabel
|
|
|
|
%106 = OpLoad %v3float %color
|
|
|
|
%107 = OpCompositeExtract %float %106 0
|
|
|
|
%108 = OpCompositeExtract %float %106 1
|
|
|
|
%109 = OpCompositeExtract %float %106 2
|
|
|
|
%110 = OpCompositeConstruct %v4float %107 %108 %109 %float_1
|
|
|
|
OpReturnValue %110
|
2022-04-06 13:57:54 +00:00
|
|
|
OpFunctionEnd
|
2022-09-02 19:19:10 +00:00
|
|
|
%textureLoad_8acf41 = OpFunction %void None %111
|
|
|
|
%114 = OpLabel
|
2022-04-06 13:57:54 +00:00
|
|
|
%res = OpVariable %_ptr_Function_v4float Function %5
|
2022-09-02 19:19:10 +00:00
|
|
|
%116 = OpLoad %11 %arg_0
|
|
|
|
%117 = OpLoad %11 %ext_tex_plane_1
|
2022-11-04 17:06:03 +00:00
|
|
|
%122 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0
|
|
|
|
%123 = OpLoad %ExternalTextureParams %122
|
|
|
|
%115 = OpFunctionCall %v4float %textureLoadExternal %116 %117 %119 %123
|
2022-09-02 19:19:10 +00:00
|
|
|
OpStore %res %115
|
2022-04-06 13:57:54 +00:00
|
|
|
OpReturn
|
|
|
|
OpFunctionEnd
|
2022-11-04 17:06:03 +00:00
|
|
|
%vertex_main_inner = OpFunction %v4float None %126
|
|
|
|
%128 = OpLabel
|
|
|
|
%129 = OpFunctionCall %void %textureLoad_8acf41
|
2022-04-06 13:57:54 +00:00
|
|
|
OpReturnValue %5
|
|
|
|
OpFunctionEnd
|
2022-09-02 19:19:10 +00:00
|
|
|
%vertex_main = OpFunction %void None %111
|
2022-11-04 17:06:03 +00:00
|
|
|
%131 = OpLabel
|
|
|
|
%132 = OpFunctionCall %v4float %vertex_main_inner
|
|
|
|
OpStore %value %132
|
2022-04-06 13:57:54 +00:00
|
|
|
OpStore %vertex_point_size %float_1
|
|
|
|
OpReturn
|
|
|
|
OpFunctionEnd
|
2022-09-02 19:19:10 +00:00
|
|
|
%fragment_main = OpFunction %void None %111
|
2022-11-04 17:06:03 +00:00
|
|
|
%134 = OpLabel
|
|
|
|
%135 = OpFunctionCall %void %textureLoad_8acf41
|
2022-04-06 13:57:54 +00:00
|
|
|
OpReturn
|
|
|
|
OpFunctionEnd
|
2022-09-02 19:19:10 +00:00
|
|
|
%compute_main = OpFunction %void None %111
|
2022-11-04 17:06:03 +00:00
|
|
|
%137 = OpLabel
|
|
|
|
%138 = OpFunctionCall %void %textureLoad_8acf41
|
2022-04-06 13:57:54 +00:00
|
|
|
OpReturn
|
|
|
|
OpFunctionEnd
|