Commit 2888a87
authored
[SPIR-V] Add parent map when handling var init (microsoft#8221)
ResourceHeap resource type is not know looking at the type, but at the
context around it (we need to look how the variable is assigned).
This means we need a parent map.
When the heap is used in a function, the parentMap is set to the
function scope, so everything is fine. But when a static variable is
set, we are in the global scope, and the parent should be the current
variable declaration.
Fixes microsoft#82201 parent 1f63535 commit 2888a87
2 files changed
Lines changed: 29 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14741 | 14741 | | |
14742 | 14742 | | |
14743 | 14743 | | |
| 14744 | + | |
14744 | 14745 | | |
14745 | 14746 | | |
14746 | 14747 | | |
14747 | 14748 | | |
14748 | 14749 | | |
| 14750 | + | |
14749 | 14751 | | |
14750 | 14752 | | |
14751 | 14753 | | |
| |||
Lines changed: 27 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 | + | |
| 26 | + | |
| 27 | + | |
0 commit comments