#graphics #gamedev

gfx-backend-dx11

DirectX-11 API backend for gfx-rs

37 releases

0.9.0 Jun 19, 2021
0.7.0 Jan 30, 2021
0.6.17 Nov 28, 2020
0.5.2 Jul 29, 2020
0.1.0 Dec 27, 2018

#881 in Graphics APIs

Download history 2285/week @ 2023-02-05 1226/week @ 2023-02-12 3288/week @ 2023-02-19 557/week @ 2023-02-26 3675/week @ 2023-03-05 1402/week @ 2023-03-12 1855/week @ 2023-03-19 1297/week @ 2023-03-26 1477/week @ 2023-04-02 1729/week @ 2023-04-09 1108/week @ 2023-04-16 938/week @ 2023-04-23 4093/week @ 2023-04-30 1083/week @ 2023-05-07 1567/week @ 2023-05-14 948/week @ 2023-05-21

7,745 downloads per month
Used in 2 crates

MIT/Apache

690KB
14K SLoC

gfx_device_dx11

DX11 backend for gfx.

Normalized Coordinates

Render Depth Texture
render_coordinates depth_coordinates texture_coordinates

Binding Model

Writable storage bindings:

  1. Binding: 0 .. D3D11_PS_CS_UAV_REGISTER_COUNT

Other bindings:

  1. Shader stage: vs, fs, cs
  2. Register: constant buffers (CBV), shader resources (SRV), samplers
  3. Binding (tight)

Mirroring

TODO


lib.rs:

DX11 backend internals.

Pipeline Layout

In D3D11 there are tables of CBVs, SRVs, UAVs, and samplers.

Each descriptor type can take 1 or two of those entry points.

The descriptor pool is just and array of handles, belonging to descriptor set 1, descriptor set 2, etc. Each range of descriptors in a descriptor set area of the pool is split into shader stages, which in turn is split into CBS/SRV/UAV/Sampler parts. That allows binding a descriptor set as a list of continuous descriptor ranges (per type, per shader stage).

!

Dependencies

~7.5MB
~163K SLoC