diagnostic(…)
rules are not preserved in wgsl-out
#6496
Open
Description
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
-
cargo run --package naga-cli -- in.wgsl out.wgsl
, wherein.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
-