yum-mirror/glslang

git clone https://git.yummers.dev/yum-mirror/glslang

alelenvFix bug in handling slice of array being passed cooperative matrix load/store functions and strengthen error checks. (#4007)8e12361e

main
19.1 KiB363 linesraw
1spv.coopmat.comp
2// Module Version 10300
3// Generated by (magic number): 8000b
4// Id's are bound by 224
5
6                              Capability Shader
7                              Capability Float16
8                              Capability StorageUniformBufferBlock16
9                              Capability VulkanMemoryModelKHR
10                              Capability PhysicalStorageBufferAddressesEXT
11                              Capability CooperativeMatrixNV
12                              Extension  "SPV_KHR_physical_storage_buffer"
13                              Extension  "SPV_KHR_vulkan_memory_model"
14                              Extension  "SPV_NV_cooperative_matrix"
15               1:             ExtInstImport  "GLSL.std.450"
16                              MemoryModel PhysicalStorageBuffer64EXT VulkanKHR
17                              EntryPoint GLCompute 4  "main"
18                              ExecutionMode 4 LocalSize 64 1 1
19                              Source GLSL 450
20                              SourceExtension  "GL_EXT_buffer_reference"
21                              SourceExtension  "GL_EXT_shader_explicit_arithmetic_types_float16"
22                              SourceExtension  "GL_KHR_memory_scope_semantics"
23                              SourceExtension  "GL_NV_cooperative_matrix"
24                              Name 4  "main"
25                              Name 14  "f16(f161<16><3><8><8>;"
26                              Name 13  "m"
27                              Name 21  "f32(f1<32><3><8><8>;"
28                              Name 20  "m"
29                              Name 34  "m"
30                              Name 52  "m2"
31                              Name 56  "x"
32                              Name 67  "Block"
33                              MemberName 67(Block) 0  "y"
34                              MemberName 67(Block) 1  "x"
35                              Name 69  "block"
36                              Name 86  "Block16"
37                              MemberName 86(Block16) 0  "arr"
38                              MemberName 86(Block16) 1  "y"
39                              MemberName 86(Block16) 2  "x"
40                              MemberName 86(Block16) 3  "b"
41                              Name 89  "Block"
42                              MemberName 89(Block) 0  "y"
43                              MemberName 89(Block) 1  "x"
44                              Name 91  "block16"
45                              Name 109  "D"
46                              Name 110  "A"
47                              Name 112  "B"
48                              Name 114  "C"
49                              Name 118  "l"
50                              Name 122  "Y"
51                              Name 123  "Z"
52                              Name 126  "F"
53                              Name 131  "a"
54                              Name 134  "md1"
55                              Name 145  "mC2"
56                              Name 158  "p1"
57                              Name 159  "param"
58                              Name 162  "p2"
59                              Name 163  "param"
60                              Name 177  "ms"
61                              Name 182  "shmatrix"
62                              Name 197  "mC"
63                              Name 202  "arr"
64                              Name 207  "arr2"
65                              Name 208  "F"
66                              Name 213  "S"
67                              MemberName 213(S) 0  "a"
68                              MemberName 213(S) 1  "b"
69                              MemberName 213(S) 2  "c"
70                              Name 218  "SC"
71                              Name 223  "scm"
72                              Decorate 65 ArrayStride 4
73                              Decorate 66 ArrayStride 4
74                              Decorate 67(Block) Block
75                              MemberDecorate 67(Block) 0 Offset 0
76                              MemberDecorate 67(Block) 1 Offset 4194304
77                              Decorate 69(block) Binding 0
78                              Decorate 69(block) DescriptorSet 0
79                              Decorate 80 ArrayStride 2
80                              Decorate 81 ArrayStride 512
81                              Decorate 82 ArrayStride 2
82                              Decorate 84 ArrayStride 2
83                              Decorate 86(Block16) Block
84                              MemberDecorate 86(Block16) 0 Offset 0
85                              MemberDecorate 86(Block16) 1 Offset 131072
86                              MemberDecorate 86(Block16) 2 Offset 2228224
87                              MemberDecorate 86(Block16) 3 Offset 2228232
88                              Decorate 87 ArrayStride 4
89                              Decorate 88 ArrayStride 4
90                              Decorate 89(Block) Block
91                              MemberDecorate 89(Block) 0 Offset 0
92                              MemberDecorate 89(Block) 1 Offset 4194304
93                              Decorate 91(block16) Binding 0
94                              Decorate 91(block16) DescriptorSet 0
95                              Decorate 122(Y) SpecId 0
96                              Decorate 196 BuiltIn WorkgroupSize
97                              Decorate 208(F) SpecId 1
98                              Decorate 218(SC) SpecId 2
99               2:             TypeVoid
100               3:             TypeFunction 2
101               6:             TypeFloat 16
102               7:             TypeInt 32 0
103               8:      7(int) Constant 3
104               9:      7(int) Constant 8
105              10:             TypeCooperativeMatrixNV 6(float16_t) 8 9 9
106              11:             TypePointer Function 10
107              12:             TypeFunction 10 11(ptr)
108              16:             TypeFloat 32
109              17:             TypeCooperativeMatrixNV 16(float) 8 9 9
110              18:             TypePointer Function 17
111              19:             TypeFunction 17 18(ptr)
112              31:      7(int) Constant 16
113              32:             TypeCooperativeMatrixNV 16(float) 8 31 9
114              33:             TypePointer Function 32
115              35:   16(float) Constant 0
116              36:          32 ConstantComposite 35
117              45:   16(float) Constant 1073741824
118              50:             TypeCooperativeMatrixNV 6(float16_t) 8 31 9
119              51:             TypePointer Function 50
120              55:             TypePointer Function 16(float)
121              57:             TypeInt 32 1
122              58:     57(int) Constant 1
123              61:     57(int) Constant 0
124              64:      7(int) Constant 1048576
125              65:             TypeArray 16(float) 64
126              66:             TypeRuntimeArray 16(float)
127       67(Block):             TypeStruct 65 66
128              68:             TypePointer StorageBuffer 67(Block)
129       69(block):     68(ptr) Variable StorageBuffer
130              70:      7(int) Constant 5
131              71:             TypePointer StorageBuffer 16(float)
132              73:      7(int) Constant 128
133              74:             TypeBool
134              75:    74(bool) ConstantFalse
135              79:      7(int) Constant 256
136              80:             TypeArray 6(float16_t) 79
137              81:             TypeArray 80 79
138              82:             TypeArray 6(float16_t) 64
139              83:      7(int) Constant 1
140              84:             TypeArray 6(float16_t) 83
141                              TypeForwardPointer 85 PhysicalStorageBufferEXT
142     86(Block16):             TypeStruct 81 82 84 85
143              87:             TypeArray 16(float) 64
144              88:             TypeRuntimeArray 16(float)
145       89(Block):             TypeStruct 87 88
146              85:             TypePointer PhysicalStorageBufferEXT 89(Block)
147              90:             TypePointer StorageBuffer 86(Block16)
148     91(block16):     90(ptr) Variable StorageBuffer
149              92:     57(int) Constant 2
150              93:             TypePointer StorageBuffer 6(float16_t)
151              98:     57(int) Constant 3
152              99:             TypePointer StorageBuffer 85(ptr)
153             102:             TypePointer PhysicalStorageBufferEXT 16(float)
154             117:             TypePointer Function 57(int)
155             119:      7(int) SpecConstantOp 5362 32
156             120:     57(int) SpecConstantOp 128 119 61
157             121:     57(int) Constant 8
158          122(Y):     57(int) SpecConstant 2
159          123(Z):     57(int) SpecConstantOp 132 121 122(Y)
160             124:             TypeCooperativeMatrixNV 6(float16_t) 8 123(Z) 123(Z)
161             125:             TypePointer Function 124
162             127:6(float16_t) Constant 0
163             128:         124 ConstantComposite 127
164             129:             TypeArray 32 70
165             130:             TypePointer Function 129
166             132:   16(float) Constant 1065353216
167             138:     57(int) Constant 1234
168             142:             TypeCooperativeMatrixNV 6(float16_t) 8 123(Z) 9
169             143:             TypeArray 142 8
170             144:             TypePointer Private 143
171        145(mC2):    144(ptr) Variable Private
172             146:             TypePointer Private 142
173             166:          10 ConstantComposite 127
174             167:          17 ConstantComposite 35
175             171:6(float16_t) Constant 16384
176             174:   16(float) Constant 1082130432
177             178:             TypeVector 7(int) 4
178             179:      7(int) Constant 32
179             180:             TypeArray 178(ivec4) 179
180             181:             TypePointer Workgroup 180
181   182(shmatrix):    181(ptr) Variable Workgroup
182             183:      7(int) Constant 2
183             184:             TypePointer Workgroup 178(ivec4)
184             192:     57(int) Constant 16
185             194:             TypeVector 7(int) 3
186             195:      7(int) Constant 64
187             196:  194(ivec3) ConstantComposite 195 83 83
188         197(mC):    146(ptr) Variable Private
189             198:      7(int) SpecConstantOp 5362 142
190             199:     57(int) SpecConstantOp 128 198 61
191             200:             TypeArray 57(int) 199
192             201:             TypePointer Private 200
193        202(arr):    201(ptr) Variable Private
194             203:      7(int) SpecConstantOp 5362 142
195             204:     57(int) SpecConstantOp 128 203 61
196             205:             TypeArray 57(int) 204
197             206:             TypePointer Private 205
198       207(arr2):    206(ptr) Variable Private
199          208(F):   16(float) SpecConstant 1077936128
200             209:             TypeCooperativeMatrixNV 16(float) 8 123(Z) 9
201             210:         209 ConstantComposite 35
202             211:6(float16_t) Constant 15360
203             212:          10 ConstantComposite 211
204          213(S):             TypeStruct 57(int) 57(int) 57(int)
205             214:     57(int) Constant 12
206             215:     57(int) Constant 23
207             216:     57(int) Constant 34
208             217:      213(S) ConstantComposite 214 215 216
209         218(SC):     57(int) SpecConstant 1
210             219:             TypeCooperativeMatrixNV 6(float16_t) 8 218(SC) 218(SC)
211             220:             TypeArray 219 218(SC)
212             221:             TypeArray 220 218(SC)
213             222:             TypePointer Private 221
214        223(scm):    222(ptr) Variable Private
215         4(main):           2 Function None 3
216               5:             Label
217           34(m):     33(ptr) Variable Function
218          52(m2):     51(ptr) Variable Function
219           56(x):     55(ptr) Variable Function
220          109(D):     33(ptr) Variable Function
221          110(A):     51(ptr) Variable Function
222          112(B):     11(ptr) Variable Function
223          114(C):     33(ptr) Variable Function
224          118(l):    117(ptr) Variable Function
225          126(F):    125(ptr) Variable Function
226          131(a):    130(ptr) Variable Function
227        134(md1):     55(ptr) Variable Function
228         158(p1):     11(ptr) Variable Function
229      159(param):     11(ptr) Variable Function
230         162(p2):     18(ptr) Variable Function
231      163(param):     18(ptr) Variable Function
232         177(ms):     51(ptr) Variable Function
233                              Store 34(m) 36
234              37:          32 Load 34(m)
235              38:          32 Load 34(m)
236              39:          32 FAdd 37 38
237                              Store 34(m) 39
238              40:          32 Load 34(m)
239              41:          32 Load 34(m)
240              42:          32 FSub 40 41
241                              Store 34(m) 42
242              43:          32 Load 34(m)
243              44:          32 FNegate 43
244                              Store 34(m) 44
245              46:          32 Load 34(m)
246              47:          32 MatrixTimesScalar 46 45
247                              Store 34(m) 47
248              48:          32 Load 34(m)
249              49:          32 MatrixTimesScalar 48 45
250                              Store 34(m) 49
251              53:          32 Load 34(m)
252              54:          50 FConvert 53
253                              Store 52(m2) 54
254              59:     55(ptr) AccessChain 34(m) 58
255              60:   16(float) Load 59
256                              Store 56(x) 60
257              62:   16(float) Load 56(x)
258              63:     55(ptr) AccessChain 34(m) 61
259                              Store 63 62
260              72:     71(ptr) AccessChain 69(block) 58 31
261              76:          32 CooperativeMatrixLoadNV 72 73 75 MakePointerVisibleKHR NonPrivatePointerKHR 70
262                              Store 34(m) 76
263              77:          32 Load 34(m)
264              78:     71(ptr) AccessChain 69(block) 58 31
265                              CooperativeMatrixStoreNV 78 77 73 75 MakePointerAvailableKHR NonPrivatePointerKHR 70
266              94:     93(ptr) AccessChain 91(block16) 92 31
267              95:          50 CooperativeMatrixLoadNV 94 73 75 MakePointerVisibleKHR NonPrivatePointerKHR 70
268                              Store 52(m2) 95
269              96:          50 Load 52(m2)
270              97:     93(ptr) AccessChain 91(block16) 92 31
271                              CooperativeMatrixStoreNV 97 96 73 75 MakePointerAvailableKHR NonPrivatePointerKHR 70
272             100:     99(ptr) AccessChain 91(block16) 98
273             101:     85(ptr) Load 100 MakePointerVisibleKHR NonPrivatePointerKHR 70
274             103:    102(ptr) AccessChain 101 58 31
275             104:          32 CooperativeMatrixLoadNV 103 73 75 Aligned MakePointerVisibleKHR NonPrivatePointerKHR 16 70
276                              Store 34(m) 104
277             105:          32 Load 34(m)
278             106:     99(ptr) AccessChain 91(block16) 98
279             107:     85(ptr) Load 106 MakePointerVisibleKHR NonPrivatePointerKHR 70
280             108:    102(ptr) AccessChain 107 58 31
281                              CooperativeMatrixStoreNV 108 105 73 75 Aligned MakePointerAvailableKHR NonPrivatePointerKHR 16 70
282             111:          50 Load 110(A)
283             113:          10 Load 112(B)
284             115:          32 Load 114(C)
285             116:          32 CooperativeMatrixMulAddNV 111 113 115
286                              Store 109(D) 116
287                              Store 118(l) 120
288                              Store 126(F) 128
289             133:     55(ptr) AccessChain 131(a) 98 61
290                              Store 133 132
291                              Store 134(md1) 35
292             135:          32 Load 34(m)
293             136:          32 Load 34(m)
294             137:          32 FAdd 136 135
295                              Store 34(m) 137
296             139:   16(float) CompositeExtract 137 1234
297             140:   16(float) Load 134(md1)
298             141:   16(float) FAdd 140 139
299                              Store 134(md1) 141
300             147:    146(ptr) AccessChain 145(mC2) 92
301             148:         142 Load 147
302             149:    146(ptr) AccessChain 145(mC2) 58
303                              Store 149 148
304             150:     71(ptr) AccessChain 69(block) 61 31
305             151:          32 CooperativeMatrixLoadNV 150 73 75 MakePointerVisibleKHR NonPrivatePointerKHR 70
306                              Store 34(m) 151
307             152:          32 Load 34(m)
308             153:     71(ptr) AccessChain 69(block) 61 31
309                              CooperativeMatrixStoreNV 153 152 73 75 MakePointerAvailableKHR NonPrivatePointerKHR 70
310             154:     93(ptr) AccessChain 91(block16) 58 31
311             155:          50 CooperativeMatrixLoadNV 154 73 75 MakePointerVisibleKHR NonPrivatePointerKHR 70
312                              Store 52(m2) 155
313             156:          50 Load 52(m2)
314             157:     93(ptr) AccessChain 91(block16) 58 31
315                              CooperativeMatrixStoreNV 157 156 73 75 MakePointerAvailableKHR NonPrivatePointerKHR 70
316             160:          10 Load 158(p1)
317                              Store 159(param) 160
318             161:          10 FunctionCall 14(f16(f161<16><3><8><8>;) 159(param)
319                              Store 158(p1) 161
320             164:          17 Load 162(p2)
321                              Store 163(param) 164
322             165:          17 FunctionCall 21(f32(f1<32><3><8><8>;) 163(param)
323                              Store 162(p2) 165
324                              Store 158(p1) 166
325                              Store 162(p2) 167
326             168:          10 Load 158(p1)
327             169:          10 Load 158(p1)
328             170:          10 FDiv 169 168
329                              Store 158(p1) 170
330             172:          10 Load 158(p1)
331             173:          10 MatrixTimesScalar 172 171
332                              Store 158(p1) 173
333             175:          17 Load 162(p2)
334             176:          17 MatrixTimesScalar 175 174
335                              Store 162(p2) 176
336             185:    184(ptr) AccessChain 182(shmatrix) 83
337             186:          50 CooperativeMatrixLoadNV 185 183 75 MakePointerVisibleKHR NonPrivatePointerKHR 183
338                              Store 177(ms) 186
339             187:          50 Load 177(ms)
340             188:    184(ptr) AccessChain 182(shmatrix) 83
341                              CooperativeMatrixStoreNV 188 187 183 75 MakePointerAvailableKHR NonPrivatePointerKHR 183
342             189:     93(ptr) AccessChain 91(block16) 61 121 83
343             190:          50 CooperativeMatrixLoadNV 189 183 75 MakePointerVisibleKHR NonPrivatePointerKHR 70
344                              Store 177(ms) 190
345             191:          50 Load 177(ms)
346             193:     93(ptr) AccessChain 91(block16) 61 192 83
347                              CooperativeMatrixStoreNV 193 191 183 75 MakePointerAvailableKHR NonPrivatePointerKHR 70
348                              Return
349                              FunctionEnd
35014(f16(f161<16><3><8><8>;):          10 Function None 12
351           13(m):     11(ptr) FunctionParameter
352              15:             Label
353              23:          10 Load 13(m)
354              24:          10 FNegate 23
355                              ReturnValue 24
356                              FunctionEnd
35721(f32(f1<32><3><8><8>;):          17 Function None 19
358           20(m):     18(ptr) FunctionParameter
359              22:             Label
360              27:          17 Load 20(m)
361              28:          17 FNegate 27
362                              ReturnValue 28
363                              FunctionEnd