Commit 43fb73f
authored
[Backport to 18] SPIRVReader: handle direct types with CooperativeMatrixLengthKHR (#2695) (#2706)
Translation of the attached test would currently fail due to the
SPIRVReader attempting to process the `%matTy` operand as a regular
value instead of a type. `OpCooperativeMatrixLengthKHR` seems to be
pretty unique in taking an additional type operand beyond the result
type, so special-case it in the reader.
The translator currently accepts a non-type operand for
`OpCooperativeMatrixLengthKHR` too, even though that's not within the
specification; see various TODOs in the existing
SPV_KHR_cooperative_matrix tests. Leave that relaxation in place, by
only translating the operand as a type when it is an
`OpTypeCooperativeMatrixKHR`.
(cherry picked from commit 2b5f15d)1 parent 242df2c commit 43fb73f
File tree
3 files changed
+37
-2
lines changed- lib/SPIRV
- libSPIRV
- test/extensions/KHR/SPV_KHR_cooperative_matrix
3 files changed
+37
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3343 | 3343 | | |
3344 | 3344 | | |
3345 | 3345 | | |
3346 | | - | |
3347 | | - | |
| 3346 | + | |
| 3347 | + | |
| 3348 | + | |
| 3349 | + | |
| 3350 | + | |
| 3351 | + | |
| 3352 | + | |
| 3353 | + | |
| 3354 | + | |
| 3355 | + | |
3348 | 3356 | | |
3349 | 3357 | | |
3350 | 3358 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| 149 | + | |
| 150 | + | |
149 | 151 | | |
150 | 152 | | |
151 | 153 | | |
| |||
Lines changed: 25 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
0 commit comments