Frame generation made ready only when asked for (--framegen-ready, -FrameGenReady) (#544)
A start without frame generation no longer goes through Streamline's swap chain, which held some PCs at a flat 14 fps (#515, #574). --no-framegen-ready is still accepted. FSR 3 frame generation follows the same rule and still needs DLSS upscaling on. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
9b712a6ab2
commit
b4e1b08245
3 files changed
+39
-16
No files matched your search
@@ -153,10 +153,16 @@ pub(crate) struct Play {
|
||||
#[arg(long, default_value = "quality", value_parser = DLSS_MODES)]
|
||||
dlss: String,
|
||||
/// DLSS frame generation on from the start: frames shown for each one
|
||||
/// rendered, 2 to 6. Without it, it is ready and the F1 menu switches it.
|
||||
/// rendered, 2 to 6. Without it, it is off (see `--framegen-ready`).
|
||||
#[arg(long, value_parser = clap::value_parser!(u32).range(2..=6))]
|
||||
framegen: Option<u32>,
|
||||
/// Frame generation not made ready at the start.
|
||||
/// Frame generation made ready but off at the start, so that the F1 menu
|
||||
/// switches it while playing. Not by default: ready but off, frames go
|
||||
/// through Streamline's swap chain, which held an RTX 5070 Ti's first
|
||||
/// playable part at 14 a second (20 without).
|
||||
#[arg(long)]
|
||||
framegen_ready: bool,
|
||||
/// (The default now; still taken.)
|
||||
#[arg(long)]
|
||||
no_framegen_ready: bool,
|
||||
/// Which frame generation: auto (DLSS frame generation where the card has
|
||||
@@ -310,7 +316,7 @@ fn settings(o: &Play, menu: &[(String, String)], streamline: Option<&Path>) -> (
|
||||
set("VICTORY_STREAMLINE_DIR", &dir.to_string_lossy());
|
||||
if framegen {
|
||||
framegen_x = Some(times);
|
||||
} else if !o.no_framegen_ready {
|
||||
} else if o.framegen_ready && !o.no_framegen_ready {
|
||||
framegen_x = Some(0); // ready, off
|
||||
}
|
||||
if let Some(x) = framegen_x {
|
||||
@@ -328,7 +334,7 @@ fn settings(o: &Play, menu: &[(String, String)], streamline: Option<&Path>) -> (
|
||||
// Only with DLSS on: it never runs without DLSS's upscaling, and made ready without it (the
|
||||
// title's FidelityFX then left with AMD's files) the title stopped during the boot screens
|
||||
// (0x80000003 at +0x2219650, or exit code 3; #331, #459: --no-framegen-ready avoided it).
|
||||
if dlss_on && fg_type != "dlss" && (framegen || !o.no_framegen_ready) {
|
||||
if dlss_on && fg_type != "dlss" && (framegen || o.framegen_ready && !o.no_framegen_ready) {
|
||||
set("VICTORY_FSR_FRAMEGEN", "1");
|
||||
if fg_type == "fsr" {
|
||||
s.remove("VICTORY_FRAMEGEN");
|
||||
@@ -924,8 +930,8 @@ fn restart_args(o: &Play, exe: &Path) -> String {
|
||||
if let Some(x) = o.framegen {
|
||||
args.extend(["--framegen".to_owned(), x.to_string()]);
|
||||
}
|
||||
if o.no_framegen_ready {
|
||||
args.push("--no-framegen-ready".to_owned());
|
||||
if o.framegen_ready && !o.no_framegen_ready {
|
||||
args.push("--framegen-ready".to_owned());
|
||||
}
|
||||
args.extend(["--fg-type".to_owned(), quoted(&o.fg_type), "--fps".to_owned(), o.fps.to_string()]);
|
||||
for more in &o.more {
|
||||
@@ -955,6 +961,7 @@ mod tests {
|
||||
res: "1440".to_owned(),
|
||||
dlss: "quality".to_owned(),
|
||||
framegen: None,
|
||||
framegen_ready: false,
|
||||
no_framegen_ready: false,
|
||||
fg_type: "auto".to_owned(),
|
||||
fps: 1000,
|
||||
@@ -1020,7 +1027,14 @@ mod tests {
|
||||
assert_eq!(get("VICTORY_NATIVE_1440P"), Some("1"));
|
||||
assert_eq!((get("VICTORY_DLSS"), get("VICTORY_DLSS_MODE")), (Some("1"), Some("quality")));
|
||||
assert_eq!(get("VICTORY_STREAMLINE_DIR"), Some(r"C:\nvidia"));
|
||||
// frame generation ready, off, with a little memory held back for it
|
||||
// frame generation off and not made ready: no swap chain of Streamline's, no memory held back
|
||||
assert!(!s.contains_key("VICTORY_FRAMEGEN") && !s.contains_key("VICTORY_FRAMEGEN_X"));
|
||||
assert!(!s.contains_key("VICTORY_FSR_FRAMEGEN") && !s.contains_key("VICTORY_TEXTURE_ROOM_PERCENT"));
|
||||
// ready, off, with a little memory held back for it, when asked
|
||||
let mut o = options();
|
||||
o.framegen_ready = true;
|
||||
let (s, _) = settings(&o, &[], Some(dir));
|
||||
let get = |k: &str| s.get(k).map(String::as_str);
|
||||
assert_eq!((get("VICTORY_FRAMEGEN"), get("VICTORY_FRAMEGEN_X")), (Some("1"), Some("0")));
|
||||
assert_eq!(get("VICTORY_TEXTURE_ROOM_PERCENT"), Some("86"));
|
||||
assert_eq!(get("VICTORY_FRAME_INTERVAL_US"), Some("1000"));
|
||||
@@ -1034,10 +1048,16 @@ mod tests {
|
||||
let get = |k: &str| s.get(k).map(String::as_str);
|
||||
assert!(!s.contains_key("VICTORY_DLSS") && !s.contains_key("VICTORY_FRAMEGEN"));
|
||||
assert_eq!(get("VICTORY_MENU_DLSS"), Some("off"));
|
||||
// nor FSR 3 frame generation: made ready without DLSS, the title's own FidelityFX
|
||||
// check stopped the game (#331, #459)
|
||||
// nor FSR 3 frame generation, off and not made ready
|
||||
assert!(!s.contains_key("VICTORY_FSR_FRAMEGEN") && !s.contains_key("VICTORY_FRAMEGEN_X"));
|
||||
assert!(!s.contains_key("VICTORY_TEXTURE_ROOM_PERCENT"));
|
||||
assert_eq!(get("VICTORY_MENU_FG_TYPE"), Some("auto"));
|
||||
// nor when asked: made ready without DLSS, the title's own FidelityFX check stopped the
|
||||
// game (#331, #459)
|
||||
let mut o = options();
|
||||
o.framegen_ready = true;
|
||||
let (s, _) = settings(&o, &[], None);
|
||||
assert!(!s.contains_key("VICTORY_FSR_FRAMEGEN") && !s.contains_key("VICTORY_FRAMEGEN_X"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in new issue
Block a user