1spv.ext.meshShaderBuiltinsShadingRate.mesh
2// Module Version 10400
3// Generated by (magic number): 8000b
4// Id's are bound by 164
5
6                              Capability ClipDistance
7                              Capability CullDistance
8                              Capability FragmentShadingRateKHR
9                              Capability DrawParameters
10                              Capability MultiView
11                              Capability MeshShadingEXT
12                              Extension  "SPV_EXT_mesh_shader"
13                              Extension  "SPV_KHR_fragment_shading_rate"
14               1:             ExtInstImport  "GLSL.std.450"
15                              MemoryModel Logical GLSL450
16                              EntryPoint MeshEXT 4  "main" 13 19 24 41 93 140 158 161
17                              ExecutionMode 4 LocalSize 32 1 1
18                              ExecutionMode 4 OutputVertices 81
19                              ExecutionMode 4 OutputPrimitivesNV 32
20                              ExecutionMode 4 OutputTrianglesNV
21                              Source GLSL 460
22                              SourceExtension  "GL_ARB_shader_draw_parameters"
23                              SourceExtension  "GL_EXT_fragment_shading_rate"
24                              SourceExtension  "GL_EXT_mesh_shader"
25                              SourceExtension  "GL_EXT_multiview"
26                              Name 4  "main"
27                              Name 6  "testAdditionalBuiltins("
28                              Name 10  "iid"
29                              Name 13  "gl_LocalInvocationID"
30                              Name 18  "gid"
31                              Name 19  "gl_WorkGroupID"
32                              Name 23  "numWorkGrous"
33                              Name 24  "gl_NumWorkGroups"
34                              Name 26  "vertexCount"
35                              Name 28  "primitiveCount"
36                              Name 38  "gl_MeshPerVertexEXT"
37                              MemberName 38(gl_MeshPerVertexEXT) 0  "gl_Position"
38                              MemberName 38(gl_MeshPerVertexEXT) 1  "gl_PointSize"
39                              MemberName 38(gl_MeshPerVertexEXT) 2  "gl_ClipDistance"
40                              MemberName 38(gl_MeshPerVertexEXT) 3  "gl_CullDistance"
41                              Name 41  "gl_MeshVerticesEXT"
42                              Name 90  "gl_MeshPerPrimitiveEXT"
43                              MemberName 90(gl_MeshPerPrimitiveEXT) 0  "gl_PrimitiveID"
44                              MemberName 90(gl_MeshPerPrimitiveEXT) 1  "gl_Layer"
45                              MemberName 90(gl_MeshPerPrimitiveEXT) 2  "gl_ViewportIndex"
46                              MemberName 90(gl_MeshPerPrimitiveEXT) 3  "gl_CullPrimitiveEXT"
47                              MemberName 90(gl_MeshPerPrimitiveEXT) 4  "gl_PrimitiveShadingRateEXT"
48                              Name 93  "gl_MeshPrimitivesEXT"
49                              Name 140  "gl_PrimitiveTriangleIndicesEXT"
50                              Name 156  "id"
51                              Name 158  "gl_DrawIDARB"
52                              Name 160  "viewIdx"
53                              Name 161  "gl_ViewIndex"
54                              Decorate 13(gl_LocalInvocationID) BuiltIn LocalInvocationId
55                              Decorate 19(gl_WorkGroupID) BuiltIn WorkgroupId
56                              Decorate 24(gl_NumWorkGroups) BuiltIn NumWorkgroups
57                              Decorate 38(gl_MeshPerVertexEXT) Block
58                              MemberDecorate 38(gl_MeshPerVertexEXT) 0 BuiltIn Position
59                              MemberDecorate 38(gl_MeshPerVertexEXT) 1 BuiltIn PointSize
60                              MemberDecorate 38(gl_MeshPerVertexEXT) 2 BuiltIn ClipDistance
61                              MemberDecorate 38(gl_MeshPerVertexEXT) 3 BuiltIn CullDistance
62                              Decorate 90(gl_MeshPerPrimitiveEXT) Block
63                              MemberDecorate 90(gl_MeshPerPrimitiveEXT) 0 BuiltIn PrimitiveId
64                              MemberDecorate 90(gl_MeshPerPrimitiveEXT) 0 PerPrimitiveNV
65                              MemberDecorate 90(gl_MeshPerPrimitiveEXT) 1 BuiltIn Layer
66                              MemberDecorate 90(gl_MeshPerPrimitiveEXT) 1 PerPrimitiveNV
67                              MemberDecorate 90(gl_MeshPerPrimitiveEXT) 2 BuiltIn ViewportIndex
68                              MemberDecorate 90(gl_MeshPerPrimitiveEXT) 2 PerPrimitiveNV
69                              MemberDecorate 90(gl_MeshPerPrimitiveEXT) 3 BuiltIn CullPrimitiveEXT
70                              MemberDecorate 90(gl_MeshPerPrimitiveEXT) 3 PerPrimitiveNV
71                              MemberDecorate 90(gl_MeshPerPrimitiveEXT) 4 BuiltIn PrimitiveShadingRateKHR
72                              MemberDecorate 90(gl_MeshPerPrimitiveEXT) 4 PerPrimitiveNV
73                              Decorate 140(gl_PrimitiveTriangleIndicesEXT) BuiltIn PrimitiveTriangleIndicesEXT
74                              Decorate 158(gl_DrawIDARB) BuiltIn DrawIndex
75                              Decorate 161(gl_ViewIndex) BuiltIn ViewIndex
76                              Decorate 163 BuiltIn WorkgroupSize
77               2:             TypeVoid
78               3:             TypeFunction 2
79               8:             TypeInt 32 0
80               9:             TypePointer Function 8(int)
81              11:             TypeVector 8(int) 3
82              12:             TypePointer Input 11(ivec3)
8313(gl_LocalInvocationID):     12(ptr) Variable Input
84              14:      8(int) Constant 0
85              15:             TypePointer Input 8(int)
8619(gl_WorkGroupID):     12(ptr) Variable Input
87              22:             TypePointer Function 11(ivec3)
8824(gl_NumWorkGroups):     12(ptr) Variable Input
89              27:      8(int) Constant 81
90              29:      8(int) Constant 32
91              32:             TypeFloat 32
92              33:             TypeVector 32(float) 4
93              34:      8(int) Constant 4
94              35:             TypeArray 32(float) 34
95              36:      8(int) Constant 3
96              37:             TypeArray 32(float) 36
9738(gl_MeshPerVertexEXT):             TypeStruct 33(fvec4) 32(float) 35 37
98              39:             TypeArray 38(gl_MeshPerVertexEXT) 27
99              40:             TypePointer Output 39
10041(gl_MeshVerticesEXT):     40(ptr) Variable Output
101              43:             TypeInt 32 1
102              44:     43(int) Constant 0
103              45:   32(float) Constant 1065353216
104              46:   33(fvec4) ConstantComposite 45 45 45 45
105              47:             TypePointer Output 33(fvec4)
106              50:     43(int) Constant 1
107              51:   32(float) Constant 1073741824
108              52:             TypePointer Output 32(float)
109              55:     43(int) Constant 2
110              56:     43(int) Constant 3
111              57:   32(float) Constant 1077936128
112              60:   32(float) Constant 1082130432
113              62:      8(int) Constant 1
114              63:      8(int) Constant 264
115              64:      8(int) Constant 2
116              89:             TypeBool
11790(gl_MeshPerPrimitiveEXT):             TypeStruct 43(int) 43(int) 43(int) 89(bool) 43(int)
118              91:             TypeArray 90(gl_MeshPerPrimitiveEXT) 29
119              92:             TypePointer Output 91
12093(gl_MeshPrimitivesEXT):     92(ptr) Variable Output
121              95:     43(int) Constant 6
122              96:             TypePointer Output 43(int)
123              99:     43(int) Constant 7
124             102:     43(int) Constant 8
125             105:    89(bool) ConstantFalse
126             106:             TypePointer Output 89(bool)
127             109:     43(int) Constant 4
128             138:             TypeArray 11(ivec3) 29
129             139:             TypePointer Output 138
130140(gl_PrimitiveTriangleIndicesEXT):    139(ptr) Variable Output
131             141:      8(int) Constant 257
132             142:   11(ivec3) ConstantComposite 141 141 141
133             143:             TypePointer Output 11(ivec3)
134             147:   11(ivec3) ConstantComposite 64 64 64
135             155:             TypePointer Function 43(int)
136             157:             TypePointer Input 43(int)
137158(gl_DrawIDARB):    157(ptr) Variable Input
138161(gl_ViewIndex):    157(ptr) Variable Input
139             163:   11(ivec3) ConstantComposite 29 62 62
140         4(main):           2 Function None 3
141               5:             Label
142         10(iid):      9(ptr) Variable Function
143         18(gid):      9(ptr) Variable Function
14423(numWorkGrous):     22(ptr) Variable Function
145 26(vertexCount):      9(ptr) Variable Function
14628(primitiveCount):      9(ptr) Variable Function
147              16:     15(ptr) AccessChain 13(gl_LocalInvocationID) 14
148              17:      8(int) Load 16
149                              Store 10(iid) 17
150              20:     15(ptr) AccessChain 19(gl_WorkGroupID) 14
151              21:      8(int) Load 20
152                              Store 18(gid) 21
153              25:   11(ivec3) Load 24(gl_NumWorkGroups)
154                              Store 23(numWorkGrous) 25
155                              Store 26(vertexCount) 27
156                              Store 28(primitiveCount) 29
157              30:      8(int) Load 26(vertexCount)
158              31:      8(int) Load 28(primitiveCount)
159                              SetMeshOutputsEXT 30 31
160              42:      8(int) Load 10(iid)
161              48:     47(ptr) AccessChain 41(gl_MeshVerticesEXT) 42 44
162                              Store 48 46
163              49:      8(int) Load 10(iid)
164              53:     52(ptr) AccessChain 41(gl_MeshVerticesEXT) 49 50
165                              Store 53 51
166              54:      8(int) Load 10(iid)
167              58:     52(ptr) AccessChain 41(gl_MeshVerticesEXT) 54 55 56
168                              Store 58 57
169              59:      8(int) Load 10(iid)
170              61:     52(ptr) AccessChain 41(gl_MeshVerticesEXT) 59 56 55
171                              Store 61 60
172                              MemoryBarrier 62 63
173                              ControlBarrier 64 64 63
174              65:      8(int) Load 10(iid)
175              66:      8(int) IAdd 65 62
176              67:      8(int) Load 10(iid)
177              68:     47(ptr) AccessChain 41(gl_MeshVerticesEXT) 67 44
178              69:   33(fvec4) Load 68
179              70:     47(ptr) AccessChain 41(gl_MeshVerticesEXT) 66 44
180                              Store 70 69
181              71:      8(int) Load 10(iid)
182              72:      8(int) IAdd 71 62
183              73:      8(int) Load 10(iid)
184              74:     52(ptr) AccessChain 41(gl_MeshVerticesEXT) 73 50
185              75:   32(float) Load 74
186              76:     52(ptr) AccessChain 41(gl_MeshVerticesEXT) 72 50
187                              Store 76 75
188              77:      8(int) Load 10(iid)
189              78:      8(int) IAdd 77 62
190              79:      8(int) Load 10(iid)
191              80:     52(ptr) AccessChain 41(gl_MeshVerticesEXT) 79 55 56
192              81:   32(float) Load 80
193              82:     52(ptr) AccessChain 41(gl_MeshVerticesEXT) 78 55 56
194                              Store 82 81
195              83:      8(int) Load 10(iid)
196              84:      8(int) IAdd 83 62
197              85:      8(int) Load 10(iid)
198              86:     52(ptr) AccessChain 41(gl_MeshVerticesEXT) 85 56 55
199              87:   32(float) Load 86
200              88:     52(ptr) AccessChain 41(gl_MeshVerticesEXT) 84 56 55
201                              Store 88 87
202                              MemoryBarrier 62 63
203                              ControlBarrier 64 64 63
204              94:      8(int) Load 10(iid)
205              97:     96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 94 44
206                              Store 97 95
207              98:      8(int) Load 10(iid)
208             100:     96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 98 50
209                              Store 100 99
210             101:      8(int) Load 10(iid)
211             103:     96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 101 55
212                              Store 103 102
213             104:      8(int) Load 10(iid)
214             107:    106(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 104 56
215                              Store 107 105
216             108:      8(int) Load 10(iid)
217             110:     96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 108 109
218                              Store 110 44
219                              MemoryBarrier 62 63
220                              ControlBarrier 64 64 63
221             111:      8(int) Load 10(iid)
222             112:      8(int) IAdd 111 62
223             113:      8(int) Load 10(iid)
224             114:     96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 113 44
225             115:     43(int) Load 114
226             116:     96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 112 44
227                              Store 116 115
228             117:      8(int) Load 10(iid)
229             118:      8(int) IAdd 117 62
230             119:      8(int) Load 10(iid)
231             120:     96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 119 50
232             121:     43(int) Load 120
233             122:     96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 118 50
234                              Store 122 121
235             123:      8(int) Load 10(iid)
236             124:      8(int) IAdd 123 62
237             125:      8(int) Load 10(iid)
238             126:     96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 125 55
239             127:     43(int) Load 126
240             128:     96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 124 55
241                              Store 128 127
242             129:      8(int) Load 10(iid)
243             130:      8(int) IAdd 129 62
244             131:      8(int) Load 10(iid)
245             132:    106(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 131 56
246             133:    89(bool) Load 132
247             134:    106(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 130 56
248                              Store 134 133
249             135:      8(int) Load 10(iid)
250             136:      8(int) IAdd 135 62
251             137:     96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 136 109
252                              Store 137 44
253                              MemoryBarrier 62 63
254                              ControlBarrier 64 64 63
255             144:    143(ptr) AccessChain 140(gl_PrimitiveTriangleIndicesEXT) 44
256                              Store 144 142
257             145:      8(int) Load 28(primitiveCount)
258             146:      8(int) ISub 145 62
259             148:    143(ptr) AccessChain 140(gl_PrimitiveTriangleIndicesEXT) 146
260                              Store 148 147
261             149:      8(int) Load 18(gid)
262             150:      8(int) Load 18(gid)
263             151:      8(int) ISub 150 62
264             152:    143(ptr) AccessChain 140(gl_PrimitiveTriangleIndicesEXT) 151
265             153:   11(ivec3) Load 152
266             154:    143(ptr) AccessChain 140(gl_PrimitiveTriangleIndicesEXT) 149
267                              Store 154 153
268                              MemoryBarrier 62 63
269                              ControlBarrier 64 64 63
270                              Return
271                              FunctionEnd
2726(testAdditionalBuiltins():           2 Function None 3
273               7:             Label
274         156(id):    155(ptr) Variable Function
275    160(viewIdx):    155(ptr) Variable Function
276             159:     43(int) Load 158(gl_DrawIDARB)
277                              Store 156(id) 159
278             162:     43(int) Load 161(gl_ViewIndex)
279                              Store 160(viewIdx) 162
280                              Return
281                              FunctionEnd
282