-
Notifications
You must be signed in to change notification settings - Fork 822
Description
Is your feature request related to a problem? Please describe.
In SPIR-V, we actually are able to have more than one push constant struct in a shader with multiple entrypoints. See: https://godbolt.org/z/ovj17dKro.
This is currently not possible when compiling SPIR-V using DXC. We get the error error: cannot have more than one push constant block. See: https://godbolt.org/z/69GW8KdfW
Describe the solution you'd like
Ideally, to be able to include two push constant structs and have the unused stuff be optimized out later on. Like in the second godbolt sample.
[[vk::push_constant]] PC0 pc0;
[numthreads(1,1,1)]
[shader("compute")]
void main0()
{
// use only pc0 here
}
[[vk::push_constant]] PC1 pc1;
[numthreads(1,1,1)]
[shader("compute")]
void main1()
{
// use only pc1 here
}Describe alternatives you've considered
Current workaround is to put the two push constant structs in one big one and update with push constant offsets.
However, that comes with its own limitations.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status