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

diagnostic(…) rules are not preserved in wgsl-out #6496

Open
ErichDonGubler opened this issue Nov 5, 2024 · 0 comments
Open

diagnostic(…) rules are not preserved in wgsl-out #6496

ErichDonGubler opened this issue Nov 5, 2024 · 0 comments
Labels
area: naga back-end Outputs of naga shader conversion area: naga middle-end Intermediate representation backend: webgpu Issues with direct interface with WebGPU lang: WGSL WebGPU Shading Language naga Shader Translator type: enhancement New feature or request

Comments

@ErichDonGubler
Copy link
Member

Description

wgsl-in has started/will start accepting diagnostic(…) directives in #6148. Woot! Unfortunately, wgsl-out does not emit diagnostic(…) rules, even if wgsl-in input specified them. This is unfortunate, because shaders that compiled just fine in wgsl-in might not compile after a round-trip through wgsl-out.

Repro steps

  1. cargo run --package naga-cli -- in.wgsl out.wgsl, where in.wgsl has the following contents:

    diagnostic(off, derivative_uniformity);

Expected vs observed behavior

We should re-emit diagnostic(…) rules in a semantics-preserving way, so users can feed wgsl-out output back into wgsl-in without introducing compilation errors.

Extra materials

-

Platform

-

@cwfitzgerald cwfitzgerald added type: enhancement New feature or request backend: webgpu Issues with direct interface with WebGPU area: naga back-end Outputs of naga shader conversion naga Shader Translator area: naga middle-end Intermediate representation lang: WGSL WebGPU Shading Language labels Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: naga back-end Outputs of naga shader conversion area: naga middle-end Intermediate representation backend: webgpu Issues with direct interface with WebGPU lang: WGSL WebGPU Shading Language naga Shader Translator type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants