The run's numbers on the picture (VICTORY_PANEL=1; off; F3 shows and hides it)
White on black in the upper left corner of what is shown, twice a second, from the counters of the frame-rate line, memory and textures; our own 5x7 characters. Copied onto the swap chain's buffer out of a buffer in the card's memory: screenshots carry it, saved frames and the frame recorder do not. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
bc83b16387
commit
edcde681f0
7 files changed
+529
-2
No files matched your search
@@ -3467,6 +3467,8 @@ pub(crate) mod aside;
|
||||
pub(crate) mod awake;
|
||||
mod card_steps;
|
||||
pub(crate) mod indirects;
|
||||
#[cfg(feature = "diagnostics")]
|
||||
mod panel;
|
||||
mod place;
|
||||
mod send;
|
||||
pub(crate) use send::{goes_as_words, words_under};
|
||||
@@ -7960,6 +7962,8 @@ struct Presenter {
|
||||
ahead: Vec<(HostList, u64)>,
|
||||
hwnd: HWND,
|
||||
meter: Meter,
|
||||
#[cfg(feature = "diagnostics")]
|
||||
panel: panel::Panel,
|
||||
}
|
||||
|
||||
/// The frame rate, shown in the window's caption every second and logged
|
||||
@@ -7989,6 +7993,12 @@ 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)
|
||||
}
|
||||
|
||||
/// Counts a presented frame.
|
||||
fn frame(&mut self, hwnd: HWND) {
|
||||
#[cfg(feature = "diagnostics")]
|
||||
@@ -8363,6 +8373,8 @@ impl Host {
|
||||
.flatten();
|
||||
#[cfg(feature = "diagnostics")]
|
||||
let probe = if slot.is_some() { None } else { crate::capture::probe(&self.device, list, texture) };
|
||||
#[cfg(feature = "diagnostics")]
|
||||
p.panel.draw(self, copy, &back, (width, height), format);
|
||||
#[cfg(not(feature = "diagnostics"))]
|
||||
let _ = frame;
|
||||
list.ResourceBarrier(&[
|
||||
@@ -8390,6 +8402,8 @@ impl Host {
|
||||
let mut showing = crate::timeline::span("the host's Present");
|
||||
let _ = p.swap_chain.Present(0, DXGI_PRESENT(0));
|
||||
showing.next("the frame meter");
|
||||
#[cfg(feature = "diagnostics")]
|
||||
p.panel.frame(p.meter.line_due());
|
||||
p.meter.frame(p.hwnd);
|
||||
showing.end();
|
||||
#[cfg(feature = "diagnostics")]
|
||||
@@ -8442,6 +8456,8 @@ impl Host {
|
||||
ahead: Vec::new(),
|
||||
hwnd,
|
||||
meter: Meter::new(),
|
||||
#[cfg(feature = "diagnostics")]
|
||||
panel: panel::Panel::new(),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user