blob: ac6ce73b7e73b4d6a357b978bb6c7e66ab6b0948 [file] [log] [blame]
dan sinclair1b77b6c2024-08-06 15:47:05 +00001; SPIR-V
2; Version: 1.3
3; Generator: Google Tint Compiler; 1
4; Bound: 61
5; Schema: 0
6 OpCapability Shader
7 OpMemoryModel Logical GLSL450
8 OpEntryPoint Fragment %fragment_main "fragment_main"
9 OpEntryPoint GLCompute %compute_main "compute_main"
10 OpEntryPoint Vertex %vertex_main "vertex_main" %vertex_main_position_Output %vertex_main_loc0_Output %vertex_main___point_size_Output
11 OpExecutionMode %fragment_main OriginUpperLeft
12 OpExecutionMode %compute_main LocalSize 1 1 1
James Price71c1d542024-10-10 23:01:19 +000013 OpMemberName %prevent_dce_block 0 "inner"
14 OpName %prevent_dce_block "prevent_dce_block"
dan sinclair1b77b6c2024-08-06 15:47:05 +000015 OpName %arg_0 "arg_0"
16 OpName %vertex_main_position_Output "vertex_main_position_Output"
17 OpName %vertex_main_loc0_Output "vertex_main_loc0_Output"
18 OpName %vertex_main___point_size_Output "vertex_main___point_size_Output"
19 OpName %textureLoad_f56e6f "textureLoad_f56e6f"
20 OpName %res "res"
21 OpName %fragment_main "fragment_main"
22 OpName %compute_main "compute_main"
23 OpName %vertex_main_inner "vertex_main_inner"
24 OpMemberName %VertexOutput 0 "pos"
25 OpMemberName %VertexOutput 1 "prevent_dce"
26 OpName %VertexOutput "VertexOutput"
27 OpName %out "out"
28 OpName %vertex_main "vertex_main"
James Price71c1d542024-10-10 23:01:19 +000029 OpMemberDecorate %prevent_dce_block 0 Offset 0
30 OpDecorate %prevent_dce_block Block
dan sinclair1b77b6c2024-08-06 15:47:05 +000031 OpDecorate %1 DescriptorSet 0
32 OpDecorate %1 Binding 0
dan sinclaird117d652024-08-21 01:20:00 +000033 OpDecorate %1 Coherent
dan sinclair1b77b6c2024-08-06 15:47:05 +000034 OpDecorate %arg_0 DescriptorSet 1
35 OpDecorate %arg_0 Binding 0
36 OpDecorate %arg_0 NonWritable
37 OpDecorate %vertex_main_position_Output BuiltIn Position
38 OpDecorate %vertex_main_loc0_Output Location 0
39 OpDecorate %vertex_main_loc0_Output Flat
40 OpDecorate %vertex_main___point_size_Output BuiltIn PointSize
41 OpMemberDecorate %VertexOutput 0 Offset 0
42 OpMemberDecorate %VertexOutput 1 Offset 16
43 %uint = OpTypeInt 32 0
44 %v4uint = OpTypeVector %uint 4
James Price71c1d542024-10-10 23:01:19 +000045%prevent_dce_block = OpTypeStruct %v4uint
46%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
47 %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
dan sinclair1b77b6c2024-08-06 15:47:05 +000048 %8 = OpTypeImage %uint 3D 0 0 0 2 Rgba16ui
49%_ptr_UniformConstant_8 = OpTypePointer UniformConstant %8
50 %arg_0 = OpVariable %_ptr_UniformConstant_8 UniformConstant
51 %float = OpTypeFloat 32
52 %v4float = OpTypeVector %float 4
53%_ptr_Output_v4float = OpTypePointer Output %v4float
54%vertex_main_position_Output = OpVariable %_ptr_Output_v4float Output
55%_ptr_Output_v4uint = OpTypePointer Output %v4uint
56%vertex_main_loc0_Output = OpVariable %_ptr_Output_v4uint Output
57%_ptr_Output_float = OpTypePointer Output %float
58%vertex_main___point_size_Output = OpVariable %_ptr_Output_float Output
59 %18 = OpTypeFunction %v4uint
60 %int = OpTypeInt 32 1
61 %v3int = OpTypeVector %int 3
62 %int_1 = OpConstant %int 1
63 %22 = OpConstantComposite %v3int %int_1 %int_1 %int_1
64%_ptr_Function_v4uint = OpTypePointer Function %v4uint
65 %void = OpTypeVoid
66 %31 = OpTypeFunction %void
67%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
68 %uint_0 = OpConstant %uint 0
69%VertexOutput = OpTypeStruct %v4float %v4uint
70 %43 = OpTypeFunction %VertexOutput
71%_ptr_Function_VertexOutput = OpTypePointer Function %VertexOutput
72 %47 = OpConstantNull %VertexOutput
73%_ptr_Function_v4float = OpTypePointer Function %v4float
74 %50 = OpConstantNull %v4float
75 %uint_1 = OpConstant %uint 1
76 %float_1 = OpConstant %float 1
77%textureLoad_f56e6f = OpFunction %v4uint None %18
78 %19 = OpLabel
79 %res = OpVariable %_ptr_Function_v4uint Function
dan sinclair50260412024-08-28 19:43:27 +000080 %20 = OpLoad %8 %arg_0 None
dan sinclair1b77b6c2024-08-06 15:47:05 +000081 %21 = OpImageRead %v4uint %20 %22 None
82 OpStore %res %21
dan sinclair50260412024-08-28 19:43:27 +000083 %28 = OpLoad %v4uint %res None
dan sinclair1b77b6c2024-08-06 15:47:05 +000084 OpReturnValue %28
85 OpFunctionEnd
86%fragment_main = OpFunction %void None %31
87 %32 = OpLabel
88 %33 = OpFunctionCall %v4uint %textureLoad_f56e6f
89 %34 = OpAccessChain %_ptr_StorageBuffer_v4uint %1 %uint_0
dan sinclair50260412024-08-28 19:43:27 +000090 OpStore %34 %33 None
dan sinclair1b77b6c2024-08-06 15:47:05 +000091 OpReturn
92 OpFunctionEnd
93%compute_main = OpFunction %void None %31
94 %38 = OpLabel
95 %39 = OpFunctionCall %v4uint %textureLoad_f56e6f
96 %40 = OpAccessChain %_ptr_StorageBuffer_v4uint %1 %uint_0
dan sinclair50260412024-08-28 19:43:27 +000097 OpStore %40 %39 None
dan sinclair1b77b6c2024-08-06 15:47:05 +000098 OpReturn
99 OpFunctionEnd
100%vertex_main_inner = OpFunction %VertexOutput None %43
101 %44 = OpLabel
102 %out = OpVariable %_ptr_Function_VertexOutput Function %47
103 %48 = OpAccessChain %_ptr_Function_v4float %out %uint_0
dan sinclair50260412024-08-28 19:43:27 +0000104 OpStore %48 %50 None
dan sinclair1b77b6c2024-08-06 15:47:05 +0000105 %51 = OpAccessChain %_ptr_Function_v4uint %out %uint_1
106 %53 = OpFunctionCall %v4uint %textureLoad_f56e6f
dan sinclair50260412024-08-28 19:43:27 +0000107 OpStore %51 %53 None
108 %54 = OpLoad %VertexOutput %out None
dan sinclair1b77b6c2024-08-06 15:47:05 +0000109 OpReturnValue %54
110 OpFunctionEnd
111%vertex_main = OpFunction %void None %31
112 %56 = OpLabel
113 %57 = OpFunctionCall %VertexOutput %vertex_main_inner
114 %58 = OpCompositeExtract %v4float %57 0
dan sinclair50260412024-08-28 19:43:27 +0000115 OpStore %vertex_main_position_Output %58 None
dan sinclair1b77b6c2024-08-06 15:47:05 +0000116 %59 = OpCompositeExtract %v4uint %57 1
dan sinclair50260412024-08-28 19:43:27 +0000117 OpStore %vertex_main_loc0_Output %59 None
118 OpStore %vertex_main___point_size_Output %float_1 None
dan sinclair1b77b6c2024-08-06 15:47:05 +0000119 OpReturn
120 OpFunctionEnd