blob: c4ca8b1fe6135171c39c983858a2d26b130b8eb8 [file] [log] [blame]
Ben Clayton2e376a92022-10-26 18:47:02 +00001; SPIR-V
2; Version: 1.3
3; Generator: Google Tint Compiler; 0
Natalie Chouinarde9027182024-06-13 18:50:19 +00004; Bound: 80
Ben Clayton2e376a92022-10-26 18:47:02 +00005; Schema: 0
6 OpCapability Shader
7 OpMemoryModel Logical GLSL450
Ben Clayton2e376a92022-10-26 18:47:02 +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 Clayton2e376a92022-10-26 18:47:02 +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 Clayton2e376a92022-10-26 18:47:02 +000015 OpName %vertex_point_size "vertex_point_size"
Ben Clayton77a90cb2023-03-06 18:25:08 +000016 OpName %prevent_dce_block "prevent_dce_block"
17 OpMemberName %prevent_dce_block 0 "inner"
18 OpName %prevent_dce "prevent_dce"
Natalie Chouinard6ee63302024-06-25 20:45:30 +000019 OpName %arg_0 "arg_0"
Ben Clayton2e376a92022-10-26 18:47:02 +000020 OpName %textureLoad_a24be1 "textureLoad_a24be1"
21 OpName %arg_1 "arg_1"
22 OpName %arg_2 "arg_2"
23 OpName %arg_3 "arg_3"
24 OpName %res "res"
Ben Clayton2e376a92022-10-26 18:47:02 +000025 OpName %fragment_main "fragment_main"
26 OpName %compute_main "compute_main"
Natalie Chouinarde9027182024-06-13 18:50:19 +000027 OpName %VertexOutput "VertexOutput"
28 OpMemberName %VertexOutput 0 "pos"
29 OpMemberName %VertexOutput 1 "prevent_dce"
30 OpName %vertex_main_inner "vertex_main_inner"
31 OpName %out "out"
32 OpName %vertex_main "vertex_main"
33 OpDecorate %pos_1 BuiltIn Position
34 OpDecorate %prevent_dce_1 Location 0
35 OpDecorate %prevent_dce_1 Flat
Ben Clayton2e376a92022-10-26 18:47:02 +000036 OpDecorate %vertex_point_size BuiltIn PointSize
Ben Clayton77a90cb2023-03-06 18:25:08 +000037 OpDecorate %prevent_dce_block Block
38 OpMemberDecorate %prevent_dce_block 0 Offset 0
Natalie Chouinarde9027182024-06-13 18:50:19 +000039 OpDecorate %prevent_dce DescriptorSet 0
Ben Clayton77a90cb2023-03-06 18:25:08 +000040 OpDecorate %prevent_dce Binding 0
Natalie Chouinard6ee63302024-06-25 20:45:30 +000041 OpDecorate %arg_0 DescriptorSet 1
42 OpDecorate %arg_0 Binding 0
Natalie Chouinarde9027182024-06-13 18:50:19 +000043 OpMemberDecorate %VertexOutput 0 Offset 0
44 OpMemberDecorate %VertexOutput 1 Offset 16
Ben Clayton2e376a92022-10-26 18:47:02 +000045 %float = OpTypeFloat 32
46 %v4float = OpTypeVector %float 4
47%_ptr_Output_v4float = OpTypePointer Output %v4float
48 %5 = OpConstantNull %v4float
Natalie Chouinarde9027182024-06-13 18:50:19 +000049 %pos_1 = OpVariable %_ptr_Output_v4float Output %5
Ben Clayton2e376a92022-10-26 18:47:02 +000050 %uint = OpTypeInt 32 0
Ben Clayton77a90cb2023-03-06 18:25:08 +000051 %v4uint = OpTypeVector %uint 4
Natalie Chouinarde9027182024-06-13 18:50:19 +000052%_ptr_Output_v4uint = OpTypePointer Output %v4uint
53 %10 = OpConstantNull %v4uint
54%prevent_dce_1 = OpVariable %_ptr_Output_v4uint Output %10
55%_ptr_Output_float = OpTypePointer Output %float
56 %13 = OpConstantNull %float
57%vertex_point_size = OpVariable %_ptr_Output_float Output %13
Ben Clayton77a90cb2023-03-06 18:25:08 +000058%prevent_dce_block = OpTypeStruct %v4uint
59%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
60%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
Natalie Chouinard6ee63302024-06-25 20:45:30 +000061 %19 = OpTypeImage %uint 2D 0 1 0 1 Unknown
62%_ptr_UniformConstant_19 = OpTypePointer UniformConstant %19
63 %arg_0 = OpVariable %_ptr_UniformConstant_19 UniformConstant
Natalie Chouinarde9027182024-06-13 18:50:19 +000064 %20 = OpTypeFunction %v4uint
Ben Clayton2e376a92022-10-26 18:47:02 +000065 %v2uint = OpTypeVector %uint 2
Ben Clayton4b606152022-11-04 17:06:03 +000066 %uint_1 = OpConstant %uint 1
Natalie Chouinarde9027182024-06-13 18:50:19 +000067 %25 = OpConstantComposite %v2uint %uint_1 %uint_1
Ben Clayton2e376a92022-10-26 18:47:02 +000068%_ptr_Function_v2uint = OpTypePointer Function %v2uint
Natalie Chouinarde9027182024-06-13 18:50:19 +000069 %28 = OpConstantNull %v2uint
Ben Clayton2e376a92022-10-26 18:47:02 +000070 %int = OpTypeInt 32 1
71 %int_1 = OpConstant %int 1
72%_ptr_Function_int = OpTypePointer Function %int
Natalie Chouinarde9027182024-06-13 18:50:19 +000073 %33 = OpConstantNull %int
Ben Clayton2e376a92022-10-26 18:47:02 +000074%_ptr_Function_uint = OpTypePointer Function %uint
Natalie Chouinarde9027182024-06-13 18:50:19 +000075 %36 = OpConstantNull %uint
Ben Clayton2e376a92022-10-26 18:47:02 +000076 %v3uint = OpTypeVector %uint 3
77%_ptr_Function_v4uint = OpTypePointer Function %v4uint
Natalie Chouinarde9027182024-06-13 18:50:19 +000078 %void = OpTypeVoid
79 %50 = OpTypeFunction %void
Ben Clayton77a90cb2023-03-06 18:25:08 +000080 %uint_0 = OpConstant %uint 0
81%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
Natalie Chouinarde9027182024-06-13 18:50:19 +000082%VertexOutput = OpTypeStruct %v4float %v4uint
83 %62 = OpTypeFunction %VertexOutput
84%_ptr_Function_VertexOutput = OpTypePointer Function %VertexOutput
85 %68 = OpConstantNull %VertexOutput
86%_ptr_Function_v4float = OpTypePointer Function %v4float
Ben Clayton2e376a92022-10-26 18:47:02 +000087 %float_1 = OpConstant %float 1
Natalie Chouinarde9027182024-06-13 18:50:19 +000088%textureLoad_a24be1 = OpFunction %v4uint None %20
89 %22 = OpLabel
90 %arg_1 = OpVariable %_ptr_Function_v2uint Function %28
91 %arg_2 = OpVariable %_ptr_Function_int Function %33
92 %arg_3 = OpVariable %_ptr_Function_uint Function %36
93 %res = OpVariable %_ptr_Function_v4uint Function %10
94 OpStore %arg_1 %25
Ben Clayton2e376a92022-10-26 18:47:02 +000095 OpStore %arg_2 %int_1
96 OpStore %arg_3 %uint_1
Natalie Chouinard6ee63302024-06-25 20:45:30 +000097 %38 = OpLoad %19 %arg_0
Natalie Chouinarde9027182024-06-13 18:50:19 +000098 %40 = OpLoad %v2uint %arg_1
99 %41 = OpCompositeExtract %uint %40 0
100 %42 = OpCompositeExtract %uint %40 1
101 %44 = OpLoad %int %arg_2
102 %43 = OpBitcast %uint %44
103 %45 = OpCompositeConstruct %v3uint %41 %42 %43
104 %46 = OpLoad %uint %arg_3
105 %37 = OpImageFetch %v4uint %38 %45 Lod %46
106 OpStore %res %37
107 %49 = OpLoad %v4uint %res
108 OpReturnValue %49
109 OpFunctionEnd
110%fragment_main = OpFunction %void None %50
111 %53 = OpLabel
112 %56 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
113 %57 = OpFunctionCall %v4uint %textureLoad_a24be1
114 OpStore %56 %57
Ben Clayton2e376a92022-10-26 18:47:02 +0000115 OpReturn
116 OpFunctionEnd
Natalie Chouinarde9027182024-06-13 18:50:19 +0000117%compute_main = OpFunction %void None %50
118 %59 = OpLabel
119 %60 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
120 %61 = OpFunctionCall %v4uint %textureLoad_a24be1
121 OpStore %60 %61
122 OpReturn
Ben Clayton2e376a92022-10-26 18:47:02 +0000123 OpFunctionEnd
Natalie Chouinarde9027182024-06-13 18:50:19 +0000124%vertex_main_inner = OpFunction %VertexOutput None %62
125 %65 = OpLabel
126 %out = OpVariable %_ptr_Function_VertexOutput Function %68
127 %70 = OpAccessChain %_ptr_Function_v4float %out %uint_0
128 OpStore %70 %5
129 %71 = OpAccessChain %_ptr_Function_v4uint %out %uint_1
130 %72 = OpFunctionCall %v4uint %textureLoad_a24be1
131 OpStore %71 %72
132 %73 = OpLoad %VertexOutput %out
133 OpReturnValue %73
134 OpFunctionEnd
135%vertex_main = OpFunction %void None %50
136 %75 = OpLabel
137 %76 = OpFunctionCall %VertexOutput %vertex_main_inner
138 %77 = OpCompositeExtract %v4float %76 0
139 OpStore %pos_1 %77
140 %78 = OpCompositeExtract %v4uint %76 1
141 OpStore %prevent_dce_1 %78
Ben Clayton2e376a92022-10-26 18:47:02 +0000142 OpStore %vertex_point_size %float_1
143 OpReturn
144 OpFunctionEnd