Skip to content

Support multiple diagnostic items in shader compilation #5295

@Runi-c

Description

@Runi-c

Is your feature request related to a problem? Please describe.
Right now naga-based tooling can only display one validation error at a time, it would be nice if such tooling could get access to all the errors naga can detect in order to ease working with wgsl files especially.

Describe the solution you'd like
It seems like Validator::validate could be feasibly modified to produce an iterator over validation errors (or more likely such behavior moved into something like Validator::validate_all or Validator::iter which validate calls and returns the first element).

Describe alternatives you've considered
wgsl_analyzer works around this for wgsl files by implementing its own validation layer, but this results in occasional mismatches with naga and lack of support for naga extensions like naga_oil.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: validationIssues related to validation, diagnostics, and error handlingkind: diagnosticsError message should be betternagaShader Translatortype: enhancementNew feature or request

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions