Frames shown as soon as presented, underwater shader back, warm-up restart only with frame generation

- Swap chain: DXGI's tearing support where the system has it, so a focused
  window (independent flip) no longer waits for each refresh, about 2 fps
  more in front. VICTORY_TEARING=0 turns it off; a refused present of that
  kind falls back to presenting at the next refresh for the rest of the run,
  and is logged.
- Shaders: a program that has no wave32 lowering with the loop step on
  (VICTORY_LOOPS_WAVE) is translated again without it, so the water compute
  shader 926c46bab3b86bd6 runs again (black or missing water underwater,
  #539, #570).
- The first start of a new exe restarts by itself only when DLSS frame
  generation is ready or on; without it a first run plays at full speed.
- F1: turning frame generation on in a run started without it says
  "RESTART REQUIRED TO ENABLE FRAME GENERATION".

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
trustno1-coderandClaude Opus 5.5 committed 2026-11-27 18:44:17 -08:00
1 parent b4e1b08245
commit 8fc22547c8
4 files changed
+127 -4

No files matched your search

+33
View File
@@ -102,6 +102,15 @@ const ABOUT_NO_DLSS: [&str; 3] = [
"DOWNLOADED FROM NVIDIA ON GITHUB AT THE NEXT START",
"(ABOUT 70 MB, ONCE). SAVE AND RESTART NOW DOES IT.",
];
/// Frame generation that this run did not start with: it is made ready only at a start with it
/// on (a start with it ready but off held some PCs at 14 fps, #515, #574), so turning it on takes
/// a restart; a run started with it on changes it, or turns it off, live.
const ABOUT_FRAMEGEN_RESTART: [&str; 3] = [
"RESTART REQUIRED TO ENABLE FRAME GENERATION: THIS RUN",
"STARTED WITHOUT IT. SAVE AND RESTART NOW TURNS IT ON.",
"AFTER THAT IT CHANGES, OR TURNS OFF, LIVE.",
];
const FRAMEGEN: &str = "VICTORY_MENU_FRAMEGEN";
/// The note after the first Enter on it: the second one does it.
const CONFIRM_PRELOAD: &str = "ENTER AGAIN: SAVE, CLOSE THE GAME AND PRELOAD";
/// The last line of the box: where this build comes from.
@@ -514,6 +523,10 @@ impl Menu {
&& std::env::var_os("VICTORY_STREAMLINE_DIR").is_none()
{
ABOUT_NO_DLSS
} else if ITEMS.get(self.at).is_some_and(|i| i.var == FRAMEGEN && !live(i))
&& !matches!(self.values[self.at].as_str(), "" | "0")
{
ABOUT_FRAMEGEN_RESTART
} else {
[""; 3]
};
@@ -558,6 +571,9 @@ impl Menu {
self.apply_live(i);
}
self.note.clear();
if item.var == FRAMEGEN && !live(item) && !matches!(self.values[i].as_str(), "" | "0") {
"RESTART REQUIRED TO ENABLE FRAME GENERATION".clone_into(&mut self.note);
}
}
/// A setting the build reads at each use: changed in this run's environment at once.
@@ -1041,6 +1057,23 @@ mod tests {
let lines = menu.lines();
assert!(lines[lines.len() - 5..lines.len() - 2].iter().all(String::is_empty));
assert_eq!(ITEMS.iter().filter(|i| i.var == MFG).count(), 1);
// Frame generation turned on in a run started without it (no Streamline in tests): a
// restart is required, and the menu says so; OFF needs no word.
for line in ABOUT_FRAMEGEN_RESTART {
assert!(line.len() <= COLUMNS as usize && line.bytes().all(|c| glyph(c) != glyph(b'#')), "{line}");
}
let fg = ITEMS.iter().position(|i| i.var == FRAMEGEN).expect("in the menu");
menu.at = fg;
menu.values[fg] = "0".to_owned();
menu.change(fg, 1);
assert_eq!(menu.values[fg], "2");
assert_eq!(menu.note, "RESTART REQUIRED TO ENABLE FRAME GENERATION");
let lines = menu.lines();
assert_eq!(&lines[lines.len() - 5..lines.len() - 2], ABOUT_FRAMEGEN_RESTART);
menu.change(fg, -1);
assert!(menu.note.is_empty());
let lines = menu.lines();
assert!(lines[lines.len() - 5..lines.len() - 2].iter().all(String::is_empty));
}
#[test]