blob: f6b79b14cd71d83425d46aee53e08ed506758adc [file] [log] [blame]
Ben Claytonb07a7ce2021-06-03 11:26:17 +00001; SPIR-V
2; Version: 1.3
3; Generator: Google Tint Compiler; 0
Natalie Chouinarde9027182024-06-13 18:50:19 +00004; Bound: 63
Ben Claytonb07a7ce2021-06-03 11:26:17 +00005; Schema: 0
6 OpCapability Shader
7 OpMemoryModel Logical GLSL450
Ben Claytonb07a7ce2021-06-03 11:26:17 +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 Claytonb07a7ce2021-06-03 11:26:17 +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 Price11c6fcd2021-08-05 17:34:19 +000015 OpName %vertex_point_size "vertex_point_size"
Ben Claytonb07a7ce2021-06-03 11:26:17 +000016 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 Claytonb07a7ce2021-06-03 11:26:17 +000020 OpName %textureLoad_4fd803 "textureLoad_4fd803"
21 OpName %res "res"
Ben Claytonb07a7ce2021-06-03 11:26:17 +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 Price11c6fcd2021-08-05 17:34:19 +000033 OpDecorate %vertex_point_size BuiltIn PointSize
Ben Claytonb07a7ce2021-06-03 11:26:17 +000034 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 Claytonb07a7ce2021-06-03 11:26:17 +000042 %float = OpTypeFloat 32
James Price9fd3bef2021-06-04 17:31:48 +000043 %v4float = OpTypeVector %float 4
44%_ptr_Output_v4float = OpTypePointer Output %v4float
James Price11c6fcd2021-08-05 17:34:19 +000045 %5 = OpConstantNull %v4float
Natalie Chouinarde9027182024-06-13 18:50:19 +000046 %pos_1 = OpVariable %_ptr_Output_v4float Output %5
James Price11c6fcd2021-08-05 17:34:19 +000047 %int = OpTypeInt 32 1
Ben Claytonb07a7ce2021-06-03 11:26:17 +000048 %v4int = OpTypeVector %int 4
Natalie Chouinarde9027182024-06-13 18:50:19 +000049%_ptr_Output_v4int = OpTypePointer Output %v4int
50 %10 = OpConstantNull %v4int
51%prevent_dce_1 = OpVariable %_ptr_Output_v4int Output %10
52%_ptr_Output_float = OpTypePointer Output %float
53 %13 = OpConstantNull %float
54%vertex_point_size = OpVariable %_ptr_Output_float Output %13
55 %16 = OpTypeImage %int 3D 0 0 0 1 Unknown
56%_ptr_UniformConstant_16 = OpTypePointer UniformConstant %16
57 %arg_0 = OpVariable %_ptr_UniformConstant_16 UniformConstant
Ben Clayton77a90cb2023-03-06 18:25:08 +000058%prevent_dce_block = OpTypeStruct %v4int
59%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
60%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
Natalie Chouinarde9027182024-06-13 18:50:19 +000061 %20 = OpTypeFunction %v4int
Ben Claytonb07a7ce2021-06-03 11:26:17 +000062 %v3int = OpTypeVector %int 3
Ben Claytonc3adc782022-10-25 13:08:45 +000063 %int_1 = OpConstant %int 1
Natalie Chouinarde9027182024-06-13 18:50:19 +000064 %27 = OpConstantComposite %v3int %int_1 %int_1 %int_1
Ben Claytonb07a7ce2021-06-03 11:26:17 +000065%_ptr_Function_v4int = OpTypePointer Function %v4int
Natalie Chouinarde9027182024-06-13 18:50:19 +000066 %void = OpTypeVoid
67 %31 = OpTypeFunction %void
Ben Clayton77a90cb2023-03-06 18:25:08 +000068 %uint = OpTypeInt 32 0
69 %uint_0 = OpConstant %uint 0
70%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
Natalie Chouinarde9027182024-06-13 18:50:19 +000071%VertexOutput = OpTypeStruct %v4float %v4int
72 %44 = OpTypeFunction %VertexOutput
73%_ptr_Function_VertexOutput = OpTypePointer Function %VertexOutput
74 %50 = OpConstantNull %VertexOutput
75%_ptr_Function_v4float = OpTypePointer Function %v4float
76 %uint_1 = OpConstant %uint 1
Ben Claytonb07a7ce2021-06-03 11:26:17 +000077 %float_1 = OpConstant %float 1
Natalie Chouinarde9027182024-06-13 18:50:19 +000078%textureLoad_4fd803 = OpFunction %v4int None %20
79 %22 = OpLabel
80 %res = OpVariable %_ptr_Function_v4int Function %10
81 %24 = OpLoad %16 %arg_0
82 %23 = OpImageFetch %v4int %24 %27 Lod %int_1
83 OpStore %res %23
84 %30 = OpLoad %v4int %res
85 OpReturnValue %30
86 OpFunctionEnd
87%fragment_main = OpFunction %void None %31
88 %34 = OpLabel
89 %38 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
90 %39 = OpFunctionCall %v4int %textureLoad_4fd803
91 OpStore %38 %39
Ben Claytonb07a7ce2021-06-03 11:26:17 +000092 OpReturn
93 OpFunctionEnd
Natalie Chouinarde9027182024-06-13 18:50:19 +000094%compute_main = OpFunction %void None %31
95 %41 = OpLabel
96 %42 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
97 %43 = OpFunctionCall %v4int %textureLoad_4fd803
98 OpStore %42 %43
99 OpReturn
James Price9fd3bef2021-06-04 17:31:48 +0000100 OpFunctionEnd
Natalie Chouinarde9027182024-06-13 18:50:19 +0000101%vertex_main_inner = OpFunction %VertexOutput None %44
102 %47 = OpLabel
103 %out = OpVariable %_ptr_Function_VertexOutput Function %50
104 %52 = OpAccessChain %_ptr_Function_v4float %out %uint_0
105 OpStore %52 %5
106 %54 = OpAccessChain %_ptr_Function_v4int %out %uint_1
107 %55 = OpFunctionCall %v4int %textureLoad_4fd803
108 OpStore %54 %55
109 %56 = OpLoad %VertexOutput %out
110 OpReturnValue %56
111 OpFunctionEnd
112%vertex_main = OpFunction %void None %31
113 %58 = OpLabel
114 %59 = OpFunctionCall %VertexOutput %vertex_main_inner
115 %60 = OpCompositeExtract %v4float %59 0
116 OpStore %pos_1 %60
117 %61 = OpCompositeExtract %v4int %59 1
118 OpStore %prevent_dce_1 %61
James Price11c6fcd2021-08-05 17:34:19 +0000119 OpStore %vertex_point_size %float_1
Ben Claytonb07a7ce2021-06-03 11:26:17 +0000120 OpReturn
121 OpFunctionEnd