Skip to content

Tips for debugging obscure naga validation errors #23

Closed Answered by tombh
tombh asked this question in Q&A
Discussion options

You must be logged in to vote

Finally got to the bottom of it! naga doesn't support pointers in structs gfx-rs/wgpu#6623

Note that it's naga (which is merely a linter/validator) that doesn't support pointers in structs. rust-gpu does support pointers in structs. And naga can be easily avoided with wgpu's wgpu::Features::SPIRV_SHADER_PASSTHROUGH.

Also note that rust-gpu doesn't always convert a Rust pointer in a struct to a SPIRV pointer in a struct. It often compiles away pointers in structs for efficiency.

Replies: 7 comments 7 replies

Comment options

You must be logged in to vote
1 reply
@tombh
Comment options

Comment options

You must be logged in to vote
1 reply
@tombh
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@schell
Comment options

Comment options

You must be logged in to vote
4 replies
@schell
Comment options

@tombh
Comment options

@schell
Comment options

@tombh
Comment options

Answer selected by tombh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants