diagnostic(…)
rules are not preserved in wgsl-out
#6496
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
Description
wgsl-in
has started/will start acceptingdiagnostic(…)
directives in #6148. Woot! Unfortunately,wgsl-out
does not emitdiagnostic(…)
rules, even ifwgsl-in
input specified them. This is unfortunate, because shaders that compiled just fine inwgsl-in
might not compile after a round-trip throughwgsl-out
.Repro steps
cargo run --package naga-cli -- in.wgsl out.wgsl
, wherein.wgsl
has the following contents:Expected vs observed behavior
We should re-emit
diagnostic(…)
rules in a semantics-preserving way, so users can feedwgsl-out
output back intowgsl-in
without introducing compilation errors.Extra materials
-
Platform
-
The text was updated successfully, but these errors were encountered: