Skip to content

Commit 6dcd1b8

Browse files
committed
Describe the binding model differences in READMEs
1 parent 89372f9 commit 6dcd1b8

File tree

6 files changed

+47
-0
lines changed

6 files changed

+47
-0
lines changed

src/backend/dx11/README.md

+10
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@ Render | Depth | Texture
88
-------|-------|--------
99
![render_coordinates](../../../info/gl_render_coordinates.png) | ![depth_coordinates](../../../info/dx_depth_coordinates.png) | ![texture_coordinates](../../../info/dx_texture_coordinates.png)
1010

11+
## Binding Model
12+
13+
Writable storage bindings:
14+
1. Binding: 0 .. `D3D11_PS_CS_UAV_REGISTER_COUNT`
15+
16+
Other bindings:
17+
1. Shader stage: vs, fs, cs
18+
2. Register: constant buffers (CBV), shader resources (SRV), samplers
19+
3. Binding (tight)
20+
1121
## Mirroring
1222

1323
TODO

src/backend/dx12/README.md

+6
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ Render | Depth | Texture
88
-------|-------|--------
99
![render_coordinates](../../../info/gl_render_coordinates.png) | ![depth_coordinates](../../../info/dx_depth_coordinates.png) | ![texture_coordinates](../../../info/dx_texture_coordinates.png)
1010

11+
## Binding Model
12+
13+
Dimensions of the model:
14+
1. Space: 0..8
15+
2. Binding (tight): constant buffers (CBV), shader resources (SRV), unordered access (UAV), samplers
16+
1117
## Mirroring
1218

1319
TODO

src/backend/gl/README.md

+10
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,22 @@
44

55
Can only be used on non-Apple Unix systems. The WSI is hard-coded to EGL.
66

7+
Note: the `Instance`, `Surface`, `PhysicalDevice`, `Device`, and `Queue` can only
8+
have their methods called on the thread where `Instance` was created(!).
9+
Recording command buffers is free-threaded.
10+
711
## Normalized Coordinates
812

913
Render | Depth | Texture
1014
-------|-------|--------
1115
![render_coordinates](../../../info/gl_render_coordinates.png) | ![depth_coordinates](../../../info/gl_depth_coordinates.png) | ![texture_coordinates](../../../info/gl_texture_coordinates.png)
1216

17+
## Binding Model
18+
19+
Dimensions of the model:
20+
1. Register type: uniform buffers, storage buffers, and combined texture-samplers
21+
2. Binding slot (0 .. `MAX_COMBINED_TEXTURE_IMAGE_UNITS` for textures)
22+
1323
## GLSL Mirroring
1424

1525
Texture Kind | GLSL sampler

src/backend/metal/README.md

+7
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ Render | Depth | Texture
88
-------|-------|--------
99
![render_coordinates](../../../info/gl_render_coordinates.png) | ![depth_coordinates](../../../info/dx_depth_coordinates.png) | ![texture_coordinates](../../../info/dx_texture_coordinates.png)
1010

11+
## Binding Model
12+
13+
Dimensions of the model:
14+
1. Shader stage: vs, fs, cs
15+
2. Register: buffers, textures, samplers
16+
3. Binding: 0..31 buffers, 0..128 textures, 0..16 samplers
17+
1118
## Mirroring
1219

1320
TODO

src/backend/vulkan/README.md

+7
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ Render | Depth | Texture
88
-------|-------|--------
99
![render_coordinates](../../../info/vk_render_coordinates.png) | ![depth_coordinates](../../../info/dx_depth_coordinates.png) | ![texture_coordinates](../../../info/dx_texture_coordinates.png)
1010

11+
## Binding Model
12+
13+
Dimensions of the model:
14+
1. Shader stage: vs, fs, cs, others
15+
2. Descriptor set: 0 .. `max_bound_descriptor_sets`
16+
3. Binding: sparse, but expected to be somewhat tight
17+
1118
## Mirroring
1219

1320
HAL is modelled after Vulkan, so everything should be 1:1.

src/backend/webgpu/README.md

+7
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ Currently requires to be compiled with the `web_sys_unstable_apis` flag.
88
RUSTFLAGS=--cfg=web_sys_unstable_apis cargo build --target wasm32-unknown-unknown
99
```
1010

11+
## Binding Model
12+
13+
Dimensions of the model:
14+
1. Shader stage: vs, fs, cs
15+
2. Resource group: 0 .. 4
16+
3. Binding: semi-sparse
17+
1118
## Normalized Coordinates
1219

1320
Render | Depth | Texture

0 commit comments

Comments
 (0)