VICTORY_SEND_BAR off unless set (auto-on cost 7-8% on 16 GB PCs, issue 3965)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
trustno1-coder
2026-11-30 05:15:28 -08:00
parent 9a427c1408
commit 1a4c66ca49
2 changed files with 5 additions and 6 deletions

View File

@ -200,11 +200,10 @@ pub(super) fn trim() {
/// default.
fn on_card() -> bool {
static ON: OnceLock<bool> = OnceLock::new();
// Unset: on when the shared budget is small.
*ON.get_or_init(|| match std::env::var_os("VICTORY_SEND_BAR") {
Some(v) => v == "1",
None => crate::residency::shared_is_small(),
})
// Unset: off, also when the shared budget is small. On a 16 GB PC the
// automatic setting cost 7-8% (issue 3965): filling card memory through
// the bus holds the submitting thread, which the card waits for.
*ON.get_or_init(|| std::env::var_os("VICTORY_SEND_BAR").is_some_and(|v| v == "1"))
}
/// Whether submission send buffers use CPU write-back (`L0`) memory instead of

View File

@ -224,7 +224,7 @@ pub(crate) fn shared_is_small() -> bool {
let Some(host) = crate::host::host() else { return false };
let small = host.video_memory().is_some_and(|[_, _, budget, _]| small_budget(budget)) && host.mapped_card_memory();
if small {
tracing::info!("small shared GPU memory budget: windows and sends go to card memory (VICTORY_WINDOWS_BAR_MB=0, VICTORY_SEND_BAR=0 to opt out)");
tracing::info!("small shared GPU memory budget: windows go to card memory (VICTORY_WINDOWS_BAR_MB=0 to opt out; sends stay in PC memory unless VICTORY_SEND_BAR=1)");
}
small
})