1spv.debuginfo.bufferref.glsl.frag
2// Module Version 10000
3// Generated by (magic number): 8000b
4// Id's are bound by 142
5
6                              Capability Shader
7                              Capability PhysicalStorageBufferAddressesEXT
8                              Extension  "SPV_KHR_non_semantic_info"
9                              Extension  "SPV_KHR_physical_storage_buffer"
10                              Extension  "SPV_KHR_storage_buffer_storage_class"
11               1:             ExtInstImport  "NonSemantic.Shader.DebugInfo.100"
12               3:             ExtInstImport  "GLSL.std.450"
13                              MemoryModel PhysicalStorageBuffer64EXT GLSL450
14                              EntryPoint Fragment 14  "main" 76 131
15                              ExecutionMode 14 OriginUpperLeft
16               2:             String  "spv.debuginfo.bufferref.glsl.frag"
17               8:             String  "uint"
18              16:             String  "main"
19              19:             String  "// OpModuleProcessed auto-map-locations
20// OpModuleProcessed auto-map-bindings
21// OpModuleProcessed client vulkan100
22// OpModuleProcessed target-env vulkan1.0
23// OpModuleProcessed keep-uncalled
24// OpModuleProcessed entry-point main
25#line 1
26#version 450 core
27#extension GL_EXT_buffer_reference : enable
28
29layout(buffer_reference, std430) buffer MeshVertexPositions {
30  float data[];
31};
32
33struct Mesh {
34  MeshVertexPositions positions;
35};
36
37layout(set = 0, binding = 0) readonly buffer PerPass_meshes {
38  Mesh data[];
39} perPass_meshes;
40
41layout(location = 0) out vec4 out_fragColor;
42
43layout(location = 0) in flat uint tri_idx0;
44
45void main() {
46    Mesh meshData = perPass_meshes.data[tri_idx0];
47
48    vec3 vertex_pos0 = vec3(meshData.positions.data[3 * tri_idx0],
49                            meshData.positions.data[3 * tri_idx0 + 1],
50                            meshData.positions.data[3 * tri_idx0 + 2]);
51
52    out_fragColor = vec4(vertex_pos0, 1.0);
53}
54"
55              31:             String  "Mesh"
56              34:             String  "float"
57              40:             String  "data"
58              44:             String  "MeshVertexPositions"
59              50:             String  "meshData"
60              63:             String  "PerPass_meshes"
61              69:             String  "perPass_meshes"
62              71:             String  "int"
63              78:             String  "tri_idx0"
64              94:             String  "vertex_pos0"
65             133:             String  "out_fragColor"
66                              SourceExtension  "GL_EXT_buffer_reference"
67                              Name 14  "main"
68                              Name 29  "Mesh"
69                              MemberName 29(Mesh) 0  "positions"
70                              Name 38  "MeshVertexPositions"
71                              MemberName 38(MeshVertexPositions) 0  "data"
72                              Name 48  "meshData"
73                              Name 54  "Mesh"
74                              MemberName 54(Mesh) 0  "positions"
75                              Name 58  "PerPass_meshes"
76                              MemberName 58(PerPass_meshes) 0  "data"
77                              Name 67  "perPass_meshes"
78                              Name 76  "tri_idx0"
79                              Name 92  "vertex_pos0"
80                              Name 131  "out_fragColor"
81                              Decorate 36 ArrayStride 4
82                              MemberDecorate 38(MeshVertexPositions) 0 Offset 0
83                              Decorate 38(MeshVertexPositions) Block
84                              MemberDecorate 54(Mesh) 0 Offset 0
85                              Decorate 56 ArrayStride 8
86                              MemberDecorate 58(PerPass_meshes) 0 NonWritable
87                              MemberDecorate 58(PerPass_meshes) 0 Offset 0
88                              Decorate 58(PerPass_meshes) Block
89                              Decorate 67(perPass_meshes) DescriptorSet 0
90                              Decorate 67(perPass_meshes) Binding 0
91                              Decorate 76(tri_idx0) Flat
92                              Decorate 76(tri_idx0) Location 0
93                              Decorate 131(out_fragColor) Location 0
94                              Decorate 48(meshData) DecorationAliasedPointerEXT
95               4:             TypeVoid
96               5:             TypeFunction 4
97               7:             TypeInt 32 0
98              10:      7(int) Constant 32
99              11:      7(int) Constant 6
100              12:      7(int) Constant 0
101               9:           4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 8 10 11 12
102              13:      7(int) Constant 3
103               6:           4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 4
104              18:           4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 2 19
105              20:      7(int) Constant 20
106              22:      7(int) Constant 1
107              23:      7(int) Constant 4
108              24:      7(int) Constant 2
109              21:           4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 1(DebugCompilationUnit) 22 23 18 24
110              17:           4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 16 6 18 20 12 21 16 13 20
111                              TypeForwardPointer 28 PhysicalStorageBufferEXT
112        29(Mesh):             TypeStruct 28
113              32:      7(int) Constant 21
114              30:           4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 31 22 18 32 12 21 31 12 13
115              33:             TypeFloat 32
116              35:           4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 34 10 13 12
117              36:             TypeRuntimeArray 33(float)
118              37:           4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 35 12
11938(MeshVertexPositions):             TypeStruct 36
120              41:      7(int) Constant 5
121              42:      7(int) Constant 9
122              39:           4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 40 37 18 41 42 12 12 13
123              43:           4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 44 22 18 32 12 21 44 12 13 39
124              28:             TypePointer PhysicalStorageBufferEXT 38(MeshVertexPositions)
125              45:             TypePointer Function 29(Mesh)
126              46:      7(int) Constant 7
127              47:           4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 30 46 12
128              49:           4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 50 30 18 32 12 17 23
129              52:           4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression)
130        54(Mesh):             TypeStruct 28(ptr)
131              55:           4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 31 22 18 32 12 21 31 12 13
132              56:             TypeRuntimeArray 54(Mesh)
133              57:           4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 55 12
13458(PerPass_meshes):             TypeStruct 56
135              60:      7(int) Constant 13
136              61:      7(int) Constant 8
137              59:           4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 40 57 18 60 61 12 12 13
138              62:           4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 63 22 18 32 12 21 63 12 13 59
139              64:             TypePointer StorageBuffer 58(PerPass_meshes)
140              65:      7(int) Constant 12
141              66:           4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 62 65 12
14267(perPass_meshes):     64(ptr) Variable StorageBuffer
143              68:           4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 69 62 18 32 12 21 69 67(perPass_meshes) 61
144              70:             TypeInt 32 1
145              72:           4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 71 10 23 12
146              73:     70(int) Constant 0
147              74:             TypePointer Input 7(int)
148              75:           4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 9 22 12
149    76(tri_idx0):     74(ptr) Variable Input
150              77:           4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 78 9 18 32 12 21 78 76(tri_idx0) 61
151              80:             TypePointer StorageBuffer 54(Mesh)
152              81:           4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 55 65 12
153              85:             TypePointer Function 28(ptr)
154              86:           4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 0(DebugInfoNone)
155              88:             TypeVector 33(float) 3
156              89:           4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 35 13
157              90:             TypePointer Function 88(fvec3)
158              91:           4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 89 46 12
159              95:      7(int) Constant 23
160              93:           4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 94 89 18 95 12 17 23
161             102:             TypePointer PhysicalStorageBufferEXT 33(float)
162             103:      7(int) Constant 5349
163             104:           4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 35 103 12
164             109:      7(int) Constant 24
165             118:      7(int) Constant 25
166             127:             TypeVector 33(float) 4
167             128:           4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 35 23
168             129:             TypePointer Output 127(fvec4)
169             130:           4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 128 13 12
170131(out_fragColor):    129(ptr) Variable Output
171             134:      7(int) Constant 27
172             132:           4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 133 128 18 134 12 21 133 131(out_fragColor) 61
173             137:   33(float) Constant 1065353216
174        14(main):           4 Function None 5
175              15:             Label
176    48(meshData):     45(ptr) Variable Function
177 92(vertex_pos0):     90(ptr) Variable Function
178              26:           4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 17
179              27:           4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 20 20 12 12
180              25:           4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 17 14(main)
181              53:           4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 32 32 12 12
182              51:           4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 49 48(meshData) 52
183              79:      7(int) Load 76(tri_idx0)
184              82:     80(ptr) AccessChain 67(perPass_meshes) 73 79
185              83:    54(Mesh) Load 82
186              84:     28(ptr) CompositeExtract 83 0
187              87:     85(ptr) AccessChain 48(meshData) 73
188                              Store 87 84
189              97:           4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 95 95 12 12
190              96:           4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 93 92(vertex_pos0) 52
191              98:     85(ptr) AccessChain 48(meshData) 73
192              99:     28(ptr) Load 98
193             100:      7(int) Load 76(tri_idx0)
194             101:      7(int) IMul 13 100
195             105:    102(ptr) AccessChain 99 73 101
196             106:   33(float) Load 105 Aligned 4
197             108:           4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 109 109 12 12
198             107:     85(ptr) AccessChain 48(meshData) 73
199             110:     28(ptr) Load 107
200             111:      7(int) Load 76(tri_idx0)
201             112:      7(int) IMul 13 111
202             113:      7(int) IAdd 112 22
203             114:    102(ptr) AccessChain 110 73 113
204             115:   33(float) Load 114 Aligned 4
205             117:           4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 118 118 12 12
206             116:     85(ptr) AccessChain 48(meshData) 73
207             119:     28(ptr) Load 116
208             120:      7(int) Load 76(tri_idx0)
209             121:      7(int) IMul 13 120
210             122:      7(int) IAdd 121 24
211             123:    102(ptr) AccessChain 119 73 122
212             124:   33(float) Load 123 Aligned 4
213             125:   88(fvec3) CompositeConstruct 106 115 124
214             126:           4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 95 95 12 12
215                              Store 92(vertex_pos0) 125
216             136:           4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 134 134 12 12
217             135:   88(fvec3) Load 92(vertex_pos0)
218             138:   33(float) CompositeExtract 135 0
219             139:   33(float) CompositeExtract 135 1
220             140:   33(float) CompositeExtract 135 2
221             141:  127(fvec4) CompositeConstruct 138 139 140 137
222                              Store 131(out_fragColor) 141
223                              Return
224                              FunctionEnd
225