Skip to content

Add a diagnostic triggered when a pipeline-constant is set for an override in the shader module that is not used by the entry point #4643

@dneto0

Description

@dneto0

This is forked from #4624

During pipeline creation time, it is valid for a pipeline constant to be set for an override that exists in the shader but is not statically accessed by the entry point.
In the discussion from #4624 we agreed it would be nice to add a diagnostic, defaulting to off that would trigger in this case.
It's an extra guardrail that the developer can opt into.

To be determined:

  • It certainly makes sense as a module-wide diagnostic directive.
  • For a range diagnostic filter, where should it take affect or be allowed?
    • On the entry point?
    • On the declaration of the override? Currently range diagnostic filters are not specified to be allowed on a variable declaration.
  • The name.

Metadata

Metadata

Assignees

No one assigned

    Labels

    wgslWebGPU Shading Language Issues

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions