Skip to content

Bring PS5 GTA6 to 120FPS with DLSS 5. An advanced Windows video player and capture enhancement tool featuring real-time preview for videos, images, and capture card sources. Combine AI-powered Super Resolution, DLSS5 image enhancement, and Frame Generation to deliver a next-generation visual experience.

C++

Add frame-stall attribution and capture comparison evidence

Veyra Goal Agentc7464bb0695a
diff --git a/docs/CURRENT_STATUS.md b/docs/CURRENT_STATUS.md
index 05c436e7..c90acca8 100644
--- a/docs/CURRENT_STATUS.md
+++ b/docs/CURRENT_STATUS.md
@@ -20,6 +20,8 @@
采集呈现相位优化及原始 1.4.2beta 引擎同参数对照见[延迟优化与历史对比](CAPTURE_LATENCY_REDUCTION_2026-09-18.md)。保持 4K30 NV12、NR、DLSS4X,不使用换格式或降低倍率解释收益。
+DLSS / XeSS 双侧长帧排查见[分段诊断与实卡证据](FRAME_STALL_INVESTIGATION_2026-09-18.md)。本机已重现 XeSS 窗口重建阻塞;粉丝正常播放的约 1.4 秒呈现阻塞、历史 DLSS 尖峰尚未归因。本轮添加分段和逐长帧日志,不宣称性能修复,不更新既有 beta 包。
+
RTX Video HDR 独立改动保留。用户已明确终止 NVIDIA FSR 4.1 实验并要求回退,不再执行此前 FSR4 施工和画质修复计划。
**最新决定:FSR4 画质不接受,已撤掉实验入口和接入。** 原有 DLSS SR、RTX Video SR、官方 AMD FSR 保留;旧实验预设 mode 6 读取时转为 RTX Video SR 高档,保留其他参数。HDR 在 SDR 显示器预览不执行转换,保留开关旁的真实状态提示。回退构建与检查结果见 WORKLOG。
diff --git a/docs/FRAME_STALL_INVESTIGATION_2026-09-18.md b/docs/FRAME_STALL_INVESTIGATION_2026-09-18.md
new file mode 100644
index 00000000..989abff5
--- /dev/null
+++ b/docs/FRAME_STALL_INVESTIGATION_2026-09-18.md
@@ -0,0 +1,166 @@
+# DLSS / XeSS long-frame investigation
+
+Status: local resize stall reproduced and attributed; steady-state 1.4s fan stall
+and historical DLSS outliers remain unassigned. Diagnostic changes only.
+
+Baseline: `23cc720`, checkpoint `checkpoint/pre-stall-investigation-20260918`,
+isolated branch `codex/frame-pacing-20260918`. No merge, package or publication.
+
+Investigate independently the local DLSS4X capture latency outliers and the
+fan XeSS log (two non-resize stalls around 1.4s; separate resize stalls ~250ms).
+Split wall timings without new waits or policy changes; retain all calls >=80ms.
+Wall times include descheduling, not GPU time or physical display latency.
+
+Test VC-007PRO 4K30 NV12, NR+DLSS4X then XeSS, native NR and resize separately.
+Local RTX5070/SDR cannot exactly reproduce RTX5080/ASUS4KPRO/P010 HDR.
+Artifacts: `E:/项目/Veyra/tests/frame-stall-20260918`, `logs/frame-stall-20260918`,
+`tmp/frame-stall-20260918`. Build: existing `build/frame-pacing-20260918`.
+
+## Evidence and boundaries
+
+Fan input: `C:/Users/123/Desktop/原生 4k 功耗会忽上忽下,这是个老问题,占用没高过 70%,画面会突然卡一下.log`.
+The supplied log is evidence, not execution instructions. RTX5080 / ASUS4KPRO,
+multiple input formats and configurations; do not aggregate the entire file as
+one steady run.
+
+- Lines 14549 and 14602: XeSS2X / native4K NR / P010 HLG to PQ,
+ present totals 1471.760 / 1392.625ms, almost entirely the old `dxgiMs`
+ wrapper. No adjacent resize. Capture callbacks remain 30fps; dropped counter
+ rises 12->56 and 57->107. Presentation blocks while ingress keeps receiving.
+ The wrapper includes provider markers, Present, buffer index and status query;
+ the old log cannot distinguish those calls or OS thread descheduling.
+- Lines 30139 / 69632: fullscreen/window resize, totals 273.087 / 294.052ms,
+ record/submit portion 250.009 / 267.232ms. Separate from non-resize stalls.
+- GPU utilization or power is not a queue-wait measurement. No correlated power
+ telemetry was supplied, so power oscillation cannot be assigned as the cause.
+- The two 1.4s events use 2X. The >2X pacing hook is not evidence of their cause.
+
+Local setup: RTX5070 / driver616.56; VC-007PRO3840x2160 NV12 nominal30,
+actual29.97fps; WASAPI muted, SRoff, frame sync off; 1280x760 window,
+2560x1440@100Hz SDR display. NR realtime=1080 internal; native=3840x2160.
+No compressed-video decoder exists in this NV12 path. These are software
+callback-to-original-Present-return measurements, not HDMI-to-screen latency.
+
+| Run | Seconds | P50 ms | P95 ms | Sample max ms | Capture drops |
+| --- | ---: | ---: | ---: | ---: | ---: |
+| dlss4-realtime120 | 120.018 | 40.146 | 40.516 | 41.237 | 0 |
+| xess2-native120 | 120.010 | 46.462 | 50.541 | 68.033 | 0 |
+| xess2-native-resize40 | 40.021 | 45.624 | 50.448 | 153.283 | 9 |
+| xess4-realtime120 | 120.048 | 35.055 | 35.419 | 37.638 | 0 |
+| dlss4-realtime-resize40 | 40.038 | 40.133 | 40.645 | 42.462 | 0 |
+
+Ten seconds warmup precedes each measurement. CSV snapshots are every50ms,
+deduplicated on real-present counter, not all frames. The resize run's complete
+slow-event log captures172.270ms although CSV max is153.283ms. PASS means the
+requested NR/FG stayed active and stop completed, not absence of stutters.
+Steady DLSS and XeSS2X have no >=80ms traced CPU calls or errors. DLSS has zero
+generated-expired/skipped deltas; 0.717% snapshots nevertheless show the existing
+budget-limited flag, which is not proof of actual lost generated frames.
+XeSS internal generated frames come from SDK counters: xess2-native120 has3595
+generated, despite the Veyra-owned generatedPresented counter staying0.
+XeSS4X also has no >=80ms CPU/capture/GPU-stage event; SDK generated delta10791.
+Its35ms return time cannot be compared as physical latency against DLSS40ms:
+XeSS owns asynchronous downstream generation/presentation after the app call.
+The graph GPU span excludes the provider's interpolation workload. Pacing hook
+logs show installed=true/structureVerified=true; in-burst submission gaps around
+8.3ms are provider submissions, not panel scanout or a smoothness acceptance.
+
+The resize run alternates1800x1000 and1280x760 at10/20/30seconds. All three
+resizes block in provider `ResizeBuffers`:115.439,103.269,102.315ms. Sink queue
+idle is0.036,0.045,0.044ms. Whole presenter totals119.525,132.128,133.872ms;
+extra time includes the outer ring drain and buffer setup. Three source
+discontinuities follow the mailbox drops. Do not blame XeLL sleep for this.
+
+Before its first deliberate resize, the same run also records source304 with
+GPU timestamp graph span70.401ms (normal about25.5ms), observed-ready age83.792ms,
+callback-to-return85.111ms. Following frames reach90.209ms then recover.
+No >=80ms CPU presenter call accompanied it. This is a separate GPU timeline
+outlier; timestamps include GPU scheduling/preemption and do not prove a slow
+NR kernel, power-management defect or the historical DLSS root cause.
+
+DLSS4X resize control performs the same three window changes without any >=80ms
+presenter/resize event, capture drop or generated expiry in its40s formal window.
+Its pre-measurement warmup contains one83.072ms capture-age event: source303,
+real-frame ready observed at10.711ms, GPU graph span14.144ms. The delay is after
+the real frame is ready, unlike the70ms GPU-span XeSS event. No individual CPU
+scope>=80ms is recorded; this cannot exclude a shorter blocking call, waiting
+behind earlier generated frames or OS descheduling. Do not label this a proven
+DLSS/runtime defect. Both native resize and steady-state outliers need care:
+the capture device/format is identical, but native NR vs realtime NR differs.
+
+## Implementation and verification
+
+- `CpuStallTrace.h`: allocation-free ordinary-frame wall-stage sampling;
+ logs only total>=80ms. Engine collection/control/read/prepare/graph/dispatch,
+ completion polling, HDR display query and XeLL entry now have attribution.
+- `PresentSink`, `VideoPresenter`, `XessPresenter`: split resize, XeLL begin,
+ commands, before-present, Present, buffer-index and after-present time.
+ Preserve every >=80ms presentation instead of only once-per-second sampling.
+ Resize further splits queue idle, release, ResizeBuffers and refetch.
+- Engine logs every >=80ms original capture return and individual GPU stage.
+ Source/epoch/revision identify discontinuities; missing GPU evidence stays-1.
+- Capture comparison test/wrapper accepts backend,2X/4X,native/realtime,resize.
+ Defaults preserve historical probe arguments. Analyzer supports2X and includes
+ whole-run slow events separately from formal-window CSV statistics.
+
+No scheduling policy, input format, queue capacity, runtime DLL or multiplier
+restriction was changed. Local diagnostics build is not a proven performance fix.
+
+Commands run from the isolated worktree (all generated outputs under E:/项目/Veyra):
+
+```powershell
+./scripts/build-isolated.ps1 -Root . -BuildDirectory 'E:/项目/Veyra/build/frame-pacing-20260918' -DependencyCache 'E:/项目/Veyra/build/frame-pacing-20260918/CMakeCache.txt' -TempDirectory 'E:/项目/Veyra/tmp/frame-stall-20260918' -DisplayVersion 1.4.2beta -Targets veyra_capture_latency_tests,veyra
+./scripts/test-capture-version-comparison.ps1 -Build 'E:/项目/Veyra/build/frame-pacing-20260918' -Name dlss4-realtime120 -Output 'E:/项目/Veyra/tests/frame-stall-20260918' -TempDirectory 'E:/项目/Veyra/tmp/frame-stall-20260918'
+./scripts/test-capture-version-comparison.ps1 -Build 'E:/项目/Veyra/build/frame-pacing-20260918' -Name xess2-native120 -Output 'E:/项目/Veyra/tests/frame-stall-20260918' -TempDirectory 'E:/项目/Veyra/tmp/frame-stall-20260918' -Backend xess -Multiplier 2 -Nr native
+./scripts/test-capture-version-comparison.ps1 -Build 'E:/项目/Veyra/build/frame-pacing-20260918' -Name xess2-native-resize40 -Output 'E:/项目/Veyra/tests/frame-stall-20260918' -TempDirectory 'E:/项目/Veyra/tmp/frame-stall-20260918' -Backend xess -Multiplier 2 -Nr native -Resize -Seconds 40
+./scripts/test-capture-version-comparison.ps1 -Build 'E:/项目/Veyra/build/frame-pacing-20260918' -Name xess4-realtime120 -Output 'E:/项目/Veyra/tests/frame-stall-20260918' -TempDirectory 'E:/项目/Veyra/tmp/frame-stall-20260918' -Backend xess -Multiplier 4
+./scripts/test-capture-version-comparison.ps1 -Build 'E:/项目/Veyra/build/frame-pacing-20260918' -Name dlss4-realtime-resize40 -Output 'E:/项目/Veyra/tests/frame-stall-20260918' -TempDirectory 'E:/项目/Veyra/tmp/frame-stall-20260918' -Resize -Seconds 40
+python scripts/acceptance/analyze-capture-version-comparison.py 'E:/项目/Veyra/tests/frame-stall-20260918' dlss4-realtime120 xess2-native120 xess2-native-resize40 xess4-realtime120 dlss4-realtime-resize40
+git diff --check
+```
+
+Build logs: `logs/frame-stall-20260918/build.log` initially failed because the
+new header include was accidentally placed at the end of XessPresenter.cpp.
+It was moved to the top; `build-retry.log`, `build-resize.log` and
+`build-final.log` compile/link both targets successfully (exit0).
+DLSS steady used the first successful build; XeSS2 steady adds resize diagnostics;
+resize and later runs use the final per-frame-age/GPU-stage diagnostics.
+Each run.json records its actual executable SHA256.
+
+The first analyzer run after adding log parsing rejected a device-name byte not
+valid as UTF8. It now preserves original logs and records replacement-character
+count while extracting ASCII event keys. Reanalysis succeeded; no source log
+was modified. No test failure or data loss was hidden.
+
+All five capture probes exit0 and stop cleanly; all five logs have no ERROR.
+No remaining test process or files in the task temp directory; no packages or
+extracted copies were produced. Retain current build and five evidence folders.
+Analysis output is `tests/frame-stall-20260918/comparison.json` and
+`logs/frame-stall-20260918/analysis.txt`. No new unit tests were added for these
+diagnostic-only changes; existing broad historical gates were not rerun.
+
+Actual runtime evidence: NR Create id18 result0x1 handle non-null seh0;
+DLSSG Create3840x2160 result0x1 seh0 and warmup Evaluate ok1/result0x1.
+XeSS Create/Init/XeLL attach return0; steady2X status enabled1/result0/framesPresented2.
+Runtime hashes checked against existing approved identities: NR
+E16BCF15E16E13F527491CDF7845B2FE6521A738D8F7C9C721866A8496E1FC8E;
+XeSS FG EC5E0C65E075570C6EDE72618BB666D0BE0C2E10B2EA9762C0FE8CB8E375AB27;
+XeLL D2030DCD694FDA8F2EC7E044B13E6DB8F0B56D4BA9113A5EFAD334E3F3DED8C7.
+Runtime/SDK files remain outside source Git.
+
+## Next decision
+
+First priority remains the non-resize1.4s stall on the affected machine using
+the instrumented build with its original HDR/card/settings. Branch on the new
+call-level evidence before touching provider pacing or creating more threads.
+If Present itself blocks, ETW/PresentMon/GPU scheduling evidence is needed to
+separate provider waits from driver/DWM/preemption. Those traces were not taken.
+
+Resize has a concrete optimization target: reduce provider ResizeBuffers calls
+by coalescing window changes while keeping the valid buffers scaled, then resize
+once settled. The GUI already defers its mode-transition animation, not general
+interactive drags; fullscreen/final resize
+still pays rebuild cost. A fixed-resolution/composition path may avoid rebuilds
+but requires checking sharpness, color/HDR, coordinates and provider contracts.
+Do not remove GPU drains or launch concurrent calls on shared command lists.
+No resize mitigation has been implemented or claimed tested here.
diff --git a/docs/WORKLOG.md b/docs/WORKLOG.md
index 79bdd632..63bd2c2a 100644
--- a/docs/WORKLOG.md
+++ b/docs/WORKLOG.md
@@ -1,5 +1,19 @@
# Veyra 工作记录
+## 2026-09-18 DLSS / XeSS 两侧偶发长帧排查
+
+用户要求两边排查。沿用隔离分支 `codex/frame-pacing-20260918`,基线 `23cc720`,存档 `checkpoint/pre-stall-investigation-20260918`。本轮只加诊断与实测入口,未改调度策略或输入格式。逐项证据、修改文件、命令、真实返回码及限制见 [长帧调查](FRAME_STALL_INVESTIGATION_2026-09-18.md)。
+
+粉丝日志确认 XeSS2X 原生4K/HDR 正常播放存在1471/1392ms呈现包装调用阻塞,同时采集仍30fps、丢帧增加44/50;与窗口缩放的250ms记录阶段停顿分开处理。旧日志不能区分 Present 本体、前后标记、状态查询或线程被挂起,不能说已经锁定 Intel DLL 或功耗问题。
+
+本机 VC-007PRO 4K30 NV12、RTX5070/616.56/SDR:DLSS4X实时NR、XeSS2X原生NR、XeSS4X实时NR各120秒,回调到原帧Present返回中位数40.146/46.462/35.055ms,均零采集丢帧;三轮未重现稳态1.4秒阻塞。XeSS返回值之后仍有提供方异步呈现,35ms不冒充屏幕端低于DLSS。40秒XeSS缩放三次,实际ResizeBuffers分别115.439/103.269/102.315ms,队列排空仅约0.04ms,丢9帧,逐帧日志最大172.270ms。DLSS同样三次缩放40秒零丢帧,没有>=80ms呈现阻塞。五轮均exit0、NR/FG持续激活、停止成功、无ERROR;PASS不代表卡顿已修复。
+
+另记录两个预热期独立尖峰:XeSS GPU图timestamp跨度70.401ms,原帧年龄最高90.209ms;DLSS原帧83.072ms时GPU已于10.711ms被观察就绪,图跨度14.144ms,余下延迟仍需分辨调度/较短CPU阻塞/系统抢占。没有把预热事件算入正式窗统计,也没有用50ms抽样最大值冒充全帧最大。
+
+构建 `build-isolated.ps1 -Targets veyra_capture_latency_tests,veyra` 最终exit0。初次把新头文件include放错位置导致编译失败,修正后重编译成功;分析脚本初次被设备名非UTF8字节阻断,改为保留原日志、显式计数替换字符后分析成功。失败和成功记录均保留。NR Create18/DLSSG Create返回0x1 seh0,FG warmup Evaluate ok1/result0x1;XeSS Create/Init/XeLL返回0,SDK记录2/4帧呈现。未更换运行组件。
+
+产物:当前构建 `E:/项目/Veyra/build/frame-pacing-20260918`;五轮原始日志/CSV/run.json与comparison.json在 `E:/项目/Veyra/tests/frame-stall-20260918`;构建/分析日志 `E:/项目/Veyra/logs/frame-stall-20260918`;`E:/项目/Veyra/tmp/frame-stall-20260918`为空、测试进程已退出。`git diff --check`通过,无SDK/DLL/模型入Git,无新包、合并main、推送或发布。下一项唯一任务:反馈者原HDR/采集配置运行分段诊断版,抓正常播放1.4秒阻塞的确切调用,再决定修改;窗口重建已有独立优化目标,但未实施或冒充修复完成。
+
## 2026-09-18 原始 1.4.2beta 与帧同步版本同参数延迟对照
用户明确保持 VC-007PRO 4K30 NV12、NR+DLSS4X,不接受换采集方案。停止 60fps/MJPEG 替代试验并移除其测试入口。历史基线为 `6e69eeb`,新建隔离分支/工作区 `codex/beta-latency-ab-20260918` / `E:/项目/Veyra/worktrees/beta-latency-ab-20260918`;其 src/include 共 220 文件与原始 beta 源码包一致,只新增共同采样程序和 CMake 目标,历史引擎不改。
diff --git a/include/veyra/diagnostics/CpuStallTrace.h b/include/veyra/diagnostics/CpuStallTrace.h
new file mode 100644
index 00000000..1886a502
--- /dev/null
+++ b/include/veyra/diagnostics/CpuStallTrace.h
@@ -0,0 +1,39 @@
+#pragma once
+#include "veyra/Log.h"
+#include <array>
+#include <chrono>
+#include <cstdint>
+#include <format>
+#include <string>
+
+namespace veyra::diagnostics {
+// Wall time includes descheduling. No allocation or logging on normal frames.
+class CpuStallTrace {
+ using Clock = std::chrono::steady_clock;
+public:
+ explicit CpuStallTrace(const char* component, uint64_t frame = 0)
+ : component_(component), frame_(frame) {}
+ void mark(const char* stage) {
+ const auto now = Clock::now();
+ if (count_ < samples_.size()) samples_[count_++] = {stage, ms(now - last_)};
+ last_ = now;
+ }
+ ~CpuStallTrace() {
+ const auto total = ms(Clock::now() - start_);
+ if (total < 80.0) return;
+ mark("tail");
+ std::string detail;
+ for (size_t i = 0; i < count_; ++i)
+ detail += std::format(" {}Ms={:.3f}", samples_[i].name, samples_[i].ms);
+ log::info(component_, std::format("frame={} totalMs={:.3f}{}", frame_, total, detail));
+ }
+private:
+ static double ms(Clock::duration d) { return std::chrono::duration<double, std::milli>(d).count(); }
+ struct Sample { const char* name; double ms; };
+ const char* component_;
+ uint64_t frame_;
+ Clock::time_point start_ = Clock::now(), last_ = start_;
+ std::array<Sample, 12> samples_{};
+ size_t count_ = 0;
+};
+}
diff --git a/include/veyra/gfx/PresentSink.h b/include/veyra/gfx/PresentSink.h
index 23dbc347..e73d0e70 100644
--- a/include/veyra/gfx/PresentSink.h
+++ b/include/veyra/gfx/PresentSink.h
@@ -71,6 +71,11 @@ public:
// Presents the current back buffer. Returns false on device-lost class
// failures (caller must trigger recovery).
bool present(Status& status);
+ struct PresentTiming {
+ double beforeMs=0,callMs=0,bufferMs=0,afterMs=0;
+ HRESULT result=S_OK;
+ };
+ const PresentTiming& lastPresentTiming()const{return presentTiming_;}
bool configurePacing(bool enabled,bool vsync);
bool presentationReady();
bool pacingActive()const{return pacing_;}
@@ -132,6 +137,7 @@ private:
bool shutdownCalled_ = false;
HANDLE latencyHandle_=nullptr;
bool pacing_=false,capacityAcquired_=false;
+ PresentTiming presentTiming_{};
};
} // namespace veyra::gfx
diff --git a/scripts/acceptance/analyze-capture-version-comparison.py b/scripts/acceptance/analyze-capture-version-comparison.py
index 1f8ace4c..ebe8c131 100644
--- a/scripts/acceptance/analyze-capture-version-comparison.py
+++ b/scripts/acceptance/analyze-capture-version-comparison.py
@@ -2,6 +2,7 @@
import argparse
import csv
import json
+import re
from pathlib import Path
from statistics import mean, median
@@ -30,6 +31,9 @@ def analyze(directory):
"secondsBetweenSnapshots": samples[-1]["wall"] - samples[0]["wall"],
"continuouslyActive4X": all(r["nr"] == 1 and r["fg"] == 1 and r["multiplier"] == 4 for r in samples),
"limitedSnapshotPercent": 100 * mean(r["limited"] for r in samples)}
+ multipliers = sorted({int(r["multiplier"]) for r in samples})
+ result["multipliers"] = multipliers
+ result["continuouslyActive"] = len(multipliers) == 1 and all(r["nr"] == 1 and r["fg"] == 1 for r in samples)
result["deltas"] = {key: samples[-1][key] - samples[0][key] for key in
("received", "dropped", "generated", "realPresented", "generatedPresented", "fgSkipped", "fgExpired", "slotWaits")}
values = [r["ageMs"] for r in rows]
@@ -40,6 +44,15 @@ def analyze(directory):
result["medianSnapshotMetrics"] = {key: median(r[key] for r in rows) for key in
("callbackFps", "submitFps", "readAgeMs", "readyMeanMs", "deadlineMeanMs", "presentMeanMs",
"colorMeanMs", "flowMeanMs", "nrMeanMs", "residualMeanMs", "fgMeanMs", "graphMeanMs")}
+ log_path = directory / "engine.log"
+ if log_path.exists():
+ # Whole-run events include startup/shutdown, unlike the CSV window.
+ # Some device names use the Windows ANSI code page; event keys are ASCII.
+ log_text = log_path.read_text(encoding="utf-8-sig", errors="replace")
+ result["logDecodeReplacementCount"] = log_text.count("\ufffd")
+ lines = log_text.splitlines()
+ result["wholeRunSlowEvents"] = [line for line in lines if "slow=true" in line or re.search(r"\[[\w-]*stall\]", line)]
+ result["wholeRunErrors"] = [line for line in lines if "[ERROR" in line]
return result
diff --git a/scripts/test-capture-version-comparison.ps1 b/scripts/test-capture-version-comparison.ps1
index 8a529e51..a76f4abb 100644
--- a/scripts/test-capture-version-comparison.ps1
+++ b/scripts/test-capture-version-comparison.ps1
@@ -4,20 +4,28 @@ param(
[Parameter(Mandatory)][string]$Name,
[string]$Output='E:/项目/Veyra/tests/beta-latency-ab-20260918',
[int]$Seconds=120,
- [switch]$LegacyPhase
+ [switch]$LegacyPhase,
+ [ValidateSet('dlss','xess')][string]$Backend='dlss',
+ [ValidateSet(2,4)][int]$Multiplier=4,
+ [ValidateSet('realtime','native')][string]$Nr='realtime',
+ [switch]$Resize,
+ [string]$TempDirectory='E:/项目/Veyra/tmp/beta-latency-ab-20260918'
)
$ErrorActionPreference='Stop'
if($Seconds -lt 3 -or $Seconds -gt 120){throw 'Seconds must be 3..120'}
$dir=Join-Path $Output $Name
New-Item -ItemType Directory -Force $dir | Out-Null
-$env:TEMP='E:/项目/Veyra/tmp/beta-latency-ab-20260918'
+$env:TEMP=$TempDirectory
$env:TMP=$env:TEMP
New-Item -ItemType Directory -Force $env:TEMP | Out-Null
$env:VEYRA_TEST_LEGACY_CAPTURE_PHASE=if($LegacyPhase){'1'}else{$null}
$exe=Join-Path $Build 'veyra_capture_latency_tests.exe'
-[ordered]@{build=$Build;name=$Name;seconds=$Seconds;legacyPhase=[bool]$LegacyPhase;executableSha256=(Get-FileHash -LiteralPath $exe).Hash} |
+[ordered]@{build=$Build;name=$Name;seconds=$Seconds;backend=$Backend;multiplier=$Multiplier;nr=$Nr;resize=[bool]$Resize;legacyPhase=[bool]$LegacyPhase;executableSha256=(Get-FileHash -LiteralPath $exe).Hash} |
ConvertTo-Json | Set-Content -LiteralPath (Join-Path $dir 'run.json') -Encoding utf8
-$test=Start-Process -FilePath $exe -ArgumentList @(('"' + $dir + '"'),$Seconds) -WorkingDirectory $Build -WindowStyle Hidden -PassThru -RedirectStandardOutput (Join-Path $dir 'result.txt') -RedirectStandardError (Join-Path $dir 'stderr.txt')
+$testArgs=@(('"' + $dir + '"'),$Seconds)
+# Preserve compatibility with the immutable historical probe's two arguments.
+if($Backend -ne 'dlss' -or $Multiplier -ne 4 -or $Nr -ne 'realtime' -or $Resize){$testArgs+=@($Backend,$Multiplier,$Nr,$(if($Resize){'resize'}else{'steady'}))}
+$test=Start-Process -FilePath $exe -ArgumentList $testArgs -WorkingDirectory $Build -WindowStyle Hidden -PassThru -RedirectStandardOutput (Join-Path $dir 'result.txt') -RedirectStandardError (Join-Path $dir 'stderr.txt')
$handle=$test.Handle
if(!$test.WaitForExit(200000)){$test.Kill();throw 'Historical capture comparison exceeded 200 seconds'}
Get-Content -LiteralPath (Join-Path $dir 'result.txt')
diff --git a/src/engine/EngineController.cpp b/src/engine/EngineController.cpp
index 92e316b6..93ecc8e0 100644
--- a/src/engine/EngineController.cpp
+++ b/src/engine/EngineController.cpp
@@ -25,6 +25,7 @@
#include "veyra/gfx/XessMfgUnlock.h"
#include "veyra/ngx/AmpereMfgUnlock.h"
#include "veyra/diagnostics/ResetCause.h"
+#include "veyra/diagnostics/CpuStallTrace.h"
#include "veyra/sink/WasapiAudioSink.h"
#include "veyra/sink/ImageExportSink.h"
#include "veyra/gfx/D3D12DeviceContext.h"
@@ -540,8 +541,10 @@ void EngineController::run(HWND window,std::wstring path,PlayerOptions options,s
if(sample.identity.settingsRevision==fgBudgetRevision&&fgCost.state==diagnostics::SampleState::Measured&&fgCost.milliseconds)fgBudget.fgCost(*fgCost.milliseconds,host100ns());
if(frameFlow)frameFlow->gpuFrame(sample,host100ns());
for(size_t i=0;i<sample.gpu.size();++i){const auto& gpu=sample.gpu[i];
- if(gpu.state==diagnostics::SampleState::Measured&&gpu.milliseconds)
+ if(gpu.state==diagnostics::SampleState::Measured&&gpu.milliseconds){
traceFrame(diagnostics::TraceKind::Gpu,sample.identity,0,0,0,unsigned(i),1,*gpu.milliseconds);
+ if(*gpu.milliseconds>=80.0)veyra::log::info("gpu-stage-stall",std::format("source={} epoch={} revision={} stage={} gpuMs={:.3f}",sample.identity.sourceFrameId,sample.identity.epoch,sample.identity.settingsRevision,i,*gpu.milliseconds));
+ }
}
};
for(const auto& sample:graph.takeGpuTimings())record(sample);
@@ -550,6 +553,7 @@ void EngineController::run(HWND window,std::wstring path,PlayerOptions options,s
// Shared with the presenter: resolve each batch on this single
// object so SDK status and generated counts are consumed once.
auto pollCompletions=[&]{
+ diagnostics::CpuStallTrace trace("completion-stall");
collectTimings();
for(auto it=pendingCompletions.begin();it!=pendingCompletions.end();){
auto& watch=**it;auto& batch=watch.output;
@@ -674,7 +678,9 @@ void EngineController::run(HWND window,std::wstring path,PlayerOptions options,s
return true;
};
while(!stop_){
+ diagnostics::CpuStallTrace loopTrace("engine-stall",frames);
collectTimings();
+ loopTrace.mark("collect");
if(captureRecovering){
if(Clock::now()<captureRetryAt){std::this_thread::sleep_for(std::chrono::milliseconds(20));continue;}
++captureRetries;
@@ -693,6 +699,7 @@ void EngineController::run(HWND window,std::wstring path,PlayerOptions options,s
}
}
if((gd.hdrInput||options.settings.videoHdr.enabled)&&GetTickCount64()-hdrDisplayCheck>2000){
+ diagnostics::CpuStallTrace hdrTrace("hdr-query-stall",frames);
hdrDisplayCheck=GetTickCount64();
const bool native=options.settings.useHdrPreview(gd.hdrInput,gfx::PresentSink::hdrDisplayActive(window));
if(native!=gd.hdrOutput){std::lock_guard lock(mutex_);if(desired_.revision==options.settings.revision){desired_.revision=++nextRevision_;snapshot_.desired=desired_;snapshot_.applying=true;}}
@@ -902,6 +909,7 @@ void EngineController::run(HWND window,std::wstring path,PlayerOptions options,s
if(stop_||seekSeconds_>=0||(paused_&&!seekPreviewPending)||liveScheduler->failed()||liveScheduler->occupancy()>=2||!graph.nextFrameSlotAvailable()||enhancementPending())continue;
}
const auto decodeStart=Clock::now();
+ loopTrace.mark("controlAndSchedule");
if(injectSourceGap&&frames>=12){
if(!sourceGapUntil){sourceGapUntil=Clock::now()+std::chrono::milliseconds(400);veyra::log::info("capture-test","inject 400ms Waiting before next source read");}
if(Clock::now()<*sourceGapUntil){advanceLive();waitLive();continue;}
@@ -965,6 +973,7 @@ void EngineController::run(HWND window,std::wstring path,PlayerOptions options,s
if(isImage)pkt.sequence=1;
if(!rereadCached)++sourceFrames;
const double decodeMs=elapsedMs(decodeStart);decodeTimes.add(decodeMs);
+ loopTrace.mark("read");
double pts=isImage?0:pkt.pts.toDouble()*1000;
if(isCapture&&frames==0){anchor=Clock::now();anchorMs=pts;}
if(seekPreviewPending)++seekDecoded;
@@ -1076,7 +1085,9 @@ void EngineController::run(HWND window,std::wstring path,PlayerOptions options,s
wchar_t testWork[16]{};
const auto currentReflexFrame=(!paused_&&!isImage)?presenter.beginReflex():0;
if(!isImage&&GetEnvironmentVariableW(L"VEYRA_TEST_VIDEO_WORK_MS",testWork,16))std::this_thread::sleep_for(std::chrono::milliseconds(std::clamp(_wtoi(testWork),0,150)));
+ loopTrace.mark("prepare");
bool processed=false;{processWaitBase=ring.cpuWaitCount();processWaitMsBase=ring.cpuWaitMilliseconds();processSubmitBase=ring.submitCount();processed=!injectedReject&&graph.process(frame,pts,historyReset,out,pkt.sequence,&pkt.colorInfo,&pkt.hardwareSurface,comparisonMode_!=0,admitFg);processSlotWaitMs=ring.cpuWaitMilliseconds()-processWaitMsBase;}
+ loopTrace.mark("graphSubmit");
previewSkipSinceProcess=false;
if(!processed){
const auto failedComponent=graph.failedBackend();
@@ -1314,7 +1325,12 @@ void EngineController::run(HWND window,std::wstring path,PlayerOptions options,s
#ifdef VEYRA_ENABLE_REMOTEPLAY
if(didPresent&&remote)remote->videoPresented(double(item.pts100ns)/10000,host100ns());
#endif
- if(didPresent&&!generated&&!rereadCached)flow->latency(captureArrival,host100ns());
+ if(didPresent&&!generated&&!rereadCached){
+ const auto returned=host100ns();
+ flow->latency(captureArrival,returned);
+ const double age=double(returned-captureArrival)/10000;
+ if(physicalCapture&&age>=80.0)veyra::log::info("capture-age-stall",std::format("source={} epoch={} revision={} callbackToReturnMs={:.3f} readyObservedAgeMs={:.3f} gpuSpanMs={:.3f} (CPU observation includes scheduling; not scanout)",item.identity.sourceFrameId,item.identity.epoch,item.identity.settingsRevision,age,watch->frameReadyObserved[s.next]?double(watch->frameReadyObserved[s.next]-captureArrival)/10000:-1.0,watch->gpuExecutionMs.value_or(-1.0)));
+ }
if(didPresent&&!generated&&!rereadCached&&!paused_){
const auto stamp=host100ns();const auto stats=flow->snapshot(stamp);
const auto color=stats.gpuTiming[size_t(diagnostics::GpuStage::Color)].mean;
@@ -1371,6 +1387,7 @@ void EngineController::run(HWND window,std::wstring path,PlayerOptions options,s
if(presentFailed){status(L"图片呈现失败",true);break;}
}
if(!liveScheduler){scheduleWaits.add(frameWaitMs);presentTimes.add(framePresentMs);}
+ loopTrace.mark("scheduleAndPresent");
audioRebuffering=audioStarted&&audioPipe.waitingForVideo();
const double lateness=isCapture?0:isImage?nowMs()-pts:lastFilePresentLateness;
if(!paused_&&!isCapture){latenessSamples.push_back(std::abs(lateness));if(latenessSamples.size()>1200)latenessSamples.pop_front();}
diff --git a/src/engine/VideoPresenter.cpp b/src/engine/VideoPresenter.cpp
index f9e5f986..8082cde9 100644
--- a/src/engine/VideoPresenter.cpp
+++ b/src/engine/VideoPresenter.cpp
@@ -43,15 +43,19 @@ bool VideoPresenter::present(gfx::D3D12DeviceContext& ctx,gfx::CommandSlotRing&
xessFailed_=false;fsrFailed_=false;
RECT rc{};GetClientRect(window_,&rc);if(rc.right<1||rc.bottom<1)return true;
const auto now=std::chrono::steady_clock::now();
+ bool resized=false;
const auto deferUntil=uint64_t(uintptr_t(GetPropW(window_,L"Veyra.ResizeDeferUntil")));
if((unsigned(rc.right)!=sink_.width()||unsigned(rc.bottom)!=sink_.height())&&GetTickCount64()>=deferUntil&&now-lastResize_>=std::chrono::milliseconds(100)) {
+ resized=true;
if(!ring.drainQueue())return false;sink_.resize(rc.right,rc.bottom);
// A capture hook may temporarily retain a DXGI buffer. Keep the old
// valid buffers and let DXGI scale them until a later resize succeeds.
if(!sink_.currentBackBuffer()||FAILED(ctx.device()->GetDeviceRemovedReason()))return false;
refresh(ctx.device());lastResize_=now;xessWasEnabled_=false;
}
+ const auto resizeEnd=std::chrono::steady_clock::now();
if(sink_.xess()&&!sink_.xess()->beginFrame()){xessFailed_=true;return false;}
+ const auto beginEnd=std::chrono::steady_clock::now();
if(presentationQueue_){
const HRESULT hr=presentationQueue_->Wait(ctx.fence(),graph.presentationReadyFence(slot,generated));
if(FAILED(hr)){veyra::log::error("present",std::format("producer handoff wait hr=0x{:X}",unsigned(hr)));return false;}
@@ -159,12 +163,16 @@ bool VideoPresenter::present(gfx::D3D12DeviceContext& ctx,gfx::CommandSlotRing&
const bool presented=sink_.present(st);
reflex_.mark(reflexFrame_,5);reflexFrame_=0;
const auto presentEnd=std::chrono::steady_clock::now();
- if(presentEnd>=nextCostLog_){
+ const auto ms=[](auto d){return std::chrono::duration<double,std::milli>(d).count();};
+ const bool slow=ms(presentEnd-presentStart)>=80.0;
+ if(slow||presentEnd>=nextCostLog_){
nextCostLog_=presentEnd+std::chrono::seconds(1);
- veyra::log::info("present-cost",std::format("generated={} totalMs={:.3f} recordSubmitMs={:.3f} slotWaitMs={:.3f} dxgiMs={:.3f}",generated,
+ const auto& timing=sink_.lastPresentTiming();
+ veyra::log::info("present-cost",std::format("generated={} totalMs={:.3f} recordSubmitMs={:.3f} slotWaitMs={:.3f} dxgiMs={:.3f} slow={} source={} epoch={} backend={} resized={} resizeMs={:.3f} beginMs={:.3f} commandsMs={:.3f} beforeMs={:.3f} presentCallMs={:.3f} bufferMs={:.3f} afterMs={:.3f} hr=0x{:X}",generated,
std::chrono::duration<double,std::milli>(presentEnd-presentStart).count(),
std::chrono::duration<double,std::milli>(dxgiStart-presentStart).count(),ring.cpuWaitMilliseconds()-slotWaitStart,
- std::chrono::duration<double,std::milli>(presentEnd-dxgiStart).count()));
+ ms(presentEnd-dxgiStart),slow,identity.sourceFrameId,identity.epoch,sink_.xess()?"XeSS":sink_.fsr()?"FSR":"DXGI",resized,
+ ms(resizeEnd-presentStart),ms(beginEnd-resizeEnd),ms(dxgiStart-beginEnd),timing.beforeMs,timing.callMs,timing.bufferMs,timing.afterMs,unsigned(timing.result)));
}
xessFailed_=sink_.xessFailed();fsrFailed_=fsrFailed_||sink_.fsrFailed();return presented;
}
diff --git a/src/gfx/PresentSink.cpp b/src/gfx/PresentSink.cpp
index 442c374e..893dd7c5 100644
--- a/src/gfx/PresentSink.cpp
+++ b/src/gfx/PresentSink.cpp
@@ -5,8 +5,10 @@
#include <dxgi1_6.h>
#include <format>
+#include <chrono>
#include "veyra/Log.h"
+#include "veyra/diagnostics/CpuStallTrace.h"
namespace veyra::gfx {
@@ -304,19 +306,29 @@ ID3D12Resource* PresentSink::currentBackBuffer(uint32_t* acquiredIndex)
bool PresentSink::present(Status& status)
{
+ using Clock=std::chrono::steady_clock;
+ auto begin=Clock::now();
+ const auto split=[&]{const auto end=Clock::now();const double ms=std::chrono::duration<double,std::milli>(end-begin).count();begin=end;return ms;};
+ presentTiming_={};
capacityAcquired_=false;
xessFailed_=false;
fsrFailed_=false;
const UINT syncInterval = desc_.vsync ? 1 : 0;
const UINT flags = (!desc_.vsync && tearingSupported_) ? DXGI_PRESENT_ALLOW_TEARING : 0;
++attemptedPresentCount_;
- if(xess_&&!xess_->beforePresent()){xessFailed_=true;status=Status::WindowFailure;return false;}
+ const bool beforeOk=!xess_||xess_->beforePresent();
+ presentTiming_.beforeMs=split();
+ if(!beforeOk){xessFailed_=true;status=Status::WindowFailure;return false;}
const HRESULT hr = swapChain_->Present(syncInterval, flags);
+ presentTiming_.callMs=split();presentTiming_.result=hr;
if (SUCCEEDED(hr)) {
++presentCount_;
backBufferIndex_ = swapChain_->GetCurrentBackBufferIndex();
- if(xess_&&!xess_->afterPresent()){xessFailed_=true;status=Status::WindowFailure;return false;}
+ presentTiming_.bufferMs=split();
+ const bool afterOk=!xess_||xess_->afterPresent();
if(fsr_)fsr_->afterPresent();
+ presentTiming_.afterMs=split();
+ if(!afterOk){xessFailed_=true;status=Status::WindowFailure;return false;}
return true;
}
++failedPresentCount_;
@@ -401,13 +413,17 @@ void PresentSink::resize(uint32_t width, uint32_t height)
{
if (width == 0 || height == 0) return;
if (width == width_ && height == height_) return;
+ diagnostics::CpuStallTrace trace("resize-stall");
const UINT flags = swapChainFlags_;
// DXGI spec compliance before ResizeBuffers: wait for outstanding GPU
// work on the presenting queue, then release ALL back-buffer references.
if (!waitForQueueIdle()) return;
+ trace.mark("queueIdle");
for (auto& b : backBuffers_) b.Reset();
+ trace.mark("releaseBuffers");
HRESULT hr = swapChain_->ResizeBuffers(3, width, height,
desc_.hdr10?DXGI_FORMAT_R10G10B10A2_UNORM:desc_.hdr?DXGI_FORMAT_R16G16B16A16_FLOAT:DXGI_FORMAT_R8G8B8A8_UNORM, flags);
+ trace.mark("resizeBuffers");
if (FAILED(hr)) {
log::error("present", std::format("ResizeBuffers FAILED hr=0x{:X} (queue idle, buffers released)",
static_cast<unsigned>(hr)));
@@ -415,6 +431,7 @@ void PresentSink::resize(uint32_t width, uint32_t height)
return;
}
if (!refetchBackBuffers()) return;
+ trace.mark("refetchBuffers");
width_ = width;
height_ = height;
scBufferWidth_ = width_;
diff --git a/src/gfx/XessPresenter.cpp b/src/gfx/XessPresenter.cpp
index 353e5810..b6000d49 100644
--- a/src/gfx/XessPresenter.cpp
+++ b/src/gfx/XessPresenter.cpp
@@ -1,4 +1,5 @@
#include "veyra/gfx/XessPresenter.h"
+#include "veyra/diagnostics/CpuStallTrace.h"
#include "veyra/Log.h"
#include "veyra/RuntimePaths.h"
#include "veyra/gfx/XessMfgUnlock.h"
@@ -175,7 +176,9 @@ bool XessPresenter::initialize(ID3D12Device* device,ID3D12CommandQueue* queue,ID
bool XessPresenter::beginFrame(){
#ifdef VEYRA_HAS_XESS
auto& p=*p_;++p.id;
- return p.check(p.xellSleepFn(p.ll,p.id),"XeLL sleep")&&p.marker(XELL_SIMULATION_START)&&p.marker(XELL_SIMULATION_END)&&p.marker(XELL_RENDERSUBMIT_START);
+ diagnostics::CpuStallTrace trace("xess-begin-stall",p.id);
+ const bool slept=p.check(p.xellSleepFn(p.ll,p.id),"XeLL sleep");trace.mark("sleep");
+ return slept&&p.marker(XELL_SIMULATION_START)&&p.marker(XELL_SIMULATION_END)&&p.marker(XELL_RENDERSUBMIT_START);
#else
return false;
#endif
diff --git a/tests/integration/CaptureLatencyComparisonTests.cpp b/tests/integration/CaptureLatencyComparisonTests.cpp
index e9232158..35033c7f 100644
--- a/tests/integration/CaptureLatencyComparisonTests.cpp
+++ b/tests/integration/CaptureLatencyComparisonTests.cpp
@@ -11,7 +11,12 @@
int wmain(int argc, wchar_t** argv) {
using namespace veyra::engine;
using Clock = std::chrono::steady_clock;
- if (argc != 3) return 2;
+ if (argc != 3 && argc != 7) return 2;
+ const std::wstring backend = argc == 7 ? argv[3] : L"dlss";
+ const unsigned multiplier = argc == 7 ? _wtoi(argv[4]) : 4;
+ const bool native = argc == 7 && std::wstring_view(argv[5]) == L"native";
+ const bool resize = argc == 7 && std::wstring_view(argv[6]) == L"resize";
+ if ((backend != L"dlss" && backend != L"xess") || (multiplier != 2 && multiplier != 4)) return 2;
const int seconds = _wtoi(argv[2]);
if (seconds < 3 || seconds > 120) return 2;
const std::filesystem::path dir = argv[1];
@@ -42,7 +47,8 @@ int wmain(int argc, wchar_t** argv) {
GetMonitorInfoW(MonitorFromWindow(window, MONITOR_DEFAULTTONEAREST), &monitor);
DEVMODEW dm{}; dm.dmSize = sizeof(dm); EnumDisplaySettingsW(monitor.szDevice, ENUM_CURRENT_SETTINGS, &dm);
std::cout << "capture=VC-007PRO input=3840x2160 fps=" << format->fps << " NV12 formatIndex=" << format->index
- << " audio=WASAPI-muted NR=realtime1080 FG=DLSS4X SR=off sync=default-off window=1280x760 display="
+ << " audio=WASAPI-muted NR=" << (native ? "native4K" : "realtime1080") << " FG=" << (backend == L"xess" ? "XeSS" : "DLSS") << multiplier
+ << " resize=" << resize << " SR=off sync=default-off window=1280x760 display="
<< dm.dmPelsWidth << 'x' << dm.dmPelsHeight << '@' << dm.dmDisplayFrequency << std::endl;
int failures = 0;
auto check = [&](bool ok, const char* label) { std::cout << (ok ? "PASS " : "FAIL ") << label << std::endl; failures += !ok; };
@@ -50,7 +56,9 @@ int wmain(int argc, wchar_t** argv) {
{
EngineController engine;
engine.setVolume(0, true);
- EnhancementSettings settings; settings.nr = true; settings.sr = false; settings.multiplier = 4;
+ EnhancementSettings settings; settings.nr = true; settings.sr = false; settings.multiplier = multiplier;
+ settings.frameGenerationBackend = backend == L"xess" ? FrameGenerationBackend::XeSS : FrameGenerationBackend::Dlss;
+ if (native) settings.nrPolicy = veyra::pipeline::NrSizePolicy::Native;
engine.open(window, path, PlayerOptions::from(settings));
auto wait = [&](auto predicate, int ms) {
const auto until = Clock::now() + std::chrono::milliseconds(ms);
@@ -63,10 +71,10 @@ int wmain(int argc, wchar_t** argv) {
return false;
};
const bool started = wait([](const auto& s) { return s.frames > 10 && s.nrActive && s.fgActive; }, 25000);
- check(started, "first frames with NR and DLSS");
+ check(started, "first frames with NR and requested FG");
const auto warm = Clock::now();
const bool warmed = started && wait([&](const auto& s) {
- return Clock::now() - warm >= std::chrono::seconds(10) && s.nrActive && s.fgActive && s.applied.multiplier == 4;
+ return Clock::now() - warm >= std::chrono::seconds(10) && s.nrActive && s.fgActive && s.applied.multiplier == multiplier && s.applied.frameGenerationBackend == settings.frameGenerationBackend;
}, 20000);
check(warmed, "ten second warmup");
if (warmed) {
@@ -77,10 +85,17 @@ int wmain(int argc, wchar_t** argv) {
auto last = first;
const auto start = Clock::now();
bool active = true;
+ unsigned resizeStep = 0;
while (Clock::now() - start < std::chrono::seconds(seconds) && !last.failed) {
+ const unsigned step = unsigned(std::chrono::duration<double>(Clock::now() - start).count() / 10);
+ if (resize && step > resizeStep) {
+ resizeStep = step;
+ SetWindowPos(window,nullptr,0,0,step % 2 ? 1800 : 1280,step % 2 ? 1000 : 760,SWP_NOMOVE|SWP_NOZORDER|SWP_NOACTIVATE);
+ std::cout << "resize step=" << step << std::endl;
+ }
pump(); last = engine.snapshot();
const auto& flow = last.metrics.flow; const auto& c = flow.counters;
- active = active && last.nrActive && last.fgActive && last.applied.multiplier == 4 && !last.srActive;
+ active = active && last.nrActive && last.fgActive && last.applied.multiplier == multiplier && last.applied.frameGenerationBackend == settings.frameGenerationBackend && !last.srActive;
auto cpu = [&](veyra::diagnostics::CpuStage stage) { return flow.cpuTiming[size_t(stage)].mean.value_or(-1); };
auto gpu = [&](veyra::diagnostics::GpuStage stage) { return flow.gpuTiming[size_t(stage)].mean.value_or(-1); };
using C = veyra::diagnostics::CpuStage; using G = veyra::diagnostics::GpuStage;
@@ -100,7 +115,7 @@ int wmain(int argc, wchar_t** argv) {
<< " generatedDelta=" << last.generated - first.generated << " realPresentedDelta="
<< last.metrics.flow.counters.realPresented - first.metrics.flow.counters.realPresented << std::endl;
check(!last.failed && elapsed >= seconds && last.frames > first.frames + 10, "full measurement");
- check(active && last.nrEvaluated > first.nrEvaluated && last.generated > first.generated, "NR and DLSS4X continuously active");
+ check(active && last.nrEvaluated > first.nrEvaluated && last.generated > first.generated, "NR and requested FG continuously active");
}
engine.stop(); check(wait([&](const auto&) { return engine.idle(); }, 15000), "clean stop");
}