blob: 428137f5c04ba69b1683faa50a8981c96589b683 [file] [log] [blame]
James Price88c231b2023-08-15 12:47:28 +00001; SPIR-V
2; Version: 1.3
3; Generator: Google Tint Compiler; 0
Natalie Chouinarde9027182024-06-13 18:50:19 +00004; Bound: 67
James Price88c231b2023-08-15 12:47:28 +00005; Schema: 0
6 OpCapability Shader
7 OpMemoryModel Logical GLSL450
James Price88c231b2023-08-15 12:47:28 +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
James Price88c231b2023-08-15 12:47:28 +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"
James Price88c231b2023-08-15 12:47:28 +000015 OpName %vertex_point_size "vertex_point_size"
16 OpName %arg_0 "arg_0"
17 OpName %prevent_dce_block "prevent_dce_block"
18 OpMemberName %prevent_dce_block 0 "inner"
19 OpName %prevent_dce "prevent_dce"
20 OpName %textureLoad_a6b61d "textureLoad_a6b61d"
21 OpName %res "res"
James Price88c231b2023-08-15 12:47:28 +000022 OpName %fragment_main "fragment_main"
23 OpName %compute_main "compute_main"
Natalie Chouinarde9027182024-06-13 18:50:19 +000024 OpName %VertexOutput "VertexOutput"
25 OpMemberName %VertexOutput 0 "pos"
26 OpMemberName %VertexOutput 1 "prevent_dce"
27 OpName %vertex_main_inner "vertex_main_inner"
28 OpName %out "out"
29 OpName %vertex_main "vertex_main"
30 OpDecorate %pos_1 BuiltIn Position
31 OpDecorate %prevent_dce_1 Location 0
32 OpDecorate %prevent_dce_1 Flat
James Price88c231b2023-08-15 12:47:28 +000033 OpDecorate %vertex_point_size BuiltIn PointSize
34 OpDecorate %arg_0 NonWritable
35 OpDecorate %arg_0 DescriptorSet 1
36 OpDecorate %arg_0 Binding 0
37 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
James Price88c231b2023-08-15 12:47:28 +000040 OpDecorate %prevent_dce Binding 0
Natalie Chouinarde9027182024-06-13 18:50:19 +000041 OpMemberDecorate %VertexOutput 0 Offset 0
42 OpMemberDecorate %VertexOutput 1 Offset 16
James Price88c231b2023-08-15 12:47:28 +000043 %float = OpTypeFloat 32
44 %v4float = OpTypeVector %float 4
45%_ptr_Output_v4float = OpTypePointer Output %v4float
46 %5 = OpConstantNull %v4float
Natalie Chouinarde9027182024-06-13 18:50:19 +000047 %pos_1 = OpVariable %_ptr_Output_v4float Output %5
James Price88c231b2023-08-15 12:47:28 +000048 %int = OpTypeInt 32 1
James Price88c231b2023-08-15 12:47:28 +000049 %v4int = OpTypeVector %int 4
Natalie Chouinarde9027182024-06-13 18:50:19 +000050%_ptr_Output_v4int = OpTypePointer Output %v4int
51 %10 = OpConstantNull %v4int
52%prevent_dce_1 = OpVariable %_ptr_Output_v4int Output %10
53%_ptr_Output_float = OpTypePointer Output %float
54 %13 = OpConstantNull %float
55%vertex_point_size = OpVariable %_ptr_Output_float Output %13
56 %16 = OpTypeImage %int 2D 0 1 0 2 Rgba32i
57%_ptr_UniformConstant_16 = OpTypePointer UniformConstant %16
58 %arg_0 = OpVariable %_ptr_UniformConstant_16 UniformConstant
James Price88c231b2023-08-15 12:47:28 +000059%prevent_dce_block = OpTypeStruct %v4int
60%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
61%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
Natalie Chouinarde9027182024-06-13 18:50:19 +000062 %20 = OpTypeFunction %v4int
James Price88c231b2023-08-15 12:47:28 +000063 %v3int = OpTypeVector %int 3
64 %v2int = OpTypeVector %int 2
65 %int_1 = OpConstant %int 1
Natalie Chouinarde9027182024-06-13 18:50:19 +000066 %28 = OpConstantComposite %v2int %int_1 %int_1
James Price88c231b2023-08-15 12:47:28 +000067%_ptr_Function_v4int = OpTypePointer Function %v4int
Natalie Chouinarde9027182024-06-13 18:50:19 +000068 %void = OpTypeVoid
69 %35 = OpTypeFunction %void
James Price88c231b2023-08-15 12:47:28 +000070 %uint = OpTypeInt 32 0
71 %uint_0 = OpConstant %uint 0
72%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
Natalie Chouinarde9027182024-06-13 18:50:19 +000073%VertexOutput = OpTypeStruct %v4float %v4int
74 %48 = OpTypeFunction %VertexOutput
75%_ptr_Function_VertexOutput = OpTypePointer Function %VertexOutput
76 %54 = OpConstantNull %VertexOutput
77%_ptr_Function_v4float = OpTypePointer Function %v4float
78 %uint_1 = OpConstant %uint 1
James Price88c231b2023-08-15 12:47:28 +000079 %float_1 = OpConstant %float 1
Natalie Chouinarde9027182024-06-13 18:50:19 +000080%textureLoad_a6b61d = OpFunction %v4int None %20
81 %22 = OpLabel
82 %res = OpVariable %_ptr_Function_v4int Function %10
83 %24 = OpLoad %16 %arg_0
84 %29 = OpCompositeExtract %int %28 0
85 %30 = OpCompositeExtract %int %28 1
86 %31 = OpCompositeConstruct %v3int %29 %30 %int_1
87 %23 = OpImageRead %v4int %24 %31
88 OpStore %res %23
89 %34 = OpLoad %v4int %res
90 OpReturnValue %34
91 OpFunctionEnd
92%fragment_main = OpFunction %void None %35
93 %38 = OpLabel
94 %42 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
95 %43 = OpFunctionCall %v4int %textureLoad_a6b61d
96 OpStore %42 %43
James Price88c231b2023-08-15 12:47:28 +000097 OpReturn
98 OpFunctionEnd
Natalie Chouinarde9027182024-06-13 18:50:19 +000099%compute_main = OpFunction %void None %35
100 %45 = OpLabel
101 %46 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
102 %47 = OpFunctionCall %v4int %textureLoad_a6b61d
103 OpStore %46 %47
104 OpReturn
James Price88c231b2023-08-15 12:47:28 +0000105 OpFunctionEnd
Natalie Chouinarde9027182024-06-13 18:50:19 +0000106%vertex_main_inner = OpFunction %VertexOutput None %48
107 %51 = OpLabel
108 %out = OpVariable %_ptr_Function_VertexOutput Function %54
109 %56 = OpAccessChain %_ptr_Function_v4float %out %uint_0
110 OpStore %56 %5
111 %58 = OpAccessChain %_ptr_Function_v4int %out %uint_1
112 %59 = OpFunctionCall %v4int %textureLoad_a6b61d
113 OpStore %58 %59
114 %60 = OpLoad %VertexOutput %out
115 OpReturnValue %60
116 OpFunctionEnd
117%vertex_main = OpFunction %void None %35
118 %62 = OpLabel
119 %63 = OpFunctionCall %VertexOutput %vertex_main_inner
120 %64 = OpCompositeExtract %v4float %63 0
121 OpStore %pos_1 %64
122 %65 = OpCompositeExtract %v4int %63 1
123 OpStore %prevent_dce_1 %65
James Price88c231b2023-08-15 12:47:28 +0000124 OpStore %vertex_point_size %float_1
125 OpReturn
126 OpFunctionEnd