1206: Convert `PrimitiveState::cull_mode` to `Option<Face>` r=kvark a=yzsolt
**Connections**
Closes#1192
**Description**
`wgpu::CullMode` was an enum with a `None` variant, which would be more idiomatic as an `Option` in Rust.
**Testing**
- `wgpu-rs` builds with the appropriate changes
- `wgpu-native` needs https://github.com/gfx-rs/wgpu-native/pull/71 merged before it can be updated
Co-authored-by: Zsolt Bölöny <bolony.zsolt@gmail.com>
1205: Update naga to gfx-10, add push constants validation r=kvark a=kvark
**Connections**
Picks up https://github.com/gfx-rs/gfx/pull/3632 with a bunch of Naga stuff
**Description**
Update!
**Testing**
Not much
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
Keep track of the comparison property per global variable instead of type.
Only track images that can actually be comparison-sampled.
Instead of mutating the type, just add a new type in the end
if we detect it to be necessary, cloning the old name.
1190: Fix crash on zero init of buffer with no more ref count r=kvark a=Wumpf
**Description**
Previously, if a buffer would no longer have any reference, the zero init step crashed when trying to unwrap its ref_count.
**Testing**
Tested successfully on 54a0f4ff13 where this problem would pop up
Co-authored-by: Andreas Reich <r_andreas2@web.de>
1191: Buffer zero init test for binding (and use in a compute shader) r=kvark a=Wumpf
**Connections**
Buffer zero init #1159
Buffer zero crash on unused buffer fix#1190
**Description**
Tried to create a player ron file repro case for #1190 but didn't work out quite well (test keeps buffers alive even when I tried to go through an indirection via buffer copies). But with a bit of cleanup the test still felt very useful since it gives more coverage to buffer zero init.
Generally zero init is hard to test since the way to get the result is to map it which is one particular case of requiring zero init. But there's a few ways like in this test here where we look at what modifications a compute shader did to a buffer - since the buffer was not explicitly initialized, the outcome would be different if the compute shader would have seen a buffer without zero init.
Given how few tests there are right now this ofc implicitly tests a bunch of other things ;)
Co-authored-by: Andreas Reich <r_andreas2@web.de>
710: Implement read_buffer r=kvark a=fintelia
I'm not sure about the exact interface that makes sense, but this PR sketches out how read_buffer (and eventually also read_texture) could be implemented.
Resolves#694
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
Co-authored-by: Jonathan Behrens <fintelia@gmail.com>
1201: Don't check the index format for non-indexed calls r=kvark a=kvark
**Connections**
Fixes#1200
**Description**
Avoid the check that shouldn't be done.
**Testing**
Not tested, but should work.
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>