-
Notifications
You must be signed in to change notification settings - Fork 969
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support multiple diagnostic items in shader compilation #5295
Comments
AFAIK, most WGPU maintainership (myself included) is aware of this and wants it, but we haven't prioritized it yet (and we're not sure when we will). I might add as an alternative that we could also accept an error receiver of some kind from client code, like CC @udoprog. |
@ErichDonGubler I feel I'm not experienced enough in Rust to be able to accurately assess design considerations for different API suggestions, but I definitely have an interest in pushing for this, for the sake of being able to better work with WGSL for my current project. An error receiver is an interesting idea, but at least for the tooling I'm working on, I'd likely just use it to produce a collection anyway. Are there use-cases that would be underserved by a simple |
naga::valid::Validator
- Allow the validator to return all validation errors instead of just the first one
FTR: On Firefox's side, this is estimated at
I don't think we need to consult downstream before finishing (3), because having "unstable" gating of this functionality means we can safely ship and evolve with downstream feedback. @gfx-rs/naga: I suspect we might be able to reduce the estimate to |
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: