euv_core/render/ring/enum.rs
1/// Pixel storage format for GPU atlas and image dirty-rect texture uploads.
2#[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
3pub enum GpuAtlasPixelFormat {
4 /// Single-channel 8-bit coverage mask used for monochrome alpha glyph atlases (`R8Unorm`).
5 #[default]
6 R8Unorm,
7 /// Four-channel 8-bit premultiplied RGBA texture used for color emoji atlases and images (`Rgba8Unorm`).
8 Rgba8Unorm,
9}
10
11/// Priority class governing bounded GPU staging ring backpressure when all slots are in flight.
12#[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
13pub enum GpuUploadPriority {
14 /// Upload required to present the active frame's visible content.
15 #[default]
16 RequiredFrame,
17 /// Speculative route prefetch or offscreen warm-up upload droppable under ring pressure.
18 OptionalPrefetch,
19}
20
21/// Result of acquiring a bounded staging slot from `GpuResourceRing`.
22#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
23pub enum GpuRingAcquireResult {
24 /// A staging slot was acquired and tagged with `fence_id`.
25 Acquired {
26 /// Index into `GpuResourceRing::slots`.
27 slot_index: usize,
28 /// Monotonic GPU fence associated with this submission.
29 fence_id: u64,
30 /// True when an existing backing buffer was reused without reallocating.
31 reused: bool,
32 },
33 /// All ring slots are in flight; an optional prefetch upload was dropped to protect the active frame.
34 DroppedPrefetchRingFull,
35 /// All ring slots are in flight; a required frame upload must wait for a fence completion instead of growing unboundedly.
36 DeferredFrameRingFull,
37}