Skip to content

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

Open
@ErichDonGubler

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

  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

-

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions