Skip to content

[SPIR-V] Fix resource heap & fvk-bind-register interactions#7858

Merged
Keenuts merged 1 commit intomicrosoft:mainfrom
Keenuts:fix-7857
Oct 30, 2025
Merged

[SPIR-V] Fix resource heap & fvk-bind-register interactions#7858
Keenuts merged 1 commit intomicrosoft:mainfrom
Keenuts:fix-7857

Conversation

@Keenuts
Copy link
Collaborator

@Keenuts Keenuts commented Oct 30, 2025

The interaction between -fvk-bind-register and the resource/sampler heaps were not tested, and broken.

This commit solves this by requiring the -fvk-bind-sampler-heap or -fvk-bind-resource-heap flag to be used if the -fvk-bind-register flag is present and a resource/sampler heap is present.

An alternative solution would be to allow implicit bindings on heaps while other resources require the register attribute, but I think it would be less useful as the goal of using this flag is to have full control over the bindings.

This commit refactorizes a bit the helper functions isResourceHeap/isSamplerHeap, but this part is NFC. The main bit is in DeclResultIdMapper, where a special case is added the the heaps.

Fixes #7857

@github-actions
Copy link
Contributor

github-actions bot commented Oct 30, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

The interaction between `-fvk-bind-register` and the resource/sampler
heaps were not tested, and broken.

This commit solves this by requiring the `-fvk-bind-sampler-heap` or
`-fvk-bind-resource-heap` flag to be used if the `-fvk-bind-register`
flag is present and a resource/sampler heap is present.

An alternative solution would be to allow implicit bindings on heaps
while other resources require the register attribute, but I think it
would be less useful as the goal of using this flag is to have full
control over the bindings.

This commit refactorizes a bit the helper functions
isResourceHeap/isSamplerHeap, but this part is NFC. The main bit
is in DeclResultIdMapper, where a special case is added the the heaps.

Fixes microsoft#7857
@Keenuts Keenuts merged commit a29145e into microsoft:main Oct 30, 2025
12 checks passed
@github-project-automation github-project-automation bot moved this from New to Done in HLSL Roadmap Oct 30, 2025
@Keenuts Keenuts deleted the fix-7857 branch October 30, 2025 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[SPIR-V] ResourceDescriptorHeap does not compile together with manual register binding

2 participants