-
Notifications
You must be signed in to change notification settings - Fork 962
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
Reproduce Naga's nicer error reporting for WGSL #1424
Conversation
shouldn't this be using |
@ElectronicRU no, |
match naga::front::wgsl::parse_str(&code) { | ||
Ok(module) => (None, Some(module)), | ||
Err(err) => { | ||
log::error!("Failed to parse WGSL code for {:?}: {}", desc.label, err); | ||
log::error!("{}:", err); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
err is already printed in the previous line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I know. I just copied some lines over, without cleaning it up. At the moment this does nothing except print the error message twice :)
Any progress on this? |
Not from my end, I'm not sure how to proceed tbh. |
Closed by #1760 |
Closes gfx-rs/wgpu-native#104
Basically, I find myself copying WGSL code to a file and running Naga from the command line on it, because that way I get prettier errors than when pushing the (faulty) WGSL via wgpu-native's
create_shader_module
. Would be nice if the error reports were equally good.WIP: does not seem to help yet, except duplicating part of the error message.