blob: 21399745e4b497e3d0f2a110932714923d958912 [file] [log] [blame]
Ben Claytonda5424b2022-10-24 23:58:53 +00001; SPIR-V
2; Version: 1.3
3; Generator: Google Tint Compiler; 0
Natalie Chouinarde9027182024-06-13 18:50:19 +00004; Bound: 84
Ben Claytonda5424b2022-10-24 23:58:53 +00005; Schema: 0
6 OpCapability Shader
7 OpMemoryModel Logical GLSL450
Ben Claytonda5424b2022-10-24 23:58:53 +00008 OpEntryPoint Fragment %fragment_main "fragment_main"
9 OpEntryPoint GLCompute %compute_main "compute_main"
Natalie Chouinarde9027182024-06-13 18:50:19 +000010 OpEntryPoint Vertex %vertex_main "vertex_main" %pos_1 %prevent_dce_1 %vertex_point_size
Ben Claytonda5424b2022-10-24 23:58:53 +000011 OpExecutionMode %fragment_main OriginUpperLeft
12 OpExecutionMode %compute_main LocalSize 1 1 1
Natalie Chouinarde9027182024-06-13 18:50:19 +000013 OpName %pos_1 "pos_1"
14 OpName %prevent_dce_1 "prevent_dce_1"
Ben Claytonda5424b2022-10-24 23:58:53 +000015 OpName %vertex_point_size "vertex_point_size"
16 OpName %arg_0 "arg_0"
17 OpName %arg_1 "arg_1"
Ben Clayton77a90cb2023-03-06 18:25:08 +000018 OpName %prevent_dce_block "prevent_dce_block"
19 OpMemberName %prevent_dce_block 0 "inner"
20 OpName %prevent_dce "prevent_dce"
Ben Claytonda5424b2022-10-24 23:58:53 +000021 OpName %textureSampleCompareLevel_bcb3dd "textureSampleCompareLevel_bcb3dd"
22 OpName %arg_2 "arg_2"
23 OpName %arg_3 "arg_3"
24 OpName %arg_4 "arg_4"
25 OpName %res "res"
Ben Claytonda5424b2022-10-24 23:58:53 +000026 OpName %fragment_main "fragment_main"
27 OpName %compute_main "compute_main"
Natalie Chouinarde9027182024-06-13 18:50:19 +000028 OpName %VertexOutput "VertexOutput"
29 OpMemberName %VertexOutput 0 "pos"
30 OpMemberName %VertexOutput 1 "prevent_dce"
31 OpName %vertex_main_inner "vertex_main_inner"
32 OpName %out "out"
33 OpName %vertex_main "vertex_main"
34 OpDecorate %pos_1 BuiltIn Position
35 OpDecorate %prevent_dce_1 Location 0
36 OpDecorate %prevent_dce_1 Flat
Ben Claytonda5424b2022-10-24 23:58:53 +000037 OpDecorate %vertex_point_size BuiltIn PointSize
38 OpDecorate %arg_0 DescriptorSet 1
39 OpDecorate %arg_0 Binding 0
40 OpDecorate %arg_1 DescriptorSet 1
41 OpDecorate %arg_1 Binding 1
Ben Clayton77a90cb2023-03-06 18:25:08 +000042 OpDecorate %prevent_dce_block Block
43 OpMemberDecorate %prevent_dce_block 0 Offset 0
Natalie Chouinarde9027182024-06-13 18:50:19 +000044 OpDecorate %prevent_dce DescriptorSet 0
Ben Clayton77a90cb2023-03-06 18:25:08 +000045 OpDecorate %prevent_dce Binding 0
Natalie Chouinarde9027182024-06-13 18:50:19 +000046 OpMemberDecorate %VertexOutput 0 Offset 0
47 OpMemberDecorate %VertexOutput 1 Offset 16
Ben Claytonda5424b2022-10-24 23:58:53 +000048 %float = OpTypeFloat 32
49 %v4float = OpTypeVector %float 4
50%_ptr_Output_v4float = OpTypePointer Output %v4float
51 %5 = OpConstantNull %v4float
Natalie Chouinarde9027182024-06-13 18:50:19 +000052 %pos_1 = OpVariable %_ptr_Output_v4float Output %5
Ben Claytonda5424b2022-10-24 23:58:53 +000053%_ptr_Output_float = OpTypePointer Output %float
54 %8 = OpConstantNull %float
Natalie Chouinarde9027182024-06-13 18:50:19 +000055%prevent_dce_1 = OpVariable %_ptr_Output_float Output %8
Ben Claytonda5424b2022-10-24 23:58:53 +000056%vertex_point_size = OpVariable %_ptr_Output_float Output %8
Natalie Chouinarde9027182024-06-13 18:50:19 +000057 %12 = OpTypeImage %float 2D 0 1 0 1 Unknown
58%_ptr_UniformConstant_12 = OpTypePointer UniformConstant %12
59 %arg_0 = OpVariable %_ptr_UniformConstant_12 UniformConstant
60 %15 = OpTypeSampler
61%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
62 %arg_1 = OpVariable %_ptr_UniformConstant_15 UniformConstant
Ben Clayton77a90cb2023-03-06 18:25:08 +000063%prevent_dce_block = OpTypeStruct %float
64%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
65%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
Natalie Chouinarde9027182024-06-13 18:50:19 +000066 %19 = OpTypeFunction %float
Ben Claytonda5424b2022-10-24 23:58:53 +000067 %v2float = OpTypeVector %float 2
Ben Clayton4b606152022-11-04 17:06:03 +000068 %float_1 = OpConstant %float 1
Ben Clayton77a90cb2023-03-06 18:25:08 +000069 %24 = OpConstantComposite %v2float %float_1 %float_1
Ben Claytonda5424b2022-10-24 23:58:53 +000070%_ptr_Function_v2float = OpTypePointer Function %v2float
Ben Clayton77a90cb2023-03-06 18:25:08 +000071 %27 = OpConstantNull %v2float
Ben Claytonda5424b2022-10-24 23:58:53 +000072 %uint = OpTypeInt 32 0
73 %uint_1 = OpConstant %uint 1
74%_ptr_Function_uint = OpTypePointer Function %uint
Ben Clayton77a90cb2023-03-06 18:25:08 +000075 %32 = OpConstantNull %uint
Ben Claytonda5424b2022-10-24 23:58:53 +000076%_ptr_Function_float = OpTypePointer Function %float
Natalie Chouinarde9027182024-06-13 18:50:19 +000077 %38 = OpTypeSampledImage %12
Ben Claytonda5424b2022-10-24 23:58:53 +000078 %v3float = OpTypeVector %float 3
79 %float_0 = OpConstant %float 0
80 %int = OpTypeInt 32 1
81 %v2int = OpTypeVector %int 2
Ben Clayton4b606152022-11-04 17:06:03 +000082 %int_1 = OpConstant %int 1
Ben Clayton77a90cb2023-03-06 18:25:08 +000083 %52 = OpConstantComposite %v2int %int_1 %int_1
Natalie Chouinarde9027182024-06-13 18:50:19 +000084 %void = OpTypeVoid
85 %55 = OpTypeFunction %void
Ben Clayton77a90cb2023-03-06 18:25:08 +000086 %uint_0 = OpConstant %uint 0
87%_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float
Natalie Chouinarde9027182024-06-13 18:50:19 +000088%VertexOutput = OpTypeStruct %v4float %float
89 %67 = OpTypeFunction %VertexOutput
90%_ptr_Function_VertexOutput = OpTypePointer Function %VertexOutput
91 %73 = OpConstantNull %VertexOutput
92%_ptr_Function_v4float = OpTypePointer Function %v4float
93%textureSampleCompareLevel_bcb3dd = OpFunction %float None %19
Ben Clayton77a90cb2023-03-06 18:25:08 +000094 %21 = OpLabel
95 %arg_2 = OpVariable %_ptr_Function_v2float Function %27
96 %arg_3 = OpVariable %_ptr_Function_uint Function %32
Ben Claytonda5424b2022-10-24 23:58:53 +000097 %arg_4 = OpVariable %_ptr_Function_float Function %8
98 %res = OpVariable %_ptr_Function_float Function %8
Ben Clayton77a90cb2023-03-06 18:25:08 +000099 OpStore %arg_2 %24
Ben Claytonda5424b2022-10-24 23:58:53 +0000100 OpStore %arg_3 %uint_1
101 OpStore %arg_4 %float_1
Natalie Chouinarde9027182024-06-13 18:50:19 +0000102 %36 = OpLoad %15 %arg_1
103 %37 = OpLoad %12 %arg_0
Ben Clayton77a90cb2023-03-06 18:25:08 +0000104 %39 = OpSampledImage %38 %37 %36
105 %41 = OpLoad %v2float %arg_2
106 %42 = OpCompositeExtract %float %41 0
107 %43 = OpCompositeExtract %float %41 1
108 %45 = OpLoad %uint %arg_3
109 %44 = OpConvertUToF %float %45
110 %46 = OpCompositeConstruct %v3float %42 %43 %44
111 %47 = OpLoad %float %arg_4
112 %35 = OpImageSampleDrefExplicitLod %float %39 %46 %47 Lod|ConstOffset %float_0 %52
113 OpStore %res %35
Natalie Chouinarde9027182024-06-13 18:50:19 +0000114 %54 = OpLoad %float %res
115 OpReturnValue %54
116 OpFunctionEnd
117%fragment_main = OpFunction %void None %55
118 %58 = OpLabel
119 %61 = OpAccessChain %_ptr_StorageBuffer_float %prevent_dce %uint_0
120 %62 = OpFunctionCall %float %textureSampleCompareLevel_bcb3dd
121 OpStore %61 %62
Ben Claytonda5424b2022-10-24 23:58:53 +0000122 OpReturn
123 OpFunctionEnd
Natalie Chouinarde9027182024-06-13 18:50:19 +0000124%compute_main = OpFunction %void None %55
125 %64 = OpLabel
126 %65 = OpAccessChain %_ptr_StorageBuffer_float %prevent_dce %uint_0
127 %66 = OpFunctionCall %float %textureSampleCompareLevel_bcb3dd
128 OpStore %65 %66
129 OpReturn
Ben Claytonda5424b2022-10-24 23:58:53 +0000130 OpFunctionEnd
Natalie Chouinarde9027182024-06-13 18:50:19 +0000131%vertex_main_inner = OpFunction %VertexOutput None %67
132 %70 = OpLabel
133 %out = OpVariable %_ptr_Function_VertexOutput Function %73
134 %75 = OpAccessChain %_ptr_Function_v4float %out %uint_0
135 OpStore %75 %5
136 %76 = OpAccessChain %_ptr_Function_float %out %uint_1
137 %77 = OpFunctionCall %float %textureSampleCompareLevel_bcb3dd
138 OpStore %76 %77
139 %78 = OpLoad %VertexOutput %out
140 OpReturnValue %78
141 OpFunctionEnd
142%vertex_main = OpFunction %void None %55
143 %80 = OpLabel
144 %81 = OpFunctionCall %VertexOutput %vertex_main_inner
145 %82 = OpCompositeExtract %v4float %81 0
146 OpStore %pos_1 %82
147 %83 = OpCompositeExtract %float %81 1
148 OpStore %prevent_dce_1 %83
Ben Claytonda5424b2022-10-24 23:58:53 +0000149 OpStore %vertex_point_size %float_1
150 OpReturn
151 OpFunctionEnd