blob: 2f58c85ca69e97c87a6d6999f19aaf38f73c9b8a [file] [log] [blame]
Ben Claytonda5424b2022-10-24 23:58:53 +00001; SPIR-V
2; Version: 1.3
3; Generator: Google Tint Compiler; 0
Natalie Chouinarde9027182024-06-13 18:50:19 +00004; Bound: 60
Ben Claytonda5424b2022-10-24 23:58:53 +00005; Schema: 0
6 OpCapability Shader
7 OpCapability Sampled1D
8 OpMemoryModel Logical GLSL450
Ben Claytonda5424b2022-10-24 23:58:53 +00009 OpEntryPoint Fragment %fragment_main "fragment_main"
10 OpEntryPoint GLCompute %compute_main "compute_main"
Natalie Chouinarde9027182024-06-13 18:50:19 +000011 OpEntryPoint Vertex %vertex_main "vertex_main" %pos_1 %prevent_dce_1 %vertex_point_size
Ben Claytonda5424b2022-10-24 23:58:53 +000012 OpExecutionMode %fragment_main OriginUpperLeft
13 OpExecutionMode %compute_main LocalSize 1 1 1
Natalie Chouinarde9027182024-06-13 18:50:19 +000014 OpName %pos_1 "pos_1"
15 OpName %prevent_dce_1 "prevent_dce_1"
Ben Claytonda5424b2022-10-24 23:58:53 +000016 OpName %vertex_point_size "vertex_point_size"
17 OpName %arg_0 "arg_0"
Ben Clayton77a90cb2023-03-06 18:25:08 +000018 OpName %prevent_dce_block "prevent_dce_block"
19 OpMemberName %prevent_dce_block 0 "inner"
20 OpName %prevent_dce "prevent_dce"
Ben Claytonda5424b2022-10-24 23:58:53 +000021 OpName %textureLoad_0cb698 "textureLoad_0cb698"
22 OpName %res "res"
Ben Claytonda5424b2022-10-24 23:58:53 +000023 OpName %fragment_main "fragment_main"
24 OpName %compute_main "compute_main"
Natalie Chouinarde9027182024-06-13 18:50:19 +000025 OpName %VertexOutput "VertexOutput"
26 OpMemberName %VertexOutput 0 "pos"
27 OpMemberName %VertexOutput 1 "prevent_dce"
28 OpName %vertex_main_inner "vertex_main_inner"
29 OpName %out "out"
30 OpName %vertex_main "vertex_main"
31 OpDecorate %pos_1 BuiltIn Position
32 OpDecorate %prevent_dce_1 Location 0
33 OpDecorate %prevent_dce_1 Flat
Ben Claytonda5424b2022-10-24 23:58:53 +000034 OpDecorate %vertex_point_size BuiltIn PointSize
35 OpDecorate %arg_0 DescriptorSet 1
36 OpDecorate %arg_0 Binding 0
Ben Clayton77a90cb2023-03-06 18:25:08 +000037 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
Ben Clayton77a90cb2023-03-06 18:25:08 +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
Ben Claytonda5424b2022-10-24 23:58:53 +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
Ben Claytonda5424b2022-10-24 23:58:53 +000048 %int = OpTypeInt 32 1
Ben Claytonda5424b2022-10-24 23:58:53 +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 1D 0 0 0 1 Unknown
57%_ptr_UniformConstant_16 = OpTypePointer UniformConstant %16
58 %arg_0 = OpVariable %_ptr_UniformConstant_16 UniformConstant
Ben Clayton77a90cb2023-03-06 18:25:08 +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
Ben Claytonda5424b2022-10-24 23:58:53 +000063 %uint = OpTypeInt 32 0
64 %uint_1 = OpConstant %uint 1
65%_ptr_Function_v4int = OpTypePointer Function %v4int
Natalie Chouinarde9027182024-06-13 18:50:19 +000066 %void = OpTypeVoid
67 %30 = OpTypeFunction %void
Ben Clayton77a90cb2023-03-06 18:25:08 +000068 %uint_0 = OpConstant %uint 0
69%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
Natalie Chouinarde9027182024-06-13 18:50:19 +000070%VertexOutput = OpTypeStruct %v4float %v4int
71 %42 = OpTypeFunction %VertexOutput
72%_ptr_Function_VertexOutput = OpTypePointer Function %VertexOutput
73 %48 = OpConstantNull %VertexOutput
74%_ptr_Function_v4float = OpTypePointer Function %v4float
Ben Claytonda5424b2022-10-24 23:58:53 +000075 %float_1 = OpConstant %float 1
Natalie Chouinarde9027182024-06-13 18:50:19 +000076%textureLoad_0cb698 = OpFunction %v4int None %20
77 %22 = OpLabel
78 %res = OpVariable %_ptr_Function_v4int Function %10
79 %24 = OpLoad %16 %arg_0
80 %23 = OpImageFetch %v4int %24 %uint_1 Lod %uint_1
81 OpStore %res %23
82 %29 = OpLoad %v4int %res
83 OpReturnValue %29
84 OpFunctionEnd
85%fragment_main = OpFunction %void None %30
86 %33 = OpLabel
87 %36 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
88 %37 = OpFunctionCall %v4int %textureLoad_0cb698
89 OpStore %36 %37
Ben Claytonda5424b2022-10-24 23:58:53 +000090 OpReturn
91 OpFunctionEnd
Natalie Chouinarde9027182024-06-13 18:50:19 +000092%compute_main = OpFunction %void None %30
93 %39 = OpLabel
94 %40 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
95 %41 = OpFunctionCall %v4int %textureLoad_0cb698
96 OpStore %40 %41
97 OpReturn
Ben Claytonda5424b2022-10-24 23:58:53 +000098 OpFunctionEnd
Natalie Chouinarde9027182024-06-13 18:50:19 +000099%vertex_main_inner = OpFunction %VertexOutput None %42
100 %45 = OpLabel
101 %out = OpVariable %_ptr_Function_VertexOutput Function %48
102 %50 = OpAccessChain %_ptr_Function_v4float %out %uint_0
103 OpStore %50 %5
104 %51 = OpAccessChain %_ptr_Function_v4int %out %uint_1
105 %52 = OpFunctionCall %v4int %textureLoad_0cb698
106 OpStore %51 %52
107 %53 = OpLoad %VertexOutput %out
108 OpReturnValue %53
109 OpFunctionEnd
110%vertex_main = OpFunction %void None %30
111 %55 = OpLabel
112 %56 = OpFunctionCall %VertexOutput %vertex_main_inner
113 %57 = OpCompositeExtract %v4float %56 0
114 OpStore %pos_1 %57
115 %58 = OpCompositeExtract %v4int %56 1
116 OpStore %prevent_dce_1 %58
Ben Claytonda5424b2022-10-24 23:58:53 +0000117 OpStore %vertex_point_size %float_1
118 OpReturn
119 OpFunctionEnd