[SPIR-V] Fix resource heap & fvk-bind-register interactions#7858
Merged
Keenuts merged 1 commit intomicrosoft:mainfrom Oct 30, 2025
Merged
[SPIR-V] Fix resource heap & fvk-bind-register interactions#7858Keenuts merged 1 commit intomicrosoft:mainfrom
Keenuts merged 1 commit intomicrosoft:mainfrom
Conversation
Contributor
|
✅ 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
s-perron
approved these changes
Oct 30, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The interaction between
-fvk-bind-registerand the resource/sampler heaps were not tested, and broken.This commit solves this by requiring the
-fvk-bind-sampler-heapor-fvk-bind-resource-heapflag to be used if the-fvk-bind-registerflag 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