Open water without dark blocks; the F3 stats panel in every build

Water: on hosts of 32-lane waves the water's two tiled light programs
(water_shading:CS_TransmissionVolumetrics_Tiled 5dc3b25986622949 and
_Tiled_LocalLights 6f225b641c5b0708) translate in the wave-wide form only,
and in that form leave whole tiles of open water dark (around boats, along
shores, under bridges) at about 15 ms of the card a frame. They are left out
there (pipeline/make.rs); VICTORY_WATER_LIGHT=1, or WATER LIGHT in the F1
menu, runs them as before. Runs on a copy of a save on the first boat ride,
RTX 5070, Series X 1440p DLSS Quality: 25 fps with the blocks before, 30 fps
without them after; the water is darker and bluer without that light.
fxceless/victory-fork's README of 2026-11-27 names the same two programs and
form.

Stats panel: host/panel.rs is built without the diagnostics feature too (the
recording time is counted in diagnostics builds only), has a frame generation
line, and is switched by F3 or by STATS PANEL (F3) in the menu, live. The FPS
line at the top is hidden while the panel shows.

README: both, and where the panel is.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
trustno1-coderandClaude Fable 5.2 committed 2026-11-26 20:39:26 -08:00
1 parent 9d6300fa2d
commit 35c156087e
5 files changed
+93 -22

No files matched your search

+16 -5
View File
@@ -8,7 +8,8 @@
> from NVIDIA's own GitHub; they are not part of this repository. Without
> them the game still runs, with its own upscaling and no frame generation.
> - **F1 in the game brings up the settings menu** (arrow keys pick and
> change, Enter does it).
> change, Enter does it). **F3 shows the stats panel** (frame rate, frame
> generation, draws, GPU and memory numbers).
>
> The steps are under [How to run it](#how-to-run-it).
@@ -98,6 +99,15 @@ speed, in the picture and in simply being able to play it:
cap, console profile, picture size, the light estimates and the main speed
switches, saved to `victory-settings.txt` and applied at the next start
("SAVE AND RESTART NOW" does that for you; lines marked LIVE change at once).
- **The F3 stats panel**, in every build: frame rate and frame time, frames
shown with frame generation, draws, how busy the GPU and the submitting
thread are, copies, RAM and VRAM. The menu switches it too.
- **Open water without dark blocks.** Two of the title's water light programs
run on 32-lane cards only in a form that left whole tiles of the sea dark
(around boats, along shores, under bridges) and cost about 15 ms of the
card a frame. They are left out there: no blocks and 30 fps instead of 25
on the first boat ride (RTX 5070), with water that is darker and bluer.
WATER LIGHT in the menu (`VICTORY_WATER_LIGHT=1`) runs them again.
- **One command to play**: the launcher builds the layer the first time and
applies what the menu saved.
- **`Get-NVIDIA-DLSS.cmd`**: the eight NVIDIA files that are loaded, about
@@ -111,9 +121,10 @@ speed, in the picture and in simply being able to play it:
game, built and run on this card before it was merged: ten so far.
Where each of these is today: this fork's own code in this tree is the F1
menu, frame generation from 2x to 6x with its live switching and memory
handling, the lifted frame rate cap, the frame rate line, the launcher and the
NVIDIA file fetcher. The foxhound line carries the descriptor slots, the
menu, the stats panel in every build, the water light switch, frame
generation from 2x to 6x with its live switching and memory handling, the
lifted frame rate cap, the frame rate line, the launcher and the NVIDIA file
fetcher. The foxhound line carries the descriptor slots, the
compares on the card, the interface plane and the face network in its own
form. The black-blob scrub, the graphics card picker and the ray-tracing
builder path are in this repository's history, and come over as this base
@@ -215,7 +226,7 @@ fork has always had; its options:
| `-SeriesS` | the Series S profile: 1280x720 inside, faster, softer |
| `-Res 1080to1440` / `4k` | scene at 1080p upscaled by the title / the stock 3840x2160 output |
| `-NoFrameGenReady` | frame generation only with `-FrameGen` (it is otherwise made ready at every start, so the menu can switch it) |
| `-Build diag` | the diagnostics build (slower; captures, timelines, the F3 numbers panel) |
| `-Build diag` | the diagnostics build (slower; captures, timelines, recording time in the F3 panel) |
| `-More @{VICTORY_X='1'}` | add or override any switch |
What the F1 menu saved (`victory-settings.txt`) goes over these at every start;
+1 -6
View File
@@ -3840,7 +3840,6 @@ mod card_steps;
pub(crate) mod indirects;
mod font;
mod menu;
#[cfg(feature = "diagnostics")]
mod panel;
mod place;
mod send;
@@ -9233,7 +9232,7 @@ struct Presenter {
hwnd: HWND,
meter: Meter,
composer: Option<crate::compose::Composer>,
#[cfg(feature = "diagnostics")]
/// The numbers panel (F3), in every build.
panel: panel::Panel,
/// The F1 settings menu.
menu: menu::Menu,
@@ -9271,7 +9270,6 @@ impl Meter {
}
/// Whether the next frame counted makes the frame-rate line.
#[cfg(feature = "diagnostics")]
fn line_due(&self) -> bool {
self.since.elapsed() >= std::time::Duration::from_secs(1)
}
@@ -9971,7 +9969,6 @@ impl Host {
} else {
crate::popwatch::take(&self.device, list, texture)
};
#[cfg(feature = "diagnostics")]
p.panel.draw(self, copy, &back, (width, height), format);
p.menu.draw(self, copy, &back, (width, height), format);
#[cfg(not(feature = "diagnostics"))]
@@ -10033,7 +10030,6 @@ impl Host {
crate::streamline::present_returned(called);
crate::streamline::present_ends(presenting);
showing.next("the frame meter");
#[cfg(feature = "diagnostics")]
p.panel.frame(p.meter.line_due());
p.menu.frame();
p.meter.frame(p.hwnd);
@@ -10122,7 +10118,6 @@ impl Host {
hwnd,
meter: Meter::new(),
composer: None,
#[cfg(feature = "diagnostics")]
panel: panel::Panel::new(),
menu: menu::Menu::new(),
})
+5 -3
View File
@@ -13,7 +13,7 @@
//! (DLSS mode, frame generation, frame rate, console, picture size), which it
//! turns into the layer's switches; the others are the switches themselves.
//!
//! In every build (the stats panel is in diagnostics builds only). Drawn as
//! In every build, as the stats panel is. Drawn as
//! that panel is: white text on a black box, copied onto the swap chain's
//! buffer, in the middle of the picture.
@@ -62,6 +62,7 @@ const ITEMS: &[Item] = &[
Item { var: "VICTORY_MENU_FRAMEGEN", label: "FRAME GENERATION", values: &[("0", "OFF"), ("2", "2X"), ("3", "3X"), ("4", "4X"), ("5", "5X"), ("6", "6X (MOST)")], live: false },
Item { var: "VICTORY_MENU_FPS", label: "FRAME RATE CAP", values: &[("1000", "NONE"), ("120", "120"), ("60", "60"), ("30", "30 (THE GAME)")], live: false },
Item { var: "VICTORY_FPS_LINE", label: "FPS AT THE TOP", values: &[("1", "ON"), ("0", "OFF")], live: true },
Item { var: "VICTORY_PANEL", label: "STATS PANEL (F3)", values: &[("0", "OFF"), ("1", "ON")], live: true },
Item { var: "VICTORY_MENU_CONSOLE", label: "CONSOLE", values: &[("series-x", "SERIES X"), ("series-s", "SERIES S (FASTER)")], live: false },
Item { var: "VICTORY_MENU_RES", label: "SERIES X PICTURE", values: &[("1440", "2560X1440"), ("1080to1440", "1080P TO 1440P"), ("4k", "3840X2160")], live: false },
// The layer's switches.
@@ -70,6 +71,7 @@ const ITEMS: &[Item] = &[
Item { var: "VICTORY_AMBIENT_SPECULAR", label: "REFLECTION ESTIMATE", values: ON_UNSET, live: false },
Item { var: "VICTORY_AMBIENT_AIR", label: "FOG CAP", values: &[("1.5", "1.5"), ("1", "1"), ("2", "2"), ("", "NONE")], live: false },
Item { var: "VICTORY_BVH_BUILDER", label: "RAY TRACING (SLOW, BROKEN)", values: UNSET_ON, live: false },
Item { var: "VICTORY_WATER_LIGHT", label: "WATER LIGHT", values: &[("", "OFF (NO DARK BLOCKS)"), ("1", "ON (GREEN, DARK BLOCKS)")], live: false },
Item { var: "VICTORY_LEAVE_OUT", label: "HEAT HAZE AND DECAL DEFRAG", values: &[("02384a60fda6f2d0,731a39171b568298", "LEFT OUT"), ("", "RUN (SLOWER, SMEARS)")], live: false },
Item { var: "VICTORY_EARLY_DEPTH", label: "EARLY DEPTH TEST", values: ON_UNSET, live: false },
Item { var: "VICTORY_WC_NO_BACK", label: "SKIP BIG COPY-BACKS", values: ON_UNSET, live: false },
@@ -106,8 +108,7 @@ fn fps_line() -> Option<String> {
if !fps_line_on().load(Ordering::Relaxed) {
return None;
}
// The stats panel has that corner (diagnostics builds, F3).
#[cfg(feature = "diagnostics")]
// The stats panel has that corner (F3), and says the same.
if super::panel::shown().load(Ordering::Relaxed) {
return None;
}
@@ -336,6 +337,7 @@ impl Menu {
// Off (0) or the frames shown for each one rendered, from the next present on.
"VICTORY_MENU_FRAMEGEN" => crate::streamline::set_framegen(value.parse().unwrap_or(0)),
"VICTORY_FPS_LINE" => fps_line_on().store(value != "0", Ordering::Relaxed),
"VICTORY_PANEL" => super::panel::shown().store(value == "1", Ordering::Relaxed),
_ => {}
}
}
+50 -8
View File
@@ -1,5 +1,7 @@
//! Diagnostics: the run's numbers on the picture (`VICTORY_PANEL=1`; off by
//! default; F3 shows and hides it while our window has the focus): white
//! The run's numbers on the picture, in every build (`VICTORY_PANEL=1`; off
//! by default; F3 or the settings menu shows and hides it while our window
//! has the focus; the time spent recording is counted in diagnostics builds
//! only): white
//! text on a black box in the upper left corner of what is shown, so that a
//! screenshot carries them, with what it costs itself on the submitting
//! thread. Made again twice a second from the counters of
@@ -28,7 +30,7 @@ const GLYPH: (u32, u32) = (5, 7);
const CELL: (u32, u32) = (6, 9);
/// Characters in a line, lines, and the box's rim in dots.
const COLUMNS: u32 = 40;
const LINES: u32 = 9;
const LINES: u32 = 10;
const RIM: u32 = 3;
/// The texts are put into one of these in turn: the card reads the others,
@@ -116,7 +118,10 @@ const COUNTERS: usize = 11;
impl Counters {
fn now() -> Counters {
use super::{CARD_CLOCK_US, COPY_BACK, PREPARING};
use crate::copystat::{C, peek};
#[cfg(feature = "diagnostics")]
let recording = crate::copystat::peek(crate::copystat::C::RecordNs);
#[cfg(not(feature = "diagnostics"))]
let recording = 0;
let get = |a: &std::sync::atomic::AtomicU64| a.load(Ordering::Relaxed);
Counters([
super::worked(),
@@ -128,7 +133,7 @@ impl Counters {
get(&COPY_BACK[1]),
get(&crate::shadow::CARD_STATS[0]),
crate::draw::dropped_now(),
peek(C::RecordNs),
recording,
crate::draw::drawn(),
])
}
@@ -144,19 +149,47 @@ impl Counters {
}
}
/// The process's memory in bytes: in physical memory, and committed
/// (private bytes).
fn process_memory() -> (u64, u64) {
use windows_sys::Win32::System::ProcessStatus::{K32GetProcessMemoryInfo, PROCESS_MEMORY_COUNTERS};
use windows_sys::Win32::System::Threading::GetCurrentProcess;
let mut c = PROCESS_MEMORY_COUNTERS {
cb: size_of::<PROCESS_MEMORY_COUNTERS>() as u32,
..Default::default()
};
// SAFETY: our own process and a sized structure.
unsafe { K32GetProcessMemoryInfo(GetCurrentProcess(), &mut c, c.cb) };
(c.WorkingSetSize as u64, c.PagefileUsage as u64)
}
/// The frame generation line: `per` frames shown for each one rendered.
fn generated(fps: f64, per: u32) -> String {
match per {
0 | 1 => "FRAME GEN OFF".to_owned(),
per => format!("FRAME GEN {per}X SHOWN {:.1} FPS", fps * f64::from(per)),
}
}
/// The text. `c`: [`Counters`] per frame, `ms` a frame's time, `worst` the
/// longest frame's, `cost` what this takes of a frame, in microseconds.
fn text(c: &[f64; COUNTERS], ms: f64, worst: f64, cost: f64, host: &Host) -> Vec<String> {
let gb = |bytes: u64| bytes as f64 / (1u64 << 30) as f64;
let (working, private) = crate::copystat::process_memory();
let (working, private) = process_memory();
let [budget, used, _, shared] = host.video_memory().unwrap_or_default();
let idle = (c[1] / 1e3).min(ms);
let fps = 1e3 / ms.max(0.001);
vec![
format!("FPS {:.1} FRAME {ms:.1} MS LONGEST {worst:.0}", 1e3 / ms.max(0.001)),
format!("FPS {fps:.1} FRAME {ms:.1} MS LONGEST {worst:.0}"),
generated(fps, crate::streamline::shown_per_frame()),
format!("DRAWS {:.0} DROPPED {:.0}", c[10], c[8]),
format!("SUBMIT BUSY {:.1} WAITS FOR GPU {:.1}", c[0] / 1e3, c[3] / 1e3),
format!("GPU BUSY {:.1} IDLE BEHIND US {:.1}", ms - idle, c[2] / 1e3),
format!("RECORDING {:.0} MS COPY BACK {:.1}", c[9] / 1e6, c[5] / 1e3),
if cfg!(feature = "diagnostics") {
format!("RECORDING {:.0} MS COPY BACK {:.1}", c[9] / 1e6, c[5] / 1e3)
} else {
format!("COPY BACK {:.1} MS", c[5] / 1e3)
},
format!("MB UP {:.0} TEXTURES {:.0} BACK {:.0}", c[7] / 1e6, c[4] / 1e6, c[6] / 1e6),
format!("RAM {:.1} GB IN MEMORY {:.1}", gb(private), gb(working)),
format!("VRAM {:.1}/{:.1} GB SHARED {:.1}", gb(used), gb(budget), gb(shared)),
@@ -302,6 +335,7 @@ impl Panel {
}
let began = Instant::now();
// Not the title's: the frame recorder leaves it out.
#[cfg(feature = "diagnostics")]
let _ours = crate::replay::record::unrecorded();
let scale = scale(height);
if self.buffers.as_ref().is_none_or(|b| (b.format, b.scale) != (format, scale)) {
@@ -380,6 +414,14 @@ mod tests {
}
}
/// The frame generation line fits the box and says what is shown.
#[test]
fn generated_frames_are_told() {
assert_eq!(generated(27.5, 1), "FRAME GEN OFF");
assert_eq!(generated(27.5, 6), "FRAME GEN 6X SHOWN 165.0 FPS");
assert!(generated(999.9, 6).len() <= COLUMNS as usize);
}
#[test]
fn a_box_is_painted() {
let lines = vec!["I".to_owned(), " i".to_owned()];
+21
View File
@@ -74,10 +74,31 @@ fn leave_out() -> &'static [String] {
})
}
/// The light in the water's volume, in tiles (`water_shading:CS_TransmissionVolumetrics_Tiled`
/// and `_Tiled_LocalLights`, GTA VI 1.0.2.1): programs of one 64-lane wave a group, which a
/// host of 32-lane waves gets in the wave-wide form only (`victory_shader::emit`, 4 and 7
/// branches taken wave-wide). In that form they leave whole tiles of open water dark, around
/// boats, along shores and under bridges, and take about 15 ms of the card a frame (RTX 5070,
/// runs r_water1 and r_water3 of 2026-11-26: 25 fps with them, 30 without, the blocks gone;
/// fxceless/victory-fork's README of 2026-11-27 names the same two programs and form). Left
/// out there, the water has no light of its own depth (darker, bluer) and no blocks;
/// `VICTORY_WATER_LIGHT=1` runs them as before.
const WATER_LIGHT: [&str; 2] = ["5dc3b25986622949", "6f225b641c5b0708"];
fn water_light_left_out(shaders: &[Arc<Shader>]) -> bool {
static ASKED: OnceLock<bool> = OnceLock::new();
!*ASKED.get_or_init(|| std::env::var_os("VICTORY_WATER_LIGHT").is_some_and(|v| v == "1"))
&& victory_shader::emit::host_settings()[0] == 32
&& shaders.iter().any(|s| WATER_LIGHT.contains(&s.hash.as_str()))
}
fn left_out(shaders: &[Arc<Shader>]) -> Option<&'static str> {
if !leave_out().is_empty() && shaders.iter().any(|s| leave_out().contains(&s.hash)) {
return Some("named in VICTORY_LEAVE_OUT, left out");
}
if water_light_left_out(shaders) {
return Some("the water's tiled light on a host of 32-lane waves (dark blocks; VICTORY_WATER_LIGHT=1 runs it), left out");
}
static SKIP_RT_RESOLVE: OnceLock<bool> = OnceLock::new();
let skip_rt = *SKIP_RT_RESOLVE.get_or_init(|| {
let builder = std::env::var_os("VICTORY_BVH_BUILDER").is_some_and(|v| v == "1");