-
Notifications
You must be signed in to change notification settings - Fork 202
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
[[vk::binding]] ignored(?) in parameter lists #5626
Comments
Currently explicit binding is only supported for global scope declarations, but support for entrypoint parameters should be easy to add. |
Maybe I don't understand the design philosophy behind the difference (and maybe I skimmed past somewhere in the docs that explains it), but to me as a user these look like just two different scopes for all the same things (except, obviously, type declarations would be a weird thing to try and put in a parameter block). At the very least I think the
Like if someone's taking the time to type them in then they're probably trying to match a layout somewhere else in their code that isn't coming from "use reflection to inspect whatever slang happens to have done". Compilation shouldn't just report "success" if explicit layout directives can't be honored. Tangentially related question: is there a clear example of how I can take the linked together module from which I'm getting my SPIR-V and generate a VK pipeline layout from it? The reflection API isn't the easiest thing get up to speed with, and reflecting over the generated SPIR-V is kinda noisy given all the internally generated types and how everything gets nested into one. |
I agree with you that our reflection API isn't ideal. We are working to address this, and likely going to create a sample code to do exactly that: go from slang reflection to vulkan pipeline layout in explained code. I consider the missing support of [vk::binding] on entrypoints a bug and we will fix this. In the meanwhile, you can take a look at the reflection json to get a better understanding of what the reflection api is providing. You can explore this on the playground too. |
Another nice to have: it'd be super cool if I could globally (say, for a compilation session):
Basically, I like the idea of letting slang automate descriptor layouts for most of my pipeline interface, but I need it to stay out of push constants and the fixed descriptors that the engine provides, and that means it has to stay out of sets [0..n) unless told otherwise. Otherwise I have to explicitly bind all the variables. |
This works:
And I would therefore expect this to also work:
And it does compile, but the
[[vk::binding]]
gets ignored andDiffuse
winds up in an automatically assigned descriptor in set zero.The following works as I'd expect:
Using the Slang binaries in Vulkan SDK 1.3.296.0 (
slang::IGlobalSession::getBuildTagString
says"2024.13"
).Thank you.
The text was updated successfully, but these errors were encountered: