blob: 596e31a905b28b35487e9d5c4667f5ab2a50b767 [file] [log] [blame]
Ben Clayton13f08902022-10-26 18:36:44 +00001; SPIR-V
2; Version: 1.3
3; Generator: Google Tint Compiler; 0
Natalie Chouinarde9027182024-06-13 18:50:19 +00004; Bound: 60
Ben Clayton13f08902022-10-26 18:36:44 +00005; Schema: 0
6 OpCapability Shader
7 OpCapability ImageQuery
8 OpMemoryModel Logical GLSL450
Ben Clayton13f08902022-10-26 18:36:44 +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 Clayton13f08902022-10-26 18:36:44 +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 Clayton13f08902022-10-26 18:36:44 +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 Clayton13f08902022-10-26 18:36:44 +000021 OpName %textureNumLayers_d75a0b "textureNumLayers_d75a0b"
22 OpName %res "res"
Ben Clayton13f08902022-10-26 18:36:44 +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 Clayton13f08902022-10-26 18:36:44 +000034 OpDecorate %vertex_point_size BuiltIn PointSize
35 OpDecorate %arg_0 NonReadable
36 OpDecorate %arg_0 DescriptorSet 1
37 OpDecorate %arg_0 Binding 0
Ben Clayton77a90cb2023-03-06 18:25:08 +000038 OpDecorate %prevent_dce_block Block
39 OpMemberDecorate %prevent_dce_block 0 Offset 0
Natalie Chouinarde9027182024-06-13 18:50:19 +000040 OpDecorate %prevent_dce DescriptorSet 0
Ben Clayton77a90cb2023-03-06 18:25:08 +000041 OpDecorate %prevent_dce Binding 0
Natalie Chouinarde9027182024-06-13 18:50:19 +000042 OpMemberDecorate %VertexOutput 0 Offset 0
43 OpMemberDecorate %VertexOutput 1 Offset 16
Ben Clayton13f08902022-10-26 18:36:44 +000044 %float = OpTypeFloat 32
45 %v4float = OpTypeVector %float 4
46%_ptr_Output_v4float = OpTypePointer Output %v4float
47 %5 = OpConstantNull %v4float
Natalie Chouinarde9027182024-06-13 18:50:19 +000048 %pos_1 = OpVariable %_ptr_Output_v4float Output %5
Ben Clayton13f08902022-10-26 18:36:44 +000049 %uint = OpTypeInt 32 0
Natalie Chouinarde9027182024-06-13 18:50:19 +000050%_ptr_Output_uint = OpTypePointer Output %uint
51 %9 = OpConstantNull %uint
52%prevent_dce_1 = OpVariable %_ptr_Output_uint Output %9
53%_ptr_Output_float = OpTypePointer Output %float
54 %12 = OpConstantNull %float
55%vertex_point_size = OpVariable %_ptr_Output_float Output %12
56 %15 = OpTypeImage %float 2D 0 1 0 2 Rgba32f
57%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15
58 %arg_0 = OpVariable %_ptr_UniformConstant_15 UniformConstant
Ben Clayton77a90cb2023-03-06 18:25:08 +000059%prevent_dce_block = OpTypeStruct %uint
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 %19 = OpTypeFunction %uint
Ben Clayton13f08902022-10-26 18:36:44 +000063 %v3uint = OpTypeVector %uint 3
64%_ptr_Function_uint = OpTypePointer Function %uint
Natalie Chouinarde9027182024-06-13 18:50:19 +000065 %void = OpTypeVoid
66 %29 = OpTypeFunction %void
Ben Clayton77a90cb2023-03-06 18:25:08 +000067 %uint_0 = OpConstant %uint 0
68%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
Natalie Chouinarde9027182024-06-13 18:50:19 +000069%VertexOutput = OpTypeStruct %v4float %uint
70 %41 = OpTypeFunction %VertexOutput
71%_ptr_Function_VertexOutput = OpTypePointer Function %VertexOutput
72 %47 = OpConstantNull %VertexOutput
73%_ptr_Function_v4float = OpTypePointer Function %v4float
74 %uint_1 = OpConstant %uint 1
Ben Clayton13f08902022-10-26 18:36:44 +000075 %float_1 = OpConstant %float 1
Natalie Chouinarde9027182024-06-13 18:50:19 +000076%textureNumLayers_d75a0b = OpFunction %uint None %19
77 %21 = OpLabel
78 %res = OpVariable %_ptr_Function_uint Function %9
79 %25 = OpLoad %15 %arg_0
80 %23 = OpImageQuerySize %v3uint %25
81 %22 = OpCompositeExtract %uint %23 2
82 OpStore %res %22
83 %28 = OpLoad %uint %res
84 OpReturnValue %28
85 OpFunctionEnd
86%fragment_main = OpFunction %void None %29
87 %32 = OpLabel
88 %35 = OpAccessChain %_ptr_StorageBuffer_uint %prevent_dce %uint_0
89 %36 = OpFunctionCall %uint %textureNumLayers_d75a0b
90 OpStore %35 %36
Ben Clayton13f08902022-10-26 18:36:44 +000091 OpReturn
92 OpFunctionEnd
Natalie Chouinarde9027182024-06-13 18:50:19 +000093%compute_main = OpFunction %void None %29
94 %38 = OpLabel
95 %39 = OpAccessChain %_ptr_StorageBuffer_uint %prevent_dce %uint_0
96 %40 = OpFunctionCall %uint %textureNumLayers_d75a0b
97 OpStore %39 %40
98 OpReturn
Ben Clayton13f08902022-10-26 18:36:44 +000099 OpFunctionEnd
Natalie Chouinarde9027182024-06-13 18:50:19 +0000100%vertex_main_inner = OpFunction %VertexOutput None %41
101 %44 = OpLabel
102 %out = OpVariable %_ptr_Function_VertexOutput Function %47
103 %49 = OpAccessChain %_ptr_Function_v4float %out %uint_0
104 OpStore %49 %5
105 %51 = OpAccessChain %_ptr_Function_uint %out %uint_1
106 %52 = OpFunctionCall %uint %textureNumLayers_d75a0b
107 OpStore %51 %52
108 %53 = OpLoad %VertexOutput %out
109 OpReturnValue %53
110 OpFunctionEnd
111%vertex_main = OpFunction %void None %29
112 %55 = OpLabel
113 %56 = OpFunctionCall %VertexOutput %vertex_main_inner
114 %57 = OpCompositeExtract %v4float %56 0
115 OpStore %pos_1 %57
116 %58 = OpCompositeExtract %uint %56 1
117 OpStore %prevent_dce_1 %58
Ben Clayton13f08902022-10-26 18:36:44 +0000118 OpStore %vertex_point_size %float_1
119 OpReturn
120 OpFunctionEnd