Naga should give better diagnostics when unrestricted_pointer_parameters
is needed
#7645
Labels
unrestricted_pointer_parameters
is needed
#7645
Naga should detect cases where it rejects a function definition that it would accept if it implemented the
unrestricted_pointer_parameters
language extension, and produce a diagnostic suggesting that users mark their shaders as requiring it.A WGSL requires-directive merely documents the shader's use of a feature; it doesn't enable it. Implementations are free to simply start supporting the functionality they represent, without gating its availability on the presence of a requires-directive. Because Chrome implements
unrestricted_pointer_parameters
, we do see shaders taking advantage of it. We do not see any widespread use of the requires-directive that users are encouraged to place at the top of their source code.At the moment, Naga rejects WGSL user-defined functions that accept pointers other than those supported in the unextended language, without informing the user that their shader might be accepted if
unrestricted_pointer_parameters
was supported. It seems likely that people take advantage of the extension without being aware that they're doing so, so Naga's behavior leaves users in the dark as to why their shader works in Chrome but not Firefox.Obviously, if we simply implement the extension (#5158), then this point becomes moot.
The text was updated successfully, but these errors were encountered: