blob: 18305f1925726706a37825cb156a23e0c97b0ec8 [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: 59
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"
16 OpName %arg_0 "arg_0"
Ben Clayton77a90cb2023-03-06 18:25:08 +000017 OpName %prevent_dce_block "prevent_dce_block"
18 OpMemberName %prevent_dce_block 0 "inner"
19 OpName %prevent_dce "prevent_dce"
Ben Clayton2e376a92022-10-26 18:47:02 +000020 OpName %textureLoad_439e2a "textureLoad_439e2a"
21 OpName %res "res"
Ben Clayton2e376a92022-10-26 18:47:02 +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
Ben Clayton2e376a92022-10-26 18:47:02 +000033 OpDecorate %vertex_point_size BuiltIn PointSize
34 OpDecorate %arg_0 DescriptorSet 1
35 OpDecorate %arg_0 Binding 0
Ben Clayton77a90cb2023-03-06 18:25:08 +000036 OpDecorate %prevent_dce_block Block
37 OpMemberDecorate %prevent_dce_block 0 Offset 0
Natalie Chouinarde9027182024-06-13 18:50:19 +000038 OpDecorate %prevent_dce DescriptorSet 0
Ben Clayton77a90cb2023-03-06 18:25:08 +000039 OpDecorate %prevent_dce Binding 0
Natalie Chouinarde9027182024-06-13 18:50:19 +000040 OpMemberDecorate %VertexOutput 0 Offset 0
41 OpMemberDecorate %VertexOutput 1 Offset 16
Ben Clayton2e376a92022-10-26 18:47:02 +000042 %float = OpTypeFloat 32
43 %v4float = OpTypeVector %float 4
44%_ptr_Output_v4float = OpTypePointer Output %v4float
45 %5 = OpConstantNull %v4float
Natalie Chouinarde9027182024-06-13 18:50:19 +000046 %pos_1 = OpVariable %_ptr_Output_v4float Output %5
47%prevent_dce_1 = OpVariable %_ptr_Output_v4float Output %5
Ben Clayton2e376a92022-10-26 18:47:02 +000048%_ptr_Output_float = OpTypePointer Output %float
Natalie Chouinarde9027182024-06-13 18:50:19 +000049 %9 = OpConstantNull %float
50%vertex_point_size = OpVariable %_ptr_Output_float Output %9
51 %12 = OpTypeImage %float 2D 0 0 0 1 Unknown
52%_ptr_UniformConstant_12 = OpTypePointer UniformConstant %12
53 %arg_0 = OpVariable %_ptr_UniformConstant_12 UniformConstant
Ben Clayton77a90cb2023-03-06 18:25:08 +000054%prevent_dce_block = OpTypeStruct %v4float
55%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
56%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
Natalie Chouinarde9027182024-06-13 18:50:19 +000057 %16 = OpTypeFunction %v4float
Ben Clayton2e376a92022-10-26 18:47:02 +000058 %uint = OpTypeInt 32 0
59 %v2uint = OpTypeVector %uint 2
Ben Clayton4b606152022-11-04 17:06:03 +000060 %uint_1 = OpConstant %uint 1
Ben Clayton77a90cb2023-03-06 18:25:08 +000061 %24 = OpConstantComposite %v2uint %uint_1 %uint_1
Ben Clayton2e376a92022-10-26 18:47:02 +000062 %int = OpTypeInt 32 1
63 %int_1 = OpConstant %int 1
64%_ptr_Function_v4float = OpTypePointer Function %v4float
Natalie Chouinarde9027182024-06-13 18:50:19 +000065 %void = OpTypeVoid
66 %30 = OpTypeFunction %void
Ben Clayton77a90cb2023-03-06 18:25:08 +000067 %uint_0 = OpConstant %uint 0
68%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
Natalie Chouinarde9027182024-06-13 18:50:19 +000069%VertexOutput = OpTypeStruct %v4float %v4float
70 %42 = OpTypeFunction %VertexOutput
71%_ptr_Function_VertexOutput = OpTypePointer Function %VertexOutput
72 %48 = OpConstantNull %VertexOutput
Ben Clayton2e376a92022-10-26 18:47:02 +000073 %float_1 = OpConstant %float 1
Natalie Chouinarde9027182024-06-13 18:50:19 +000074%textureLoad_439e2a = OpFunction %v4float None %16
Ben Clayton77a90cb2023-03-06 18:25:08 +000075 %18 = OpLabel
Ben Clayton2e376a92022-10-26 18:47:02 +000076 %res = OpVariable %_ptr_Function_v4float Function %5
Natalie Chouinarde9027182024-06-13 18:50:19 +000077 %20 = OpLoad %12 %arg_0
Ben Clayton77a90cb2023-03-06 18:25:08 +000078 %19 = OpImageFetch %v4float %20 %24 Lod %int_1
79 OpStore %res %19
Natalie Chouinarde9027182024-06-13 18:50:19 +000080 %29 = OpLoad %v4float %res
81 OpReturnValue %29
82 OpFunctionEnd
83%fragment_main = OpFunction %void None %30
84 %33 = OpLabel
85 %36 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
86 %37 = OpFunctionCall %v4float %textureLoad_439e2a
87 OpStore %36 %37
Ben Clayton2e376a92022-10-26 18:47:02 +000088 OpReturn
89 OpFunctionEnd
Natalie Chouinarde9027182024-06-13 18:50:19 +000090%compute_main = OpFunction %void None %30
91 %39 = OpLabel
92 %40 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
93 %41 = OpFunctionCall %v4float %textureLoad_439e2a
94 OpStore %40 %41
Ben Clayton2e376a92022-10-26 18:47:02 +000095 OpReturn
96 OpFunctionEnd
Natalie Chouinarde9027182024-06-13 18:50:19 +000097%vertex_main_inner = OpFunction %VertexOutput None %42
Ben Clayton77a90cb2023-03-06 18:25:08 +000098 %45 = OpLabel
Natalie Chouinarde9027182024-06-13 18:50:19 +000099 %out = OpVariable %_ptr_Function_VertexOutput Function %48
100 %49 = OpAccessChain %_ptr_Function_v4float %out %uint_0
101 OpStore %49 %5
102 %50 = OpAccessChain %_ptr_Function_v4float %out %uint_1
103 %51 = OpFunctionCall %v4float %textureLoad_439e2a
104 OpStore %50 %51
105 %52 = OpLoad %VertexOutput %out
106 OpReturnValue %52
107 OpFunctionEnd
108%vertex_main = OpFunction %void None %30
109 %54 = OpLabel
110 %55 = OpFunctionCall %VertexOutput %vertex_main_inner
111 %56 = OpCompositeExtract %v4float %55 0
112 OpStore %pos_1 %56
113 %57 = OpCompositeExtract %v4float %55 1
114 OpStore %prevent_dce_1 %57
115 OpStore %vertex_point_size %float_1
Ben Clayton2e376a92022-10-26 18:47:02 +0000116 OpReturn
117 OpFunctionEnd