Allow pipeline-overridable constants in structs with fixed sized arrays #7078
Labels
area: validation
Issues related to validation, diagnostics, and error handling
kind: diagnostics
Error message should be better
type: enhancement
New feature or request
Hello, it appears that pipeline-overridable constants cannot be used in structs / type definitions.
Is your feature request related to a problem? Please describe.
Given the following code:
The following error is produced:
Describe the solution you'd like
I'd like to be able to use pipeline-overridable constants in struct definitions. I'm not sure if this is expected or not considering I can see it working differently underneath; you'd have to recompile all of the types depending on the "source" type. But it seems to be a bug considering they can be used elsewhere, and I couldn't find any other issues about this. If I declare a constant sized array in a function with a let statement it works as expected.
Describe alternatives you've considered
Find and replacing does work, but it seems weird to only have to do it for struct definitions; this would be more convenient.
Additional context
wgpu version is 24.0.1
Thanks for adding more support for them recently!
The text was updated successfully, but these errors were encountered: