From a9632bc8de343aa20adf4f1123f16445f5b1b21b Mon Sep 17 00:00:00 2001 From: trustno1-coder Date: Wed, 25 Nov 2026 15:43:00 -0800 Subject: [PATCH] NVIDIA: VICTORY_DYNAMIC_SLOTS on a capped view heap (stops dropped draws) NVIDIA caps the shader-visible view heap at 1,000,000 (the title wants 1,245,184), so the dynamic slot pool (2^18) ran out and 1,100-4,800 tables a frame were refused, each a dropped draw (the screen rarely updated). VICTORY_DYNAMIC_SLOTS=524288 takes more of the title's kept-in-place slots (at most half the heap): 0-33 refused a frame. --- crates/victory-gpu/src/descriptor/host.rs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/crates/victory-gpu/src/descriptor/host.rs b/crates/victory-gpu/src/descriptor/host.rs index 1ffdc72..9fd871b 100644 --- a/crates/victory-gpu/src/descriptor/host.rs +++ b/crates/victory-gpu/src/descriptor/host.rs @@ -1430,7 +1430,20 @@ fn dynamic_slots(count: u32, null: u32) -> u32 { .unwrap_or(DYNAMIC << 2) }); if null < PORTABLE_VIEWS { - return DYNAMIC; + // LOCAL (NVIDIA, 11/25): a host heap capped at 1,000,000 views ran + // these out with the fast settings (THIN: 1,100-4,800 of 12,000-16,600 + // tables a frame refused, each a dropped draw). `VICTORY_DYNAMIC_SLOTS` + // takes more of them from the title's slots kept in place (tables + // past those are made afresh here anyway), at most half the heap. + static CAPPED: std::sync::OnceLock = std::sync::OnceLock::new(); + return *CAPPED.get_or_init(|| { + let asked = std::env::var("VICTORY_DYNAMIC_SLOTS").ok().and_then(|v| v.trim().parse::().ok()); + let slots = asked.unwrap_or(DYNAMIC).clamp(DYNAMIC, null / 2); + if slots != DYNAMIC { + tracing::warn!(slots, title_in_place = null - slots, "LOCAL dynamic descriptor slots on a capped view heap"); + } + slots + }); } null.saturating_sub(count).min(most).max(DYNAMIC) }