F1 settings menu, frame generation 2x-6x live, no frame rate cap, FPS line
On readmet3xt-lab/foxhound 02fc18a, which becomes this fork's base.
- host/menu.rs: the F1 settings menu, in every build (it was in the
diagnostics build only): DLSS mode and model, frame generation, frame
rate cap, console profile, picture size, the light estimates and the
main speed switches. Saved to victory-settings.txt, applied by the
launcher at the next start; "save and restart" from the menu. The title
gets no keyboard while it is shown (gameinput.rs).
- host/font.rs: the dot letters, moved out of the diagnostics panel so
that the menu has them in every build.
- streamline.rs: VICTORY_FRAMEGEN_X=2..6, the frames shown for each one
rendered (no more than the state says this card generates); 0: ready
but off. The amount and off/on change while the title runs
(set_framegen, from the menu). Result 39, "warning: out of VRAM", is
taken as set: asked again at every present it showed no generated
frame at all (1,828 times in one run on a full 12 GB card).
- The frame rate at the top left of the picture while the menu is closed:
frames rendered a second, and with frame generation those shown
(VICTORY_FPS_LINE=0: not). The window's caption says both too.
- scripts/play-foxhound.ps1: applies what the menu saved; -FrameGenX;
-Fps defaults to 1000 (no cap: VICTORY_FRAME_INTERVAL_US=1000); frame
generation is made ready at every start with Streamline so that the
menu can switch it (-NoFrameGenReady: not), with a share of the card's
memory held back for it (VICTORY_TEXTURE_ROOM_PERCENT 80 on, 86 ready);
NVIDIA's files are looked for in nvidia-sdk\ here; builds the layer when
it is not built. scripts/play-nvidia.ps1 is the same launcher under
this fork's old name.
- Get-NVIDIA-DLSS.cmd / scripts/get-nvidia-sdks.ps1: fetch the eight
NVIDIA files that are loaded (about 70 MB) out of NVIDIA's Streamline
release into nvidia-sdk\ (git-ignored). They are NVIDIA's, under
NVIDIA's licences, and are not part of this repository.
- README for this fork; foxhound's own is kept as docs/README-foxhound.md.
Measured on an RTX 5070 (Series X, native 2560x1440, DLSS Quality,
opening rooms): mostly 26-30 frames a second rendered; in Streamline's
own check 2x, 4x and 6x show exactly 2, 4 and 6 frames for each one
rendered.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
1 parent
02fc18a20a
commit
22c6be2e76
14 files changed
+1321
-224
No files matched your search
@@ -3838,6 +3838,8 @@ pub(crate) mod aside;
|
||||
pub(crate) mod awake;
|
||||
mod card_steps;
|
||||
pub(crate) mod indirects;
|
||||
mod font;
|
||||
mod menu;
|
||||
#[cfg(feature = "diagnostics")]
|
||||
mod panel;
|
||||
mod place;
|
||||
@@ -9233,10 +9235,16 @@ struct Presenter {
|
||||
composer: Option<crate::compose::Composer>,
|
||||
#[cfg(feature = "diagnostics")]
|
||||
panel: panel::Panel,
|
||||
/// The F1 settings menu.
|
||||
menu: menu::Menu,
|
||||
}
|
||||
|
||||
/// The frame rate, shown in the window's caption every second and logged
|
||||
/// every few seconds.
|
||||
/// The frame rate the meter last counted, in tenths of a frame a second (0: none yet): for the
|
||||
/// line at the top of the picture (`menu.rs`).
|
||||
pub(crate) static METER_FPS_TENTHS: std::sync::atomic::AtomicU32 = std::sync::atomic::AtomicU32::new(0);
|
||||
|
||||
struct Meter {
|
||||
since: std::time::Instant,
|
||||
frames: u32,
|
||||
@@ -9287,6 +9295,7 @@ impl Meter {
|
||||
let frames = f64::from(self.frames);
|
||||
let fps = frames / elapsed.as_secs_f64();
|
||||
let ms = elapsed.as_secs_f64() * 1000.0 / frames;
|
||||
METER_FPS_TENTHS.store((fps * 10.0).round() as u32, Ordering::Relaxed);
|
||||
let draws = (drawn - self.drawn) as f64 / frames;
|
||||
(self.since, self.frames, self.drawn) = (std::time::Instant::now(), 0, drawn);
|
||||
// Of a frame, ms preparing submissions and ms waiting for the GPU.
|
||||
@@ -9692,7 +9701,11 @@ impl Meter {
|
||||
self.caption = Some(buffer);
|
||||
}
|
||||
let Some(caption) = &self.caption else { return };
|
||||
let text = format!(" | VIctory {fps:.0} fps {ms:.1} ms/frame {draws:.0} draws/frame");
|
||||
// With frame generation showing more frames than are rendered, both rates.
|
||||
let text = match crate::streamline::shown_per_frame() {
|
||||
1 => format!(" | VIctory {fps:.0} fps {ms:.1} ms/frame {draws:.0} draws/frame"),
|
||||
per => format!(" | VIctory {fps:.0} fps (frame gen {:.0} fps) {ms:.1} ms/frame {draws:.0} draws/frame", fps * f64::from(per)),
|
||||
};
|
||||
let mut text: Vec<u16> = caption.iter().copied().chain(text.encode_utf16()).collect();
|
||||
text.push(0);
|
||||
// Setting the text waits for the window's thread (a title thread,
|
||||
@@ -9960,6 +9973,7 @@ impl Host {
|
||||
};
|
||||
#[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"))]
|
||||
let _ = frame;
|
||||
if composed {
|
||||
@@ -10021,6 +10035,7 @@ impl Host {
|
||||
showing.next("the frame meter");
|
||||
#[cfg(feature = "diagnostics")]
|
||||
p.panel.frame(p.meter.line_due());
|
||||
p.menu.frame();
|
||||
p.meter.frame(p.hwnd);
|
||||
showing.end();
|
||||
#[cfg(feature = "diagnostics")]
|
||||
@@ -10109,6 +10124,7 @@ impl Host {
|
||||
composer: None,
|
||||
#[cfg(feature = "diagnostics")]
|
||||
panel: panel::Panel::new(),
|
||||
menu: menu::Menu::new(),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user