Skip to content
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

WGSL: Support the readonly_and_readwrite_storage_textures language extension #6204

Open
ErichDonGubler opened this issue Sep 3, 2024 · 3 comments
Labels
area: naga front-end lang: WGSL WebGPU Shading Language naga Shader Translator type: enhancement New feature or request

Comments

@ErichDonGubler
Copy link
Member

Is your feature request related to a problem? Please describe.

The WGSL spec. defines a language extension called readonly_and_readwrite_storage_textures, which we can and should support.

Describe the solution you'd like

Implement this feature from the spec. It's not required for adherence to the spec., but there is interesting code in the wild (i.e., by ThreeJS) that already wants to use this language extension.

Describe alternatives you've considered

  1. Don't implement this. If we encounter an implementation blocker, or find other concerns with this feature, we might reasonably do this, but that's the only situation in which we'd be justified, I think.

Additional context

Related to #6192 in that it's expected that the requires directive is supported with the readonly_and_readwrite_storage_textures identifier specifically for this feature.

@ErichDonGubler ErichDonGubler added type: enhancement New feature or request naga Shader Translator area: naga front-end lang: WGSL WebGPU Shading Language labels Sep 3, 2024
@ErichDonGubler
Copy link
Member Author

Firefox tracking for this issue: bug 1916464

@jimblandy
Copy link
Member

We actually already support this, we're just missing some validation.

@teoxoy
Copy link
Member

teoxoy commented Sep 13, 2024

There is one new built-in function that we are missing: textureBarrier(). Brought up by @mikialex in #6260.

@ErichDonGubler ErichDonGubler changed the title Support the readonly_and_readwrite_storage_textures WGSL language extension WGSL: Support the readonly_and_readwrite_storage_textures language extension Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: naga front-end lang: WGSL WebGPU Shading Language naga Shader Translator type: enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

3 participants