Add overrides to entries's function info
Opened this issue · 2 comments
Hi again,
I have been using WGSL overrides quite a bit lately and realize that there is no way to currently determine in which entry function the overrides (OverrideInfo
) are used.
This is problematic for my use case since I don't know if I should assign the overrides to vertex and fragment or simply one of them.
WebGPU will raise an error if pipeline constants are declared in pipelines descriptors but not used in the actual entry function.
Yeah I can add that. I haven't used overrides much, so thanks for the testing. It might be a couple days before I can get to it, ping me if I forget.
I added overrides to FunctionInfo. It will walk the function AST graphs to find usage of override variables, so you can get the list for each entry function.
What I still need to take into account is shadowing of override variables, where a local variable with the same name shadows an override variable. In the current code, the override would still be considered in use.