Shader compilation errors are cryptic #3760
Labels
A-Diagnostics
Logging, crash handling, error reporting and performance analysis
A-Rendering
Drawing game state to the screen
C-Feature
A new feature, making something new possible
What problem does this solve or what need does it fill?
During wgsl shader compilation errors that bevy emits are only partial. Compare:
to
naga
equivalent:when missing
[[builtin(vertex_index)]]
infn vertex(vertex_index: u32) -> VertexOutput {
or
vs
naga
:when trying to compare u32 vs signed value.
What solution would you like?
I'd like last part provided by
naga
that describes what's happening to be attached along with rest of the error.Additional context
https://github.com/bevyengine/bevy/blob/main/crates/bevy_render/src/render_resource/pipeline_cache.rs#L463
looks identical to
https://github.com/gfx-rs/naga/blob/master/cli/src/main.rs#L500
In
naga
there's second function https://github.com/gfx-rs/naga/blob/master/cli/src/main.rs#L150 that prints remainder of the error. Simply copy pastingprint_err
body expanded my error to:which is sufficient.
I can provide a PR if this is acceptable solution.
The text was updated successfully, but these errors were encountered: