naga::valid::Validator
- Allow the validator to return all validation errors instead of just the first one
#5295
Labels
area: validation
Issues related to validation, diagnostics, and error handling
kind: diagnostics
Error message should be better
naga
Shader Translator
type: enhancement
New feature or request
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 likeValidator::validate_all
orValidator::iter
whichvalidate
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 likenaga_oil
.The text was updated successfully, but these errors were encountered: