mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
914d782007e8e4a11f563fa801a4107978657288
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>
d3d12-rs
Rust wrapper for D3D12
Description
Languages
Rust
79.9%
WGSL
16.2%
HLSL
2%
GLSL
1.7%
JavaScript
0.2%