-
Notifications
You must be signed in to change notification settings - Fork 686
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPIR-V] Add -fvk-bind-*-heap flag to DXC #6919
Conversation
Those flags allow the user to hardcode the binding ID for the heaps. This allow the user to either force heap aliasing, or simply have more control over the heaps. Fixes microsoft#6913 Signed-off-by: Nathan Gauër <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only part that seems missing that other resources that are automatically assigned resources bindings should not use the fixed binding for the descriptor heaps:
// RUN: %dxc -T cs_6_6 -E main -fcgl %s -spirv -fvk-bind-resource-heap 0 0 -fvk-bind-counter-heap 1 0 | FileCheck %s
// CHECK-DAG: OpDecorate %a DescriptorSet 0
// CHECK-DAG: OpDecorate %a Binding 2
// CHECK-DAG: OpDecorate %counter_var_a DescriptorSet 0
// CHECK-DAG: OpDecorate %counter_var_a Binding 3
RWStructuredBuffer<uint> a;
[numthreads(1, 1, 1)]
void main() {
// CHECK-DAG: OpDecorate %ResourceDescriptorHeap DescriptorSet 0
// CHECK-DAG: OpDecorate %ResourceDescriptorHeap Binding 0
// CHECK-DAG: OpDecorate %counter_var_ResourceDescriptorHeap DescriptorSet 0
// CHECK-DAG: OpDecorate %counter_var_ResourceDescriptorHeap Binding 1
RWStructuredBuffer<uint> b = ResourceDescriptorHeap[1];
a.IncrementCounter();
b.IncrementCounter();
}
You mean a test checking only resources related to the flag are fixed, and the others are still keeping the automatic behavior? |
Oh got it |
Signed-off-by: Nathan Gauër <[email protected]>
thanks for the finding! pre-reserved the IDs. |
Those flags allow the user to hardcode the binding ID for the heaps. This allow the user to either force heap aliasing, or simply have more control over the heaps.
Fixes #6913