From 672442b710f7f3b78f4c9379ac0b9d38ba8c7873 Mon Sep 17 00:00:00 2001 From: readmet3xt-lab <238408149+readmet3xt-lab@users.noreply.github.com> Date: Thu, 26 Nov 2026 19:04:21 +0530 Subject: [PATCH] VICTORY_LEAVE_OUT: pipelines of named shaders left out in every build VICTORY_SKIP_PIPELINES drops a shader's draws in diagnostics builds only. The decal heap's CS_DefragHeap_ComputeRelocations (02384a60fda6f2d0), translatable for 32-lane hosts since ce383f8 through host waves that meet by spinning, took 11.85 ms of the card a frame in the first gameplay area (timing run x1440-gputime2): gameplay 45 -> 51 ms. Its pipelines are left out the way the ray-tracing passes are, until it is fast. Co-Authored-By: Claude Opus 5.5 --- crates/victory-gpu/src/pipeline/make.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/crates/victory-gpu/src/pipeline/make.rs b/crates/victory-gpu/src/pipeline/make.rs index 898dcb7..921b850 100644 --- a/crates/victory-gpu/src/pipeline/make.rs +++ b/crates/victory-gpu/src/pipeline/make.rs @@ -56,7 +56,28 @@ fn named(shaders: &[Arc], name: &[u8]) -> bool { .any(|s| s.stage == "compute" && s.container.windows(name.len()).any(|w| w == name)) } +/// Shader hashes whose pipelines are left out in every build +/// (`VICTORY_LEAVE_OUT=<16 hex digits>[,..]`; `VICTORY_SKIP_PIPELINES` does +/// the same in diagnostics builds only). The decal heap's +/// `CS_DefragHeap_ComputeRelocations` (02384a60fda6f2d0), translatable for +/// 32-lane hosts through host waves that meet by spinning, took 11.85 ms of +/// the card a frame in the first gameplay area (timing run, 2026-11-26). +fn leave_out() -> &'static [String] { + static HASHES: OnceLock> = OnceLock::new(); + HASHES.get_or_init(|| { + std::env::var("VICTORY_LEAVE_OUT") + .unwrap_or_default() + .split(',') + .map(|h| h.trim().to_ascii_lowercase()) + .filter(|h| h.len() == 16 && h.bytes().all(|b| b.is_ascii_hexdigit())) + .collect() + }) +} + fn left_out(shaders: &[Arc]) -> Option<&'static str> { + if !leave_out().is_empty() && shaders.iter().any(|s| leave_out().contains(&s.hash)) { + return Some("named in VICTORY_LEAVE_OUT, left out"); + } static SKIP_RT_RESOLVE: OnceLock = OnceLock::new(); let skip_rt = *SKIP_RT_RESOLVE.get_or_init(|| { let builder = std::env::var_os("VICTORY_BVH_BUILDER").is_some_and(|v| v == "1");