Commit 1e59ce9
authored
[SPIR-V] Fix debug instruction with cbuffer + FXC (microsoft#6531)
When the requested constant buffer layout is DX, some type lowering can
become complex (Nx1 matrices for ex). To simplify the lowering, the
backend "clones" those variables:
- on one end, we expose the correct layout
- but then, we copy this to a local variable to have a different layout
compatible with the operations we usually do on such types.
This means the type can sometimes be an HybridStructType, which is not
completely lowered, or a normal lowerer SPIR-V type. Both should be
allowed, but some codepaths had to be updated to reflect this.
---------
Signed-off-by: Nathan Gauër <brioche@google.com>1 parent 690ec7c commit 1e59ce9
File tree
3 files changed
+55
-13
lines changed- tools/clang
- lib/SPIRV
- test/CodeGenSPIRV
3 files changed
+55
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1481 | 1481 | | |
1482 | 1482 | | |
1483 | 1483 | | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
1484 | 1488 | | |
1485 | 1489 | | |
1486 | | - | |
1487 | | - | |
1488 | | - | |
1489 | | - | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
| 1493 | + | |
| 1494 | + | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
1490 | 1506 | | |
1491 | 1507 | | |
1492 | 1508 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
175 | 176 | | |
176 | 177 | | |
177 | 178 | | |
| |||
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