#graphics #gamedev

gfx-backend-dx12

DirectX-12 API backend for gfx-rs

47 releases

0.9.1 Jul 1, 2021
0.8.0 Apr 29, 2021
0.7.0 Jan 30, 2021
0.6.13 Nov 4, 2020
0.1.0 Dec 27, 2018

#970 in Graphics APIs

Download history 3621/week @ 2023-11-06 2953/week @ 2023-11-13 3591/week @ 2023-11-20 2630/week @ 2023-11-27 2299/week @ 2023-12-04 2956/week @ 2023-12-11 3350/week @ 2023-12-18 2663/week @ 2023-12-25 1750/week @ 2024-01-01 3107/week @ 2024-01-08 2952/week @ 2024-01-15 2623/week @ 2024-01-22 2071/week @ 2024-01-29 2788/week @ 2024-02-05 3260/week @ 2024-02-12 3979/week @ 2024-02-19

12,164 downloads per month
Used in 119 crates (9 directly)

MIT/Apache

735KB
14K SLoC

gfx-backend-dx12

DX12 backend for gfx.

Normalized Coordinates

Render Depth Texture
render_coordinates depth_coordinates texture_coordinates

Binding Model

Dimensions of the model:

  1. Space: 0..8
  2. Binding (tight): constant buffers (CBV), shader resources (SRV), unordered access (UAV), samplers

Mirroring

TODO


lib.rs:

D3D12 backend internals.

Resource transitions

Vulkan semantics for resource states doesn't exactly match D3D12.

For regular images, whenever there is a specific layout used, we map it to a corresponding D3D12 resource state.

For the swapchain images, we consider them to be in COMMON state everywhere except for render passes, where it's forcefully transitioned into the render state. When transfers to/from are requested, we transition them into and from the COPY_ states.

For buffers and images in General layout, we the best effort of guessing the single mutable state based on the access flags. We can't reliably handle a case where multiple mutable access flags are used.

Dependencies

~8MB
~169K SLoC