Commit 3bf65aa
authored
[Backport to 16] SPIRVReader: handle direct types with CooperativeMatrixLengthKHR (#2695) (#2704)
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 b90004b commit 3bf65aa
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 | |
|---|---|---|---|
| |||
3195 | 3195 | | |
3196 | 3196 | | |
3197 | 3197 | | |
3198 | | - | |
3199 | | - | |
| 3198 | + | |
| 3199 | + | |
| 3200 | + | |
| 3201 | + | |
| 3202 | + | |
| 3203 | + | |
| 3204 | + | |
| 3205 | + | |
| 3206 | + | |
| 3207 | + | |
3200 | 3208 | | |
3201 | 3209 | | |
3202 | 3210 | | |
| |||
| 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