-
Notifications
You must be signed in to change notification settings - Fork 244
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
Make #[spirv(block)] decoration force ABI type into Struct #391
Comments
Just checking, does adding |
Right, the first issue is #373, but I'm really confused by the second issue, that's really bizarre and like |
We can fix this with a query override, and I've been meaning to try it, but would it be better to just not need I can't find anywhere in SPIR-V or Vulkan specs why extra layers of single-field structs would change anything - there's some stuff about |
I think auto-wrapping any structs used as various kinds of buffers would be great. Yeah, Vulkan shouldn't treat a 4 byte struct any different from a 128 byte one or whatever. |
In a situation where one wants to use a non-struct primitive type as a push constant or uniform, you need to put it into a struct and apply the
block
decoration to it. However, if we try to just put it in a wrapper struct the ABI will not actually change. For example thiswithout the
_make_struct
field, this will still be an AbiVector and so it's illegal to apply theblock
decoration to it. This also occurs for two f32s in which case it will be a ScalarPair, like here:It would be nice to not have to add this extra member to the struct.
The text was updated successfully, but these errors were encountered: