2022-04-06 13:57:54 +00:00
|
|
|
; SPIR-V
|
|
|
|
; Version: 1.3
|
|
|
|
; Generator: Google Tint Compiler; 0
|
2022-04-29 21:00:14 +00:00
|
|
|
; Bound: 137
|
2022-04-06 13:57:54 +00:00
|
|
|
; Schema: 0
|
|
|
|
OpCapability Shader
|
2022-04-29 21:00:14 +00:00
|
|
|
%27 = 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"
|
|
|
|
OpName %ExternalTextureParams "ExternalTextureParams"
|
|
|
|
OpMemberName %ExternalTextureParams 0 "numPlanes"
|
2022-04-21 16:02:36 +00:00
|
|
|
OpMemberName %ExternalTextureParams 1 "yuvToRgbConversionMatrix"
|
2022-04-29 21:00:14 +00:00
|
|
|
OpMemberName %ExternalTextureParams 2 "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 3 "gammaEncodeParams"
|
|
|
|
OpMemberName %ExternalTextureParams 4 "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 %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 %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 %ExternalTextureParams Block
|
|
|
|
OpMemberDecorate %ExternalTextureParams 0 Offset 0
|
2022-04-21 16:02:36 +00:00
|
|
|
OpMemberDecorate %ExternalTextureParams 1 Offset 16
|
|
|
|
OpMemberDecorate %ExternalTextureParams 1 ColMajor
|
|
|
|
OpMemberDecorate %ExternalTextureParams 1 MatrixStride 16
|
2022-04-29 21:00:14 +00:00
|
|
|
OpMemberDecorate %ExternalTextureParams 2 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 3 Offset 96
|
|
|
|
OpMemberDecorate %ExternalTextureParams 4 Offset 128
|
|
|
|
OpMemberDecorate %ExternalTextureParams 4 ColMajor
|
|
|
|
OpMemberDecorate %ExternalTextureParams 4 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
|
|
|
|
%ExternalTextureParams = OpTypeStruct %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float
|
2022-04-06 13:57:54 +00:00
|
|
|
%_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams
|
|
|
|
%ext_tex_params = OpVariable %_ptr_Uniform_ExternalTextureParams Uniform
|
|
|
|
%arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
|
2022-04-29 21:00:14 +00:00
|
|
|
%21 = OpTypeFunction %v3float %v3float %GammaTransferParams
|
|
|
|
%bool = OpTypeBool
|
|
|
|
%v3bool = OpTypeVector %bool 3
|
|
|
|
%_ptr_Function_v3float = OpTypePointer Function %v3float
|
|
|
|
%41 = OpConstantNull %v3float
|
2022-04-06 13:57:54 +00:00
|
|
|
%int = OpTypeInt 32 1
|
|
|
|
%v2int = OpTypeVector %int 2
|
2022-04-29 21:00:14 +00:00
|
|
|
%61 = OpTypeFunction %v4float %11 %11 %v2int %ExternalTextureParams
|
2022-04-06 13:57:54 +00:00
|
|
|
%uint_1 = OpConstant %uint 1
|
2022-06-01 15:57:22 +00:00
|
|
|
%78 = OpConstantNull %int
|
2022-04-06 13:57:54 +00:00
|
|
|
%v2float = OpTypeVector %float 2
|
|
|
|
%float_1 = OpConstant %float 1
|
2022-04-29 21:00:14 +00:00
|
|
|
%105 = OpTypeFunction %v4float %11 %11 %ExternalTextureParams %v2int
|
2022-04-06 13:57:54 +00:00
|
|
|
%void = OpTypeVoid
|
2022-04-29 21:00:14 +00:00
|
|
|
%113 = OpTypeFunction %void
|
|
|
|
%121 = OpConstantNull %v2int
|
2022-04-06 13:57:54 +00:00
|
|
|
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
2022-04-29 21:00:14 +00:00
|
|
|
%124 = OpTypeFunction %v4float
|
|
|
|
%gammaCorrection = OpFunction %v3float None %21
|
|
|
|
%v = OpFunctionParameter %v3float
|
|
|
|
%params = OpFunctionParameter %GammaTransferParams
|
|
|
|
%25 = OpLabel
|
|
|
|
%39 = OpVariable %_ptr_Function_v3float Function %41
|
|
|
|
%51 = OpVariable %_ptr_Function_v3float Function %41
|
|
|
|
%57 = OpVariable %_ptr_Function_v3float Function %41
|
|
|
|
%26 = OpExtInst %v3float %27 FAbs %v
|
|
|
|
%28 = OpCompositeExtract %float %params 4
|
|
|
|
%29 = OpCompositeConstruct %v3float %28 %28 %28
|
|
|
|
%30 = OpFOrdLessThan %v3bool %26 %29
|
|
|
|
%33 = OpExtInst %v3float %27 FSign %v
|
|
|
|
%34 = OpCompositeExtract %float %params 3
|
|
|
|
%35 = OpExtInst %v3float %27 FAbs %v
|
|
|
|
%36 = OpVectorTimesScalar %v3float %35 %34
|
|
|
|
%37 = OpCompositeExtract %float %params 6
|
|
|
|
%42 = OpCompositeConstruct %v3float %37 %37 %37
|
|
|
|
%38 = OpFAdd %v3float %36 %42
|
|
|
|
%43 = OpFMul %v3float %33 %38
|
|
|
|
%44 = OpExtInst %v3float %27 FSign %v
|
|
|
|
%46 = OpCompositeExtract %float %params 1
|
|
|
|
%47 = OpExtInst %v3float %27 FAbs %v
|
|
|
|
%48 = OpVectorTimesScalar %v3float %47 %46
|
|
|
|
%49 = OpCompositeExtract %float %params 2
|
|
|
|
%52 = OpCompositeConstruct %v3float %49 %49 %49
|
|
|
|
%50 = OpFAdd %v3float %48 %52
|
|
|
|
%53 = OpCompositeExtract %float %params 0
|
|
|
|
%54 = OpCompositeConstruct %v3float %53 %53 %53
|
|
|
|
%45 = OpExtInst %v3float %27 Pow %50 %54
|
|
|
|
%55 = OpCompositeExtract %float %params 5
|
|
|
|
%58 = OpCompositeConstruct %v3float %55 %55 %55
|
|
|
|
%56 = OpFAdd %v3float %45 %58
|
|
|
|
%59 = OpFMul %v3float %44 %56
|
|
|
|
%60 = OpSelect %v3float %30 %43 %59
|
|
|
|
OpReturnValue %60
|
|
|
|
OpFunctionEnd
|
|
|
|
%textureLoadExternal = OpFunction %v4float None %61
|
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
|
|
|
|
%69 = OpLabel
|
|
|
|
%color = OpVariable %_ptr_Function_v3float Function %41
|
|
|
|
%71 = OpCompositeExtract %uint %params_0 0
|
|
|
|
%73 = OpIEqual %bool %71 %uint_1
|
|
|
|
OpSelectionMerge %74 None
|
|
|
|
OpBranchConditional %73 %75 %76
|
|
|
|
%75 = OpLabel
|
2022-06-01 15:57:22 +00:00
|
|
|
%77 = OpImageFetch %v4float %plane0 %coord Lod %78
|
2022-04-29 21:00:14 +00:00
|
|
|
%79 = OpVectorShuffle %v3float %77 %77 0 1 2
|
|
|
|
OpStore %color %79
|
|
|
|
OpBranch %74
|
|
|
|
%76 = OpLabel
|
2022-06-01 15:57:22 +00:00
|
|
|
%80 = OpImageFetch %v4float %plane0 %coord Lod %78
|
2022-04-29 21:00:14 +00:00
|
|
|
%81 = OpCompositeExtract %float %80 0
|
2022-06-01 15:57:22 +00:00
|
|
|
%82 = OpImageFetch %v4float %plane1 %coord Lod %78
|
2022-04-29 21:00:14 +00:00
|
|
|
%84 = OpVectorShuffle %v2float %82 %82 0 1
|
|
|
|
%85 = OpCompositeExtract %float %84 0
|
|
|
|
%86 = OpCompositeExtract %float %84 1
|
|
|
|
%88 = OpCompositeConstruct %v4float %81 %85 %86 %float_1
|
|
|
|
%89 = OpCompositeExtract %mat3v4float %params_0 1
|
|
|
|
%90 = OpVectorTimesMatrix %v3float %88 %89
|
|
|
|
OpStore %color %90
|
|
|
|
OpBranch %74
|
|
|
|
%74 = OpLabel
|
|
|
|
%92 = OpLoad %v3float %color
|
|
|
|
%93 = OpCompositeExtract %GammaTransferParams %params_0 2
|
|
|
|
%91 = OpFunctionCall %v3float %gammaCorrection %92 %93
|
|
|
|
OpStore %color %91
|
|
|
|
%94 = OpCompositeExtract %mat3v3float %params_0 4
|
|
|
|
%95 = OpLoad %v3float %color
|
|
|
|
%96 = OpMatrixTimesVector %v3float %94 %95
|
|
|
|
OpStore %color %96
|
|
|
|
%98 = OpLoad %v3float %color
|
|
|
|
%99 = OpCompositeExtract %GammaTransferParams %params_0 3
|
|
|
|
%97 = OpFunctionCall %v3float %gammaCorrection %98 %99
|
|
|
|
OpStore %color %97
|
|
|
|
%100 = OpLoad %v3float %color
|
|
|
|
%101 = OpCompositeExtract %float %100 0
|
|
|
|
%102 = OpCompositeExtract %float %100 1
|
|
|
|
%103 = OpCompositeExtract %float %100 2
|
|
|
|
%104 = OpCompositeConstruct %v4float %101 %102 %103 %float_1
|
|
|
|
OpReturnValue %104
|
2022-04-06 13:57:54 +00:00
|
|
|
OpFunctionEnd
|
2022-04-29 21:00:14 +00:00
|
|
|
%textureLoad2d = OpFunction %v4float None %105
|
2022-04-06 13:57:54 +00:00
|
|
|
%texture = OpFunctionParameter %11
|
|
|
|
%ext_tex_plane_1_1 = OpFunctionParameter %11
|
|
|
|
%ext_tex_params_1 = OpFunctionParameter %ExternalTextureParams
|
|
|
|
%coords = OpFunctionParameter %v2int
|
2022-04-29 21:00:14 +00:00
|
|
|
%111 = OpLabel
|
|
|
|
%112 = OpFunctionCall %v4float %textureLoadExternal %texture %ext_tex_plane_1_1 %coords %ext_tex_params_1
|
|
|
|
OpReturnValue %112
|
2022-04-06 13:57:54 +00:00
|
|
|
OpFunctionEnd
|
2022-04-29 21:00:14 +00:00
|
|
|
%doTextureLoad = OpFunction %void None %113
|
|
|
|
%116 = OpLabel
|
2022-04-06 13:57:54 +00:00
|
|
|
%res = OpVariable %_ptr_Function_v4float Function %5
|
2022-04-29 21:00:14 +00:00
|
|
|
%118 = OpLoad %11 %arg_0
|
|
|
|
%119 = OpLoad %11 %ext_tex_plane_1
|
|
|
|
%120 = OpLoad %ExternalTextureParams %ext_tex_params
|
|
|
|
%117 = OpFunctionCall %v4float %textureLoad2d %118 %119 %120 %121
|
|
|
|
OpStore %res %117
|
2022-04-06 13:57:54 +00:00
|
|
|
OpReturn
|
|
|
|
OpFunctionEnd
|
2022-04-29 21:00:14 +00:00
|
|
|
%vertex_main_inner = OpFunction %v4float None %124
|
|
|
|
%126 = OpLabel
|
|
|
|
%127 = OpFunctionCall %void %doTextureLoad
|
2022-04-06 13:57:54 +00:00
|
|
|
OpReturnValue %5
|
|
|
|
OpFunctionEnd
|
2022-04-29 21:00:14 +00:00
|
|
|
%vertex_main = OpFunction %void None %113
|
|
|
|
%129 = OpLabel
|
|
|
|
%130 = OpFunctionCall %v4float %vertex_main_inner
|
|
|
|
OpStore %value %130
|
2022-04-06 13:57:54 +00:00
|
|
|
OpStore %vertex_point_size %float_1
|
|
|
|
OpReturn
|
|
|
|
OpFunctionEnd
|
2022-04-29 21:00:14 +00:00
|
|
|
%fragment_main = OpFunction %void None %113
|
|
|
|
%132 = OpLabel
|
|
|
|
%133 = OpFunctionCall %void %doTextureLoad
|
2022-04-06 13:57:54 +00:00
|
|
|
OpReturn
|
|
|
|
OpFunctionEnd
|
2022-04-29 21:00:14 +00:00
|
|
|
%compute_main = OpFunction %void None %113
|
|
|
|
%135 = OpLabel
|
|
|
|
%136 = OpFunctionCall %void %doTextureLoad
|
2022-04-06 13:57:54 +00:00
|
|
|
OpReturn
|
|
|
|
OpFunctionEnd
|