Skip to content

[SPIR-V] Add parent map when handling var init#8221

Open
Keenuts wants to merge 1 commit intomicrosoft:mainfrom
Keenuts:fix-8220
Open

[SPIR-V] Add parent map when handling var init#8221
Keenuts wants to merge 1 commit intomicrosoft:mainfrom
Keenuts:fix-8220

Conversation

@Keenuts
Copy link
Collaborator

@Keenuts Keenuts commented Mar 4, 2026

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 #8220

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#8220
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

[SPIR-V] Compiler crashes on ray tracing shader with statically declared resources

1 participant