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

+9 -3
View File
@@ -118,7 +118,13 @@ const S_RES: &str = "VICTORY_MENU_S_RES";
/// The Series S scene sizes and the DLSS mode of each (the picture is 1920x1080). Only DLSS
/// changes it: the title's own FidelityFX path from 540 stopped it at the start (0xc0000094,
/// a division by zero in the title, 2026-11-28), so with DLSS off the scene stays at 720.
const S_MODES: [(&str, &str); 4] = [("1080", "dlaa"), ("720", "quality"), ("626", "balanced"), ("540", "performance")];
const S_MODES: [(&str, &str); 5] = [
("1080", "dlaa"),
("720", "quality"),
("626", "balanced"),
("540", "performance"),
("360", "ultraperformance"),
];
const ABOUT_S_RES: [&str; 3] = [
"THE SIZE THE GAME RENDERS AT. THE PICTURE IS 1920X1080.",
"OTHER THAN 720 NEEDS DLSS: THIS SETS ITS MODE (1080 IS",
@@ -148,7 +154,7 @@ const STAGES: &[(&str, &str)] = &[("2", "2"), ("1", "1"), ("0", "0 OFF")];
#[rustfmt::skip]
const ITEMS: &[Item] = &[
// The launcher's own choices.
Item { var: "VICTORY_MENU_DLSS", label: "DLSS", values: &[("quality", "QUALITY"), ("balanced", "BALANCED"), ("performance", "PERFORMANCE"), ("dlaa", "DLAA (NATIVE)"), ("off", "OFF")], live: false },
Item { var: "VICTORY_MENU_DLSS", label: "DLSS", values: &[("quality", "QUALITY"), ("balanced", "BALANCED"), ("performance", "PERFORMANCE"), ("ultraperformance", "ULTRA PERF"), ("dlaa", "DLAA (NATIVE)"), ("off", "OFF")], live: false },
Item { var: "VICTORY_MENU_FRAMEGEN", label: "FRAME GENERATION", values: &[("0", "OFF"), ("2", "2X"), ("3", "3X"), ("4", "4X"), ("5", "5X"), ("6", "6X (MOST)")], live: false },
// DLSS Frame Generation where it runs (RTX 40 and later), else AMD's FSR 3 (2X only).
Item { var: "VICTORY_MENU_FG_TYPE", label: "FRAME GEN TYPE", values: &[("auto", "AUTO"), ("dlss", "DLSS"), ("fsr", "FSR 3 (OLDER CARDS)")], live: false },
@@ -163,7 +169,7 @@ const ITEMS: &[Item] = &[
Item { var: "VICTORY_MENU_CONSOLE", label: "CONSOLE", values: &[("series-x", "SERIES X"), ("series-s", "SERIES S (FASTER)")], live: false },
Item { var: X_RES, label: "SERIES X PICTURE", values: &[("1440", "2560X1440"), ("1080to1440", "1080P TO 1440P"), ("4k", "3840X2160")], live: false },
// In place of SERIES X PICTURE when CONSOLE is Series S.
Item { var: S_RES, label: "SERIES S PICTURE", values: &[("1080", "1920X1080 (DLAA)"), ("720", "1280X720 (THE GAME)"), ("626", "1113X626"), ("540", "960X540 (FASTEST)")], live: false },
Item { var: S_RES, label: "SERIES S PICTURE", values: &[("1080", "1920X1080 (DLAA)"), ("720", "1280X720 (THE GAME)"), ("626", "1113X626"), ("540", "960X540 (FASTEST)"), ("360", "640X360 (ULTRA FAST)")], live: false },
// The layer's switches.
Item { var: "VICTORY_DLSS_PRESET", label: "DLSS MODEL", values: &[("", "DEFAULT"), ("k", "K"), ("j", "J"), ("m", "M"), ("l", "L")], live: false },
Item { var: "VICTORY_AMBIENT", label: "LIGHT ESTIMATE", values: &[("0.8", "0.8"), ("1", "1"), ("0.5", "0.5"), ("", "OFF")], live: false },
+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;
}