61: Cleanup examples by using wgpu::read_spirv instead of manually creating a Vec<u32> r=kvark a=rukai
Wait for me to update the git reference once https://github.com/gfx-rs/wgpu/pull/280 is merged.
Co-authored-by: Rukai <rubickent@gmail.com>
280: Remove pod add read_spirv r=kvark a=rukai
Looks like Pod is no longer used by wgpu-rs so I removed it.
read_spirv is needed in wgpu-rs now so I added it.
Co-authored-by: Rukai <rubickent@gmail.com>
267: Use extend_from_slice instead of copy_from_slice r=kvark a=kocsis1david
`copy_from_slice` gives an error because it expects the lengths to be the same.
Co-authored-by: David <kocsis1david@windowslive.com>
264: update README.md r=kvark a=Napokue
Changes:
- Add supported platforms table
- Remove example docs here, and referencing the user to the wiki
Co-authored-by: Timo de Kort <dekort.timo@gmail.com>
261: streamline Makefile r=kvark a=Napokue
Changes:
- Streamlining the Make commands to make it look better
- Introduced two new variables: `WILDCARD_WGPU_NATIVE` & `WILDCARD_WGPU_NATIVE_AND_REMOTE` to reduce duplicate code. Will continue to reduce duplicate after my compute example is merged, to avoid unnecessary merge conflicts
Maybe I am not too familiar with the concept FFI, but wouldn't it be easier to understand that we just generate headers and not foreign function interfaces. Basically the same, but the latter one sounds a lot more complex. We want to reach as much as possible people, so maybe renaming this would be beneficial?
So I was thinking to have the commands: `header-wgpu` and `header-wgpu-remote`, instead of `ffi-wgpu` and `ffi-wgpu-remote`.
Co-authored-by: Timo de Kort <dekort.timo@gmail.com>
258: Run-time lock protection against double root r=grovesNL a=kvark
Fixes https://github.com/gfx-rs/wgpu-rs/issues/42
cc @paulkernfeld
We didn't handle a case where the root locking token would get dropped (while some children are borrowed), and a new one is created. This was the case in `wgpu_device_poll`, which ended up trying to unmap the buffers.
This PR brings a relatively simple run-time check for this. It could *probably* be done at the type level, but I'm going to leave it for any follow ups (help is welcome!), because:
1. we'll still have a run-time check for the simple case where 2 or more root tokens are created
2. I spent 20 minutes trying and wasn't able to get this going
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
38: Add an example showing how to capture a render r=kvark a=paulkernfeld
I had wanted to use wgpu-rs to generate `.png` images rather than displaying to the screen, so I coded up this prototype as an example to others who might want to do something similar.
Possible changes:
- Create an actual `.png` or other image
- Convert this into a unit test
I'm happy to make other modifications to this as well.
Co-authored-by: Paul Kernfeld <paulkernfeld@gmail.com>
9: Add structs and enums for ID3D12Heap r=msiglreith a=DethRaid
I've added the structs and enums needed to create an `ID3D12Heap`. I've also added the method `create_heap` to `Device`, and and added the module imports and reexports to the appropriate places
The weird thing here is `heap::Flags`. Thing is, D3D12 uses the value 0 for two of the enum constants in `D3D12_HEAP_FLAGS`. Rust does not allow the same value to be used by multiple enum constants (that I know of). I made an enum without any useful values, then gave it constants with the values from `D3D12_HEAP_FLAGS`. This lets my code compile, and the syntax to use the enum is the same, but the compiler complains about capitalization and I don't really like it. I'd welcome any ideas about a better way to implement this
Co-authored-by: David Dubois <dexcelstraun7@gmail.com>