Commit e5183a0
authored
Set the layout rule explicitly for raw buffer operations (microsoft#6701)
The first first fix in microsoft#5392 was not correct. It relied on the layout
rule for the address to be the correct layout rule, but that is not
always the case. The address is just an integer that could exist in any
storage class. The correct solution is to explicitly set the layout rule
for the BitCast operation when expanding the RawBuffer* functions. We
know that the result of the BitCast is a pointer to the physical storage
buffer storage class, so we know the layout need to be the storage
buffer layout.
Fixes microsoft#65541 parent 74205f8 commit e5183a0
File tree
3 files changed
+28
-0
lines changed- tools/clang
- lib/SPIRV
- test/CodeGenSPIRV
3 files changed
+28
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14263 | 14263 | | |
14264 | 14264 | | |
14265 | 14265 | | |
| 14266 | + | |
14266 | 14267 | | |
14267 | 14268 | | |
14268 | 14269 | | |
| |||
14291 | 14292 | | |
14292 | 14293 | | |
14293 | 14294 | | |
| 14295 | + | |
14294 | 14296 | | |
14295 | 14297 | | |
14296 | 14298 | | |
| |||
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
7 | 15 | | |
8 | 16 | | |
9 | 17 | | |
| |||
34 | 42 | | |
35 | 43 | | |
36 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
37 | 53 | | |
38 | 54 | | |
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
78 | 88 | | |
0 commit comments