-
Notifications
You must be signed in to change notification settings - Fork 114
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
Naga error messages not as useful as they could be #104
Comments
Absolutely! The error function needs to walk the chain of errors, not just debug print it ( |
Is that link where a change would be needed to fix this, or is this the function that should be called instead in wgpu-core? |
This is an example of properly printing out the error chain. wgpu-native need similar logic in order to spew out readable messages. |
I think this is where a change would be needed: I had a quick try inserting the referenced lines there, but get:
|
Do you have |
Ah, that helps getting the code to compile. But the error reporting is not getting better. I just saw this maybe related comment, looks like someone else is trying to achieve something similar for glsl. |
Hmm. Error reporting is already there for WGSL though, and this is what you are testing. |
Here's what I got so far: gfx-rs/wgpu#1424 |
This has been fixed upstream. |
When the provided WGSL shader code is invalid, the error messages are usually less useful than if I run Naga directly on that shader code.
Example:
wgpu-native:
Naga:
With naga it will sometimes also indicate where in the code the error occurs.
Is this something that can be improved somehow?
The text was updated successfully, but these errors were encountered: