gpu/launcher: add VICTORY_WINDOWS_VRAM_PERCENT, F1 DLSS UltraPerf option, and enable ReBAR 768MB + COPY/STORE_BESIDE
CI / check (push) Canceled after 0s

This commit is contained in:
theme613 committed 2026-11-28 21:06:47 +08:00
1 parent 604908e486
commit 6a9d4732e9
4 files changed
+50 -25

No files matched your search

+16 -3
View File
@@ -560,6 +560,19 @@ fn window_mapped_most() -> u64 {
})
}
/// Maximum VRAM budget percentage up to which windows may be placed in card
/// memory (`VICTORY_WINDOWS_VRAM_PERCENT`, 50..=95; default 80).
fn window_vram_percent() -> u64 {
static PCT: std::sync::OnceLock<u64> = std::sync::OnceLock::new();
*PCT.get_or_init(|| {
std::env::var("VICTORY_WINDOWS_VRAM_PERCENT")
.ok()
.and_then(|v| v.trim().parse().ok())
.unwrap_or(80)
.clamp(50, 95)
})
}
/// Bytes alive of windows in card memory the CPU maps.
static WINDOW_MAPPED_BYTES: AtomicU64 = AtomicU64::new(0);
@@ -572,7 +585,7 @@ fn window_mapped_for(size: u64) -> Option<(ID3D12Resource, *mut u8)> {
}
let host = host()?;
if let Some([budget, used, ..]) = host.video_memory()
&& used + size > budget / 10 * 8
&& used + size > budget * window_vram_percent() / 100
{
return None;
}
@@ -608,7 +621,7 @@ fn window_room_for(size: u64) -> Option<ID3D12Resource> {
return None;
}
if let Some([budget, used, ..]) = host.video_memory()
&& used + size > budget / 10 * 8
&& used + size > budget * window_vram_percent() / 100
{
return None;
}
@@ -2465,7 +2478,7 @@ fn wc_mapped_for(size: u64) -> Option<(ID3D12Resource, *mut u8)> {
}
let host = host()?;
if let Some([budget, used, ..]) = host.video_memory()
&& used + size > budget / 10 * 8
&& used + size > budget * window_vram_percent() / 100
{
return None;
}