[spv] emit proper member layout decorations#360
Conversation
Timo-DK
left a comment
There was a problem hiding this comment.
LGTM, thanks! Maybe I am not seeing it, but what exactly is the difference in functionality between proc/sizer.rs and the new proc/layouter.rs?
| Err(_) => { | ||
| let mut param = Parameters::default(); | ||
| // very useful to have this by default | ||
| param.spv_capabilities.insert(spirv::Capability::Shader); |
There was a problem hiding this comment.
Very useful indeed! Maybe something for later to add for all examples by default when a param.ron is not found?
There was a problem hiding this comment.
yes, I was thinking about this as well, just having a default one in a file. Good for a follow-up!
The difference is that the old sizer was only computing the sizes, and the new layouter computes both the sizes and the alignments, analogous to https://doc.rust-lang.org/stable/std/alloc/struct.Layout.html The alignment is necessary, because it affects the layout by introducing pads. For example, a |
679: WGSL shader conversion for the examples r=grovesNL a=kvark Blocked on: - ~~gfx-rs/naga#335 - ~~gfx-rs/naga#336 - ~~gfx-rs/wgpu#1095 - ~~gfx-rs/naga#360 - gfx-rs/gfx#3622 - ~~GL backend doing the program link check earlier~~ Converted: - [x] boids - [x] cube - [x] mipmap - [x] msaa-line - [x] shadow - [x] skybox - [ ] texture-array - [ ] water Co-authored-by: Dzmitry Malyshau <kvark@fastmail.com>
679: WGSL shader conversion for the examples r=grovesNL a=kvark Blocked on: - ~~gfx-rs/naga#335 - ~~gfx-rs/naga#336 - ~~gfx-rs#1095 - ~~gfx-rs/naga#360 - gfx-rs/gfx#3622 - ~~GL backend doing the program link check earlier~~ Converted: - [x] boids - [x] cube - [x] mipmap - [x] msaa-line - [x] shadow - [x] skybox - [ ] texture-array - [ ] water Co-authored-by: Dzmitry Malyshau <kvark@fastmail.com>
Fixes #350
Fixes #336