blob: b0c6ef386e32e4c653ee5077e073b10356915d24 [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: 63
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_f379e2 "textureLoad_f379e2"
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
48%prevent_dce_1 = OpVariable %_ptr_Output_v4float Output %5
James Price88c231b2023-08-15 12:47:28 +000049%_ptr_Output_float = OpTypePointer Output %float
Natalie Chouinarde9027182024-06-13 18:50:19 +000050 %9 = OpConstantNull %float
51%vertex_point_size = OpVariable %_ptr_Output_float Output %9
52 %12 = OpTypeImage %float 2D 0 1 0 2 Rgba8
53%_ptr_UniformConstant_12 = OpTypePointer UniformConstant %12
54 %arg_0 = OpVariable %_ptr_UniformConstant_12 UniformConstant
James Price88c231b2023-08-15 12:47:28 +000055%prevent_dce_block = OpTypeStruct %v4float
56%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
57%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
Natalie Chouinarde9027182024-06-13 18:50:19 +000058 %16 = OpTypeFunction %v4float
James Price88c231b2023-08-15 12:47:28 +000059 %int = OpTypeInt 32 1
60 %v3int = OpTypeVector %int 3
61 %v2int = OpTypeVector %int 2
62 %int_1 = OpConstant %int 1
63 %25 = OpConstantComposite %v2int %int_1 %int_1
64%_ptr_Function_v4float = OpTypePointer Function %v4float
Natalie Chouinarde9027182024-06-13 18:50:19 +000065 %void = OpTypeVoid
66 %32 = OpTypeFunction %void
James Price88c231b2023-08-15 12:47:28 +000067 %uint = OpTypeInt 32 0
68 %uint_0 = OpConstant %uint 0
69%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
Natalie Chouinarde9027182024-06-13 18:50:19 +000070%VertexOutput = OpTypeStruct %v4float %v4float
71 %45 = OpTypeFunction %VertexOutput
72%_ptr_Function_VertexOutput = OpTypePointer Function %VertexOutput
73 %51 = OpConstantNull %VertexOutput
74 %uint_1 = OpConstant %uint 1
James Price88c231b2023-08-15 12:47:28 +000075 %float_1 = OpConstant %float 1
Natalie Chouinarde9027182024-06-13 18:50:19 +000076%textureLoad_f379e2 = OpFunction %v4float None %16
James Price88c231b2023-08-15 12:47:28 +000077 %18 = OpLabel
78 %res = OpVariable %_ptr_Function_v4float Function %5
Natalie Chouinarde9027182024-06-13 18:50:19 +000079 %20 = OpLoad %12 %arg_0
James Price88c231b2023-08-15 12:47:28 +000080 %26 = OpCompositeExtract %int %25 0
81 %27 = OpCompositeExtract %int %25 1
82 %28 = OpCompositeConstruct %v3int %26 %27 %int_1
83 %19 = OpImageRead %v4float %20 %28
84 OpStore %res %19
Natalie Chouinarde9027182024-06-13 18:50:19 +000085 %31 = OpLoad %v4float %res
86 OpReturnValue %31
87 OpFunctionEnd
88%fragment_main = OpFunction %void None %32
89 %35 = OpLabel
90 %39 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
91 %40 = OpFunctionCall %v4float %textureLoad_f379e2
92 OpStore %39 %40
James Price88c231b2023-08-15 12:47:28 +000093 OpReturn
94 OpFunctionEnd
Natalie Chouinarde9027182024-06-13 18:50:19 +000095%compute_main = OpFunction %void None %32
96 %42 = OpLabel
97 %43 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
98 %44 = OpFunctionCall %v4float %textureLoad_f379e2
99 OpStore %43 %44
James Price88c231b2023-08-15 12:47:28 +0000100 OpReturn
101 OpFunctionEnd
Natalie Chouinarde9027182024-06-13 18:50:19 +0000102%vertex_main_inner = OpFunction %VertexOutput None %45
James Price88c231b2023-08-15 12:47:28 +0000103 %48 = OpLabel
Natalie Chouinarde9027182024-06-13 18:50:19 +0000104 %out = OpVariable %_ptr_Function_VertexOutput Function %51
105 %52 = OpAccessChain %_ptr_Function_v4float %out %uint_0
106 OpStore %52 %5
107 %54 = OpAccessChain %_ptr_Function_v4float %out %uint_1
108 %55 = OpFunctionCall %v4float %textureLoad_f379e2
109 OpStore %54 %55
110 %56 = OpLoad %VertexOutput %out
111 OpReturnValue %56
112 OpFunctionEnd
113%vertex_main = OpFunction %void None %32
114 %58 = OpLabel
115 %59 = OpFunctionCall %VertexOutput %vertex_main_inner
116 %60 = OpCompositeExtract %v4float %59 0
117 OpStore %pos_1 %60
118 %61 = OpCompositeExtract %v4float %59 1
119 OpStore %prevent_dce_1 %61
120 OpStore %vertex_point_size %float_1
James Price88c231b2023-08-15 12:47:28 +0000121 OpReturn
122 OpFunctionEnd