Naga should not permit readable storage textures by default #4466
Labels
area: validation
Issues related to validation, diagnostics, and error handling
naga
Shader Translator
As a deliberate extension for use by native apps, Naga accepts readable storage images, even though these are forbidden in the WGSL spec. However, Naga offers no means to disable this extension for WGSL compliance. This feature should be optional, and our tests should run with it disabled by default.
For example, the following declaration is accepted by Naga but rejected by Tint:
As explained in Matrix chat, Naga deliberately permits readable storage textures for use by native
wgpu
apps. However, when used in WebGPU, this should be disabled for consistency with other implementations.I think Naga's tests should run with this disabled, so that we can assume that tests are spec-compliant WGSL unless explicitly marked otherwise.
Perhaps the best way to implement this would be to add a flag to
naga::valid::Capabilities
. I think this should be off by default.The text was updated successfully, but these errors were encountered: