mirror of
https://github.com/readmet3xt-lab/foxhound.git
synced 2026-12-06 09:08:37 +00:00
Frame generation counter: count only the generated frames
The frames DLSS frame generation reports as shown include each present's own frame (two a present at 2x). The counter added all of them to the rendered rate and showed about 71 for 24 rendered and 48 shown. It now takes the generated ones as the frames shown past one a present while generation is on, and reads 47 for 23 rendered. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@ -542,7 +542,11 @@ static CHECKING: AtomicBool = AtomicBool::new(false);
|
||||
/// Cumulative generated frames while a frame-generation feature is active.
|
||||
pub(crate) fn generated_frames() -> Option<u64> {
|
||||
if FG_ACTIVE.load(Acquire) && FG_READY.load(Acquire) && SWAP_CHAIN_PROXIED.load(Acquire) {
|
||||
Some(FG_SHOWN_ALL.load(Relaxed))
|
||||
// The frames it showed count each present's own frame too (two a present at 2x):
|
||||
// the generated ones are those past one a present with it on. (The counter adds
|
||||
// them to the rendered rate: with all shown frames it read 71 for 24 rendered and
|
||||
// 48 shown.)
|
||||
Some(FG_SHOWN_ALL.load(Relaxed).saturating_sub(FG_ON_ALL.load(Relaxed)))
|
||||
} else {
|
||||
fsr::generated_frames()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user