1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
//! The backend-agnostic, GPU-free render-prep layer: the
//! `RenderBackend`/`SceneControl` trait seam the device backends implement, plus
//! the record builders, render graph, and CPU-side math that turn components
//! into GPU-ready data.
//!
//! Sits above [`crate::gfx`], which holds the layouts and the kernels this
//! prepares into, and owns no device or window handle of its own: a frame's
//! work is built here and handed to whichever backend implements the seam. The
//! device backends (concinnity-device) and the runtime driver
//! (concinnity-engine) are the two consumers.
/// The `#[repr(C)]` blocks the CPU uploads into the single-source `.slang`
/// shaders, declared once for every backend (see `uniforms/mod.rs`).
/// GPU-free host-side layout contract for the Metal backend's shader structs
/// (uniform structs, math, shader-layout asserts). Metal-specific but device-free,
/// so it is compiled unconditionally and its layout tests run on every platform's
/// CI. The Metal backend (concinnity-device) re-exports it under its own `metal`.
/// The same for the DirectX and Vulkan backends: their repr(C) uniform / probe
/// structs + GPU-timing slot arithmetic (mirrored in the HLSL / GLSL shaders).
/// Backend-specific but device-free (plain repr(C), no windows/ash types), so
/// they compile unconditionally and their layout tests count toward coverage.
/// The DirectX / Vulkan backends (concinnity-device) re-export them under their
/// own `directx` / `vulkan`.