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++
fix: pace live UI statistics and restore usable AMD frame generation
Veyra Goal Agent4c917aa00419
diff --git a/docs/CURRENT_STATUS.md b/docs/CURRENT_STATUS.mdindex 2df3f321..f96194ed 100644--- a/docs/CURRENT_STATUS.md+++ b/docs/CURRENT_STATUS.md@@ -2,7 +2,11 @@## 2026-10-07 2.0.4-fix2 本地修复候选-隔离分支 codex/stability-export-priority-20261006 修复跨厂商 FG 入口/导出、AMD NR 视频内部1080p与原尺寸输出,Auto 明确显示同步。真实 FSR/H264/HEVC、列表预设重启、12组呈现合同、GPU像素/复用和冷启动通过;候选 EXE 21e8e89c37d36f2cc43e7c619382185459ba36f76edefd602666050d6a20285b。普通GPU档 NR约6.93ms/60fps,对照2.0.3约6.47ms,仍有约7%性能疑点,未宣称根因已解决。真实AMD离线推理/编码与用户显示撕裂待复测。完整事实与失败见 [本轮报告](STABILITY_EXPORT_PRIORITY_REPORT_2026-10-06.md),本地交付在E:/项目/Veyra/test-packages/stability-export-priority-20261006;ZIP完成以DELIVERY.json为准。未合入main/推送/公开发布,25其他工作树与既有发布文件不变。以下为历史状态。+隔离分支 codex/stability-export-priority-20261006 修复跨厂商 FG 入口/导出、AMD NR 视频内部1080p与原尺寸输出、Auto 显示同步及 AMD 旧 DLSS 选择迁移到可用 FSR(可用手动 XeSS 保留)。最终 EXE 65fc23e33598d7efd77ea50ba8062a89beaacb29eb14369ffc78d03563312626;真实 FSR/H264/HEVC、预设重启、12组呈现合同、GPU像素/复用及新增 GUI 生命周期通过。++已核实 2.0.3 默认 GPU 优先级为普通(原进程135次只读查询 class2,源码无 setter)。此前约7%差距已定位到持续统计动画争用GPU,修复为有界更新,保留交互动效/数值/NR工作;同普通档、原版单层1080p NR,用户 GTA VI 4K30 相邻旧/新6.558881/6.559476ms(+0.009%),原 M2 4K60 为6.632515/6.590205ms(−0.638%)。同EXE反向恢复旧统计动画再次退化,详 [本轮报告](STABILITY_EXPORT_PRIORITY_REPORT_2026-10-06.md)。此结论限本机匹配设置,不代表全硬件/物理延迟/长期稳定性。++真实AMD离线推理/编码与用户显示撕裂待复测。本地交付在E:/项目/Veyra/test-packages/stability-export-priority-20261006;ZIP以DELIVERY.json、最终新解压启动以logs/.../cold-final-zip.json为准。未合入main/推送/公开发布,25其他工作树与既有发布文件不变。以下为历史状态。## 2026-10-06 PR19/PR20 适配验收diff --git a/docs/STABILITY_EXPORT_PRIORITY_PLAN_2026-10-06.md b/docs/STABILITY_EXPORT_PRIORITY_PLAN_2026-10-06.mdindex 2327b603..c1034a2e 100644--- a/docs/STABILITY_EXPORT_PRIORITY_PLAN_2026-10-06.md+++ b/docs/STABILITY_EXPORT_PRIORITY_PLAN_2026-10-06.md@@ -13,7 +13,13 @@## 验证和交付+2026-10-07 用户追加:AMD 默认补帧优先 FSR,可手动 XeSS,旧不可用 DLSS 会话一并迁移;随后必须先解决约 7% 性能差再打包。当前只保留内部构建/staging,禁止将未收敛性能的候选交付用户。继续以普通 GPU 档、同素材/运行库/分辨率/功能开关串行 A/B,分别核对逐帧 GPU 时间戳、UI GPU 负载、调度与统计。不得调高默认优先级或删除功能来消除差距;明确根因并完成针对性修复/反证后才封包。+- 每项问题先保留复现证据,再做最小闭环修复;源码可构建、相关契约测试、真实导出和真实播放通过。每次测试进程 ≤300 秒,构建 ≤900 秒,不并行争抢 GPU。- 输出统一位于 `E:/项目/Veyra/{archives,build,tests,logs,tmp,test-packages}/stability-export-priority-20261006`,子进程 TEMP/TMP 单独定向。无运行库/SDK/模型入 Git、无二进制修改。- 真实 AMD HIP 推理及实际显示扫描无可用本机证据时单独列明;不得用 RTX 或模拟 AMD 身份测试代替实卡通过。- 交付可测本地修复包及 WORKLOG/报告;现有 HDR、OBS 重绘、NR 画面调控与 PR19/20 适配保持。公开发布、群消息、关机不属于本次新指令。++## 2026-10-07 性能闭环执行++先核对 v2.0.3 原源码及原 EXE 的 D3DKMT 只读查询:默认 Normal/class2,并非 High。使用用户 GTA VI 4K30/内部1080 NR及 M2 4K60,普通档串行匹配。问题主要为持续统计动画在本机320Hz下重绘并争抢NR;最终只改共享QML统计插值和像素精度,不改NR/视频帧率/队列/驱动,也不改GPU默认档来遮盖差距。新旧相邻GTA约6.559/6.559ms、M2约6.590/6.633ms,同EXE仅恢复旧统计动画GTA回到6.964ms。相关失败、逐轮收据和硬件边界见本轮报告;性能门槛满足后制作本地完整包,不扩大公开发布权限。diff --git a/docs/STABILITY_EXPORT_PRIORITY_REPORT_2026-10-06.md b/docs/STABILITY_EXPORT_PRIORITY_REPORT_2026-10-06.mdindex ba635aae..efb328d1 100644--- a/docs/STABILITY_EXPORT_PRIORITY_REPORT_2026-10-06.md+++ b/docs/STABILITY_EXPORT_PRIORITY_REPORT_2026-10-06.md@@ -4,7 +4,7 @@## 已确认的问题和修复-- **补帧入口错误**:通用“添加补帧”按当前选中的 DLSS 能力判断,缺少 NVIDIA 运行库时,即使 FSR/XeSS 可用也会被禁用。原发布 AMD 包在本机 RTX5070 上真实复现这一缺组件条件:DLSS disabled、FSR/XeSS available、通用项 disabled、添加返回失败;这不是模拟 AMD 实卡。候选版通用项按所有可用后端判断,旧无效选择可以切到可用后端;AMD/Intel 新配置默认 FSR。后端各自的硬件限制保持。+- **补帧入口错误**:通用“添加补帧”按当前选中的 DLSS 能力判断,缺少 NVIDIA 运行库时,即使 FSR/XeSS 可用也会被禁用。原发布 AMD 包在本机 RTX5070 上真实复现这一缺组件条件:DLSS disabled、FSR/XeSS available、通用项 disabled、添加返回失败;这不是模拟 AMD 实卡。候选版通用项按所有可用后端判断;AMD/Intel 新配置默认 FSR。恢复列表、未激活节点模式和预设时,旧不可用 DLSS/VFG 选择优先迁移到 FSR 2X、其次 XeSS;保留启用状态,已可用的手动 XeSS/FSR4/VFG 或 NVIDIA DLSS 不被覆盖,迁移会持久化。后端各自的硬件限制保持。- **FSR 导出误换 DLSS**:`VideoExportJob.cpp` 强行把跨厂商补帧改成 DLSS,再用 NVIDIA-only 导出检查拒绝 AMD。`git blame` 显示替换语句来自 `6c70eb2b`(09-16),FSR 扩大匹配来自 `4fbc2b02`(10-01),都早于 2.0.3。不能把这一问题归咎于刚合的 PR19/20。现在 FSR 3.1/FSR 4 使用现有共享图的补帧纹理送编码器,保留后端和倍率,不另造播放器/导出循环。FSR 4 ML 的设备/provider 检查不被绕过。- **XeSS 导出边界**:当前集成的 XeSS 管理 Present,不暴露可编码补帧纹理。界面和工作进程均明确提示选择 FSR、DLSS 或 VFG,拒绝时编码帧数为 0;不再悄悄改为 DLSS。此次未实现 XeSS 视频补帧导出。- **AMD NR 的 4K 导出失效**:旧代码用片源尺寸判模型预算,离线 planner 又把 NR 强制 native。现在冻结全局/每层设置、固定执行计划和工作进程一致:AMD lmxxf 视频导出最高使用内部 1080p,保留原工作/输出尺寸做残差合成、编码;原生模型预算检查仍在。NVIDIA NR 导出继续 native,图片导出的原尺寸预算合同不被扩大。界面说明区分视频与图片。@@ -13,7 +13,7 @@同步说明依据 [Microsoft Present 接口](https://learn.microsoft.com/en-us/windows/win32/api/dxgi/nf-dxgi-idxgiswapchain-present) 与 [NVIDIA 交换链建议](https://developer.nvidia.com/blog/advanced-api-performance-swap-chains/)。交换链模式、合成器和驱动设置会影响实际显示路径;本次测试验证 API、像素和生命周期,没有测量面板扫描或端到端延迟。-## 性能疑点:不能宣称完全没有回退+## 早期性能对照(历史,后续已完成针对性修复)本机 RTX5070,驱动 616.56。同一 M2 4K60 视频,SHA256 `19482f441ee53f8ed35b2b95da343b18d2fce5764181aefb45bb4c32c46fa943`;同一 NVIDIA 原版 NR 310.8.0.0,SHA256 `e16bcf15e16e13f527491cdf7845b2fe6521a738d8f7c9c721866a8496e1fc8e`。单层内部 1080p,风格 0、模型强度 1、总变化 1,自动画面调控/抗闪烁/时域关闭,SR/FG/HDR/调色关闭,硬解自动,窗口 1280×800、声音静音。用户未给出旧测试的全部画质开关,上述是明确的控制条件。@@ -32,9 +32,34 @@| released203-bracket-final | 普通 | 6.472 | 27/27 | 60 || fix2-tearing-control | 普通,允许撕裂 | 6.803 | 26/26 | 60 |-第一对前台状态差异明显,不能以其约 14% 差值断言算法回退。Qt active 相同的早期对照差约 2%;末轮旧版 6.472 vs 候选 6.932 差 **7.12%**。候选同步/允许撕裂两轮相差约 **1.90%**,因此同步行为不能解释全部差异。单轮和系统状态波动不足以确定因果,但也不能抹掉约 7% 的疑点,或把调高优先级当作已经修复。新包普通档约 6.9ms、60FPS 通过;此条件下没有复现“必须高/实时才能达标”,不等于所有设置/多程序负载已恢复 2.0.3 性能。真正的剩余工作是更严格分离界面 GPU 负载、系统调度和 NR 计时,当前不宣称性能回退根因已解决。+第一对前台状态差异明显,不能以其约 14% 差值断言算法回退。Qt active 相同的早期对照差约 2%;末轮旧版 6.472 vs 候选 6.932 差 **7.12%**。候选同步/允许撕裂两轮相差约 **1.90%**,因此同步行为不能解释全部差异。单轮和系统状态波动不足以确定因果,但也不能抹掉约 7% 的疑点,或把调高优先级当作已经修复。该阶段普通档约 6.9ms、60FPS,仍未闭环约 7% 的性能疑点,用户随后明确要求先修复再封包。以下保留当时证据,不作为最终性能结论。-原发布包 EXE:2.0.3 `998d42617e0455523b6f39741ec82206c4685f043794a5235c2853f8c5a98154`;2.0.4 `d01329aa6d9fbd6ac2d1eee294782f4cb9d233490595ed2e3e1a9ea12c16b2d6`。最终候选 EXE `21e8e89c37d36f2cc43e7c619382185459ba36f76edefd602666050d6a20285b`。中间构建和所有失败/无效对照均保留,不挑选最佳一轮冒充固定收益。+原发布包 EXE:2.0.3 `998d42617e0455523b6f39741ec82206c4685f043794a5235c2853f8c5a98154`;2.0.4 `d01329aa6d9fbd6ac2d1eee294782f4cb9d233490595ed2e3e1a9ea12c16b2d6`。该阶段候选 EXE `21e8e89c37d36f2cc43e7c619382185459ba36f76edefd602666050d6a20285b`,已经封存;最终 AMD 默认选择构建为 `65fc23e33598d7efd77ea50ba8062a89beaacb29eb14369ffc78d03563312626`,QML 随后单独修复统计动画。中间构建和所有失败/无效对照均保留,不挑选最佳一轮冒充固定收益。++## 2.0.3 默认优先级及用户 GTA VI 素材的最终闭环++先核对原版本,再测:v2.0.3 `385a341b` 源码没有 GPU 调度优先级 setter,D3D12 队列明确为 NORMAL。原发布 EXE 仅用 D3DKMTGetProcessSchedulingPriorityClass 读取:`released203-normal`、`released203-normal-focused`、`released203-bracket-final` 共 135 次,返回均为 `0x0`、class **2 = Normal**。没有对旧版强制设置优先级。枚举依据 [Microsoft D3DKMT priority class](https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/d3dkmthk/ne-d3dkmt_schedulingpriorityclass)。因此不能以“2.0.3 本来就是高档”解释差距。++用户指定 `E:/Ai/知识/小七姐/GTAVI_An_Extended_Look_4K_Native.mp4`:3840×2160、**30fps**、H.264/BT.709 SDR,SHA256 `93db61292353f19aaf6bfa2fbd3a094d1140300785ab2d93b0c06aa7881f8b3f`。保持上述原版 NR、内部 1080p 单层、总变化 1/风格 0、画面调控/时域关闭及其他控制条件;最终仍用 GPU D3D12 界面、DIRECT 图队列、Auto 同步和**实际普通 class 2**。未切软件界面、未提高优先级、未减少 NR 工作。++排查顺序及反证:初期旧版 5.94ms vs 新版 6.87ms;关闭显示同步仍约 7.02ms;当前引擎换回完整旧 QML 布局仍约 6.97ms;只用正常 OBS 软件界面回到约 5.97ms。独立 COMPUTE 队列约 6.47ms、D3D11 UI 约 6.81ms、basic render loop 约 6.38ms 均不是最终方案。真正启用 reduced motion 时 NR 约 6.10ms、UI 约 33 次/秒。这将差距锁定到界面持续动画的 GPU 竞争;不能把它说成 NR 模型本身多了计算。++修复持续统计的插值:性能圆环、列表 GPU 条及节点统计条使用有界 33ms 更新,保持真实数值及交互动效;条宽按像素、圆环按可见精度更新,避免对不可见的微小抖动不断重绘。保留原页面/条形入场动画,隐藏、暂停或 reduced motion 时停止持续插值。新目标到来时推进内部轨迹但不立即绘制,既不按屏幕 320Hz 提交,也不因快速读数饿死动画。Qt 默认动画跟随显示刷新率的机制见 [Qt 6.8 scene graph](https://doc.qt.io/qt-6.8/qtquick-visualcanvas-scenegraph.html)。这是 UI 更新策略的修复,不改变采集/播放/导出帧率。++| 最终/反向验证 | NR ms(一秒平均的中位数) | UI 提交/秒中位数 | 视频提交 FPS |+|---|---:|---:|---:|+| gta-meter-final-c3(最终 QML) | 6.274 | 37 | 30 |+| gta-ui-reversal-d1(同 EXE,仅恢复未修统计动画) | 6.964 | 320 | 30 |+| gta-meter-final-c4(最终 QML) | 6.559 | 35 | 30 |+| gta-old-bracket-a5(原 2.0.3) | 6.559 | 20 | 30 |+| m2-meter-final-e1(原 4K60 对照素材,最终 QML) | 6.590 | 61 | 60 |+| m2-old-final-e2(原 2.0.3,同 4K60) | 6.633 | 19 | 60 |++GTA 相邻旧/新差 **+0.009%**、M2 差 **−0.638%**,均未再出现约 7% 的差距;这不是声称所有设置性能完全相同。GTA 同 EXE 反向恢复旧统计动画后退化,修复相邻对照的 NR 区间减少 **5.80%**、UI 提交减少 **89.06%**。这些数字限本机/素材/设置,UI 提交减少不等于屏幕延迟减少。++所有表列稳态 API 查询均为 `0x0/class 2`,GTA d1/c4/a5 同为 Qt active 全部采样、外部 foregroundOwned 稳态 0;M2 两轮也分别记录。早期窗口状态和后续系统负载不同,不能拿最早旧版 5.94ms 直接对比后续 6.56ms 宣称退化或挑选最佳一轮算收益。时钟、覆盖层和其他应用未锁定,原始波动/失败全部保留;因果判断依赖同 EXE 的 UI 反向切换与新旧相邻匹配。对照收据:`logs/.../performance-final-comparison.json`,每轮 `result/samples/meters/raw-timing/player.log`。++最终 QML:ProPage SHA `0bac8660a1925740073d6736d7f48a3d72a7e629fe3eac9d30cdc4fe5be46404`,NodePage `03dfc117b57231178ecc86610a6c6fbcdfb917aa5fbd033686470e0ebef10228`,VTelemetryValue `deae7c8c0902e64441b6d69407eb1099d95d9928a3db6fdc7232c13fe006bec2`。最终不保留诊断中的软件 UI/COMPUTE/D3D11/basic 强制参数,也未回退 HDR/NR 画面调控/能力缓存功能。## 构建和真实验证@@ -42,9 +67,15 @@| 命令/记录 | 验证内容 | 结果 ||---|---|---|-| stability-export-priority-build.py build-final-product ... | 标准配置,现有 patched FFmpeg、Qt/libass、串流依赖;最终产品 | 通过,EXE 同上 |-| build-fg-final / build-export-test-final | 新测试最终目标 | 通过;仅测试变动,产品 EXE 不变 |-| stability-export-priority-tests.py units-final units | 效果链 264、修复契约 246、预设 482、能力 56、呈现时序 78、i18n | 0 失败 |+| stability-export-priority-build.py build-final-product ... | 前一阶段引擎修复构建,现有 patched FFmpeg、Qt/libass、串流依赖 | 通过,归档 EXE 21e8e89c…;后续引擎不变 |+| build-fg-final / build-export-test-final | 新测试最终目标 | 通过;仅测试变动 |+| build-amd-default-final / build-telemetry-tests | AMD 默认选择及真实 Qt 组件测试目标 | 通过;最终 EXE 65fc23e3… |+| gui-amd-default-old-second / gui-amd-default-migrate / gui-amd-xess-keep / gui-nvidia-dlss-keep | 原无效 DLSS 恢复问题、列表/未激活节点迁移、手动 XeSS 重启保留、NVIDIA DLSS 6X 保留 | 通过;缺组件实测,不是伪造 AMD 身份 |+| telemetry-second | 高频读数仍推进且绘制有界、反向目标收敛、隐藏/关闭动效/零时长停止 | 6 项通过 |+| gui-telemetry-lifecycle | 真 NR 播放、暂停/恢复、窗口/全屏/返回、seek、节点 NR 接线执行、列表恢复、reduced motion、停止/完整 NGX 释放 | 通过,RTX5070/普通优先级 |+| gui-fsr-final NVIDIA export | 最终 EXE/QML,4K60 FSR2X 窗口/全屏/返回和实际 H.264 导出 | 通过,60源+59生成+1保持=120;1280×720/60fps |+| gui-fsr-final-timestamps.json | 最终 GUI 导出完整 ffmpeg -xerror 解码和逐帧 PTS | 通过,120 帧,0–1.983333 秒,严格60fps |+| stability-export-priority-tests.py units-final units / units-amd-default units | 效果链 264、修复契约 246→258、预设 482、能力 56、呈现时序 78、i18n | 0 失败 || gui-amd-before AMD before / gui-amd-after-fixed AMD catalog | 发布包真实入口错误与修复后选择、Chain+FG+Flow 列表预设 | 旧错误复现;修复通过 || gui-fsr-export-second NVIDIA export | 4K60 输入 FSR2X 窗口/全屏/回窗口,真实 UI 导出 | 120 提交 FPS;720p30 的 60 源帧编码为 120 帧 || gui-fsr-restore NVIDIA restore | 重启恢复 FSR、倍率、启用状态、列表预设和 Flow | 通过 |@@ -63,6 +94,9 @@## 失败记录和对抗检查+- telemetry-final:快速读数测试揭示插值目标与 tick 同时到达时可能停滞;修复为更新内部轨迹、只在 tick 发布数值,telemetry-second 6/6 通过。未放宽测试来掩盖真实缺陷。+- perf-ui-software-new:仅强制 Qt backend 而未走产品 OBS 选项,透明窗口报 UpdateLayeredWindowIndirect;该轮 FAIL,不计提速。随后使用真实 OBS 选项,gta-new-software-b4 通过。gta-new-reduced-b7 只写了未被 facade 消费的偏好字段,未真正关动效;补实际 setter 和配置日志,gta-new-reduced-b9 正确验证。+- gui-amd-default-old:关闭 FG 的公开倍率 getter 返回 1,而夹具误要求记忆倍率 6;修正仅该期望,另出 old-second,保留旧失败。- build-second:新 AMD 4K 测试块误放到引用变量声明前,C2065;调整测试块顺序后 build-third 通过。- display-first:测试在原生共享队列未排空时释放 presenter,导致已删除资源和 DEVICE_HUNG。正式引擎相应路径已经 drain;修正测试按正式生命周期执行。display-second 又错误把累计提交数当单例计数;改为前后差值。最终 12 例及生产 GPU 独立呈现测试无错误。原错误不当作用户故障根因。- gui-amd-after / gui-fsr-export:夹具先只选 Chain 但断言 FG/Flow 恢复,以及重复添加已有单例 FG;按真实选择范围 21(Chain+FG+Flow)和现有列表修正后通过。@@ -77,4 +111,4 @@全部沿用 fix1 已批准运行组件,AMD/NVIDIA 分别 694/215 项逐文件身份保持。patched FFmpeg 与 libass/Qt 对应依赖源继续使用已发布 2.0.4 的固定 SHA `4eccde6343d66e0511b641aaacc12b999e424738a383fcce268d762abb3dceb9`,不提交 runtime/SDK/模型到源码,不修改任何 proprietary DLL。开工封存的 25 工作树及 14 发布文件继续由本轮 control 核验,main/tag/Release 不变。-**仍未验证/未完成**:真实 AMD HIP 的高分辨率离线推理与 AMD Media Foundation 编码、FSR4 ML 实卡导出、用户显示器上的实际撕裂/VRR/覆盖层、所有来源/设置下的稳定性,以及上述约 7% 性能差的确定根因。用户此前 RX9000 NR 可用反馈保留,不能扩展成此次导出已通过。请在新目录解压测试,不混装旧运行库;AMD 图片超预算与 XeSS FG 导出仍有明确限制。本地候选用于复测,当前不满足宣称所有反馈已根治或直接正式发布的条件。+**仍未验证/未完成**:真实 AMD HIP 的高分辨率离线推理与 AMD Media Foundation 编码、FSR4 ML 实卡导出、用户显示器上的实际撕裂/VRR/覆盖层、所有来源/设置下的稳定性,以及全部设置/多应用负载下的性能和长期稳定性。上述约 7% 疑点已按 GTA/M2 匹配与同 EXE 反向 UI 对照闭环。用户此前 RX9000 NR 可用反馈保留,不能扩展成此次导出已通过。请在新目录解压测试,不混装旧运行库;AMD 图片超预算与 XeSS FG 导出仍有明确限制。本地候选用于复测,不宣称所有硬件/现场反馈已根治,也未替换公开 Release。diff --git a/docs/WORKLOG.md b/docs/WORKLOG.mdindex 578e2023..5ea8ce48 100644--- a/docs/WORKLOG.md+++ b/docs/WORKLOG.md@@ -8559,3 +8559,17 @@ README更新仅当前版本更新/下载/过时状态和社区支持。独立确性能普通档候选6.932ms/60fps,紧邻2.0.3为6.472ms,相差7.12%;同候选允许撕裂6.803ms,同步对照差1.90%。前台不一致的首轮14%差值作无效因果证据;不能声称没有回退或根因已修复,也未以调高优先级计成功。外部foreground查询与Qt active不一致、覆盖层/时钟未锁定,全部结果保留。AMD实卡离线推理/编码、FSR4、用户扫描撕裂和全设置稳定性未验,不据模拟/软件计数扩展支持。夹具失败保留:build-second变量声明顺序;display-first未drain即释放导致device hung、second累计计数误用;GUI预设mask/重复单例;FG运行配置路径;FSR子串匹配;cold-stage硬链接mapped路径假阴性。修正后复查,不冒充产品缺陷或抹掉原日志。完整便携候选2.0.4-fix2和源码存于本轮test-packages;最终ZIP/commit/SHA/CRC校验以DELIVERY.json为准,保护main/tag/现有发布资产。++### 2026-10-07 普通优先级性能闭环与最终 AMD 默认修复++用户要求先核实2.0.3默认GPU档位,并解决7%差距再封包;指定GTA VI 4K素材/1080p NR。检查v2.0.3 385a341b无GPU调度setter、队列NORMAL;原发布EXE三组135次只读D3DKMT查询均0x0/class2=普通。没有提高旧版或新版优先级来掩盖差异,没有压力/竞争测试或改全局驱动设置。++补齐已保存配置的默认迁移:真实能力检查将不可用DLSS选择优先换FSR2X,覆盖列表和未激活节点模式、包括FG关闭状态,保留启用标志与可用手动选择;存储修复结果防止重启恢复旧值。build-amd-default-final成功,最终EXE 65fc23e33598d7efd77ea50ba8062a89beaacb29eb14369ffc78d03563312626。units-amd-default:264/258/482/56/78及i18n全通过;gui-amd-default-old-second、gui-amd-default-migrate、gui-amd-xess-keep、gui-nvidia-dlss-keep验证真实缺组件入口、FSR迁移、手动XeSS与NVIDIA6X保存。RTX5070运行缺组件包,不冒充AMD实卡。++串行普通40秒播放:GTA素材3840×2160/30fps、SHA93db6129…1f8b3f;原版NR310.8、单层内部1080p、风格0/强度1、画面调控和SR/FG等关闭。软件UI实际OBS路径恢复NR约5.97ms,真正关闭动效约6.10ms;COMPUTE/D3D11/basic均只作反证,没有进入产品。当前EXE恢复旧统计动画(gta-ui-reversal-d1)NR6.963605/UI320Hz,最终修复(gta-meter-final-c4)6.559476/UI35Hz;紧邻原2.0.3(gta-old-bracket-a5)6.558881/UI20Hz。原4K60 M2最终新/旧6.590205/6.632515ms,均实际普通class2。相邻GTA差+0.009%、M2差−0.638%,同EXE UI反向对照修复减少NR区间5.80%、UI提交89.06%;不将此数冒充屏幕延迟或全设置收益。早期7%和全部波动保留;没有用最早5.94ms跨系统状态比较后续6.56ms。performance-final-comparison.json与每轮原始日志在本轮logs。++产品仅将统计圆环/列表GPU条/节点统计条改为33ms有界插值和可见精度,保留页面/入场动画、实际数值和视频帧率,继续D3D12 UI/DIRECT图队列。build-telemetry-tests通过;telemetry-final揭示频繁retarget只取上次公布值导致停滞,修正推进内部轨迹而不立即绘制,telemetry-second 6/6通过,没有放宽测试。gta-new-reduced-b7偏好字段未消费,后续实际setter修正为b9;gui-amd-default-old关闭FG getter为1导致夹具错误,old-second修正仅期望。原失败完整保留。++gui-telemetry-lifecycle(29.86秒)真实原版NR:播放/暂停恢复/窗口全屏返回/seek/节点NR接线/列表恢复/reduced motion/停止退出通过,NGX参数完整释放。gui-fsr-final(19.39秒)最终EXE/QML真实FSR预览和H264导出120帧、720p60通过。源码、日志和实际导出继续在本轮E盘目录;下一步只封包、新ZIP解压冷启动、逐文件/源码bundle与保护审计,按对应实际JSON记交付完成,不公开发布、不合main、不关机。++封包前独立最终导出 `ffmpeg -v error -xerror ... -f null -` 完整解码、ffprobe逐帧时间戳检查通过:120帧、0–1.983333秒、每帧1/60递增;gui-fsr-final-timestamps.json保留实际文件SHA及解码exit0。全部本轮Python脚本AST语法检查通过。新增evidence freeze/close分别核对归档旧引擎证据和最终EXE/QML证据;未声称所有旧GPU用例在新EXE上重跑。diff --git a/include/veyra/engine/FrameGenerationSelection.h b/include/veyra/engine/FrameGenerationSelection.hnew file mode 100644index 00000000..4b683cd8--- /dev/null+++ b/include/veyra/engine/FrameGenerationSelection.h@@ -0,0 +1,33 @@+// SPDX-License-Identifier: GPL-3.0-only+#pragma once+#include "veyra/engine/EnhancementSettings.h"++namespace veyra::engine {+struct FrameGenerationAvailability {+ bool dlss = false, xess = false, fsr = false, fsr4 = false, vfg = false;+ constexpr bool supports(FrameGenerationBackend backend) const {+ switch (backend) {+ case FrameGenerationBackend::Dlss: return dlss;+ case FrameGenerationBackend::XeSS: return xess;+ case FrameGenerationBackend::Fsr: return fsr;+ case FrameGenerationBackend::Fsr4: return fsr4;+ case FrameGenerationBackend::Vfg: return vfg;+ }+ return false;+ }+};+constexpr FrameGenerationBackend defaultFrameGenerationBackend(uint32_t vendor) {+ return vendor == 0x1002 || vendor == 0x8086+ ? FrameGenerationBackend::Fsr : FrameGenerationBackend::Dlss;+}+// Keep usable manual choices. An unavailable saved choice prefers the+// cross-vendor FSR provider, then XeSS; never auto-select an experimental one.+constexpr FrameGenerationBackend restoredFrameGenerationBackend(+ FrameGenerationBackend saved, FrameGenerationAvailability available) {+ if (available.supports(saved)) return saved;+ if (available.fsr) return FrameGenerationBackend::Fsr;+ if (available.xess) return FrameGenerationBackend::XeSS;+ if (available.dlss) return FrameGenerationBackend::Dlss;+ return saved; // No provider: the caller disables the effect with its reason.+}+}diff --git a/qml/Veyra/NodePage.qml b/qml/Veyra/NodePage.qmlindex 60585f29..473244ba 100644--- a/qml/Veyra/NodePage.qml+++ b/qml/Veyra/NodePage.qml@@ -975,12 +975,18 @@ VPage {Repeater {model: timingStrip.segmentsdelegate: Rectangle {+ id: timingSegmentrequired property var modelDataheight: parent.height- width: timingStrip.widthOf(modelData)+ width: Math.round(telemetryWidth.value)radius: 4color: modelData.measured ? modelData.color : Qt.rgba(1, 1, 1, 0.12)- Behavior on width { enabled: visible; NumberAnimation { duration: Theme.d(600); easing.bezierCurve: Theme.springSoft } }+ VTelemetryValue {+ id: telemetryWidth+ targetValue: timingStrip.widthOf(timingSegment.modelData)+ animate: timingSegment.visible && !Theme.reduced+ duration: 600+ }Text {anchors.centerIn: parentwidth: parent.width - 6diff --git a/qml/Veyra/ProPage.qml b/qml/Veyra/ProPage.qmlindex ed720553..783d1866 100644--- a/qml/Veyra/ProPage.qml+++ b/qml/Veyra/ProPage.qml@@ -176,12 +176,15 @@ VPage {: fraction < 0.7 ? Theme.ok : fraction < 1.0 ? "#F2B941" : Theme.errimplicitWidth: Math.max(size, labelText.implicitWidth)implicitHeight: showLabel ? size + 4 + labelText.implicitHeight : size- property real shown: known ? Math.min(1, Math.max(0, fraction)) : 0- // Live data changes every second; animating it behind another page redrew the- // window continuously (see VDot.qml), so only while shown.- // Paused telemetry still updates, but it does not need a 600 ms canvas- // animation every second. Keep live playback and user edits responsive.- Behavior on shown { enabled: orb.visible && (!veyra.paused || (typeof vyTest !== "undefined" && vyTest.disablePausedUiIdle === true)); NumberAnimation { duration: Theme.d(600); easing.bezierCurve: Theme.springSoft } }+ // The ring is only a few dozen pixels across. Sub-percent changes do+ // not add visible information; the numeric label retains full precision.+ readonly property real shown: Math.round(telemetry.value * 100) / 100+ VTelemetryValue {+ id: telemetry+ targetValue: orb.known ? Math.min(1, Math.max(0, orb.fraction)) : 0+ animate: orb.visible && !Theme.reduced && (!veyra.paused || (typeof vyTest !== "undefined" && vyTest.disablePausedUiIdle === true))+ duration: 600+ }onShownChanged: ring.requestPaint()onToneChanged: ring.requestPaint()Canvas {@@ -833,11 +836,17 @@ VPage {color: Qt.rgba(1, 1, 1, 0.08)Rectangle {objectName: "stage-bar-fill"- width: root.barsArmed ? parent.width * Math.max(0, Math.min(1, modelData.fraction)) : 0+ width: root.barsArmed ? Math.round(parent.width * (root.barsSettled ? liveFraction.value : Math.max(0, Math.min(1, modelData.fraction)))) : 0height: parent.heightradius: 9color: modelData.color- Behavior on width { enabled: stageRow.visible; SequentialAnimation {+ VTelemetryValue {+ id: liveFraction+ targetValue: Math.max(0, Math.min(1, modelData.fraction))+ animate: root.barsSettled && stageRow.visible && !Theme.reduced+ duration: 800+ }+ Behavior on width { enabled: stageRow.visible && !root.barsSettled; SequentialAnimation {PauseAnimation { duration: root.barsSettled ? 0 : Theme.d(120 + stageRow.index * 60) }NumberAnimation { duration: Theme.d(800); easing.bezierCurve: Theme.springSoft } } }}diff --git a/qml/Veyra/VTelemetryValue.qml b/qml/Veyra/VTelemetryValue.qmlnew file mode 100644index 00000000..f64a4124--- /dev/null+++ b/qml/Veyra/VTelemetryValue.qml@@ -0,0 +1,56 @@+// Live statistics use a bounded timer rather than the display's animation clock.+// A rolling GPU measurement changes every source frame; restarting a long+// NumberAnimation for each reading otherwise keeps the UI drawing at 320 Hz.+import QtQuick++QtObject {+ id: root+ property real targetValue: 0+ property real value: 0+ property bool animate: true+ property int duration: 600+ property real fromValue: 0+ property real toValue: 0+ property double started: 0+ property bool ready: false++ function atTime(now) {+ const t = Math.min(1, Math.max(0, (now - started) / duration))+ const eased = 1 - Math.pow(1 - t, 3)+ return fromValue + (toValue - fromValue) * eased+ }++ function retarget() {+ if (!ready) return+ if (!animate || duration <= 0 || Math.abs(targetValue - value) < 0.00001) {+ tick.stop()+ value = targetValue+ return+ }+ const now = Date.now()+ // Advance the internal trajectory before replacing its destination.+ // Do not publish a value here: frequent readings still share one UI tick.+ // Taking only the last published value would stall when a reading always+ // arrived immediately before the timer callback.+ fromValue = tick.running ? atTime(now) : value+ toValue = targetValue+ started = now+ // New samples keep the timer's deadline. Restarting it could postpone+ // every tick forever when samples arrive faster than the UI cadence.+ if (!tick.running) tick.start()+ }+ onTargetValueChanged: retarget()+ onAnimateChanged: retarget()+ onDurationChanged: retarget()+ Component.onCompleted: { ready = true; value = targetValue }++ property Timer driver: Timer {+ id: tick+ interval: 33+ repeat: true+ onTriggered: {+ root.value = root.atTime(Date.now())+ if (Date.now() - root.started >= root.duration) { root.value = root.targetValue; stop() }+ }+ }+}diff --git a/qml/Veyra/qmldir b/qml/Veyra/qmldirindex ff17b1cb..647bf76e 100644--- a/qml/Veyra/qmldir+++ b/qml/Veyra/qmldir@@ -39,3 +39,4 @@ VConfirm 1.0 VConfirm.qmlNrLayerEditor 1.0 NrLayerEditor.qmlVSpinner 1.0 VSpinner.qmlVEqBars 1.0 VEqBars.qml+VTelemetryValue 1.0 VTelemetryValue.qmldiff --git a/scripts/acceptance/stability-export-priority-cold.py b/scripts/acceptance/stability-export-priority-cold.pyindex e3704cef..11f8f33a 100644--- a/scripts/acceptance/stability-export-priority-cold.py+++ b/scripts/acceptance/stability-export-priority-cold.py@@ -1,10 +1,11 @@"""Cold portable starts with package-only Qt/FFmpeg and private profiles."""from pathlib import Path-import os,sys,json,subprocess,time,hashlib,ctypes+import os,sys,json,subprocess,time,hashlib,ctypes,zipfilefrom ctypes import wintypesBASE=Path('E:/项目/Veyra');TASK='stability-export-priority-20261006'ROOT=Path(__file__).resolve().parents[2]label=sys.argv[1];assert label.replace('-','').isalnum()+from_zip='--zip' in sys.argvsubprocess.run([sys.executable,'-B',str(ROOT/'scripts/acceptance/stability-export-priority-control.py')],check=True)results=[]api=ctypes.WinDLL('psapi')@@ -24,6 +25,29 @@ def loaded_modules(process):return pathsfor vendor in ('AMD','NVIDIA'):app=BASE/'test-packages'/TASK/f'Veyra-2.0.4-fix2-{vendor}-win64-portable'+ archive=None;archive_hash=None+ if from_zip:+ archive=app.parent/(app.name+'.zip')+ delivery=json.loads((app.parent/'DELIVERY.json').read_text(encoding='utf8'))+ expected=next(r for r in delivery if r['vendor']==vendor)+ with archive.open('rb') as stream:archive_hash=hashlib.file_digest(stream,'sha256').hexdigest()+ assert archive_hash==expected['archiveSha256']+ extracted=BASE/'verify'/TASK/(label+'-'+vendor)+ extracted.mkdir(parents=True,exist_ok=False)+ with zipfile.ZipFile(archive) as zipped:+ for entry in zipped.infolist():+ target=extracted/entry.filename+ assert target.resolve().is_relative_to(extracted.resolve())+ assert entry.filename.startswith(app.name+'/') and not entry.is_dir()+ assert (entry.external_attr>>16)&0o170000!=0o120000+ zipped.extractall(extracted)+ app=extracted/app.name+ manifest=json.loads((app/'package-manifest.json').read_text(encoding='utf8'))+ for row in manifest['files']:+ item=app/row['path']+ assert item.resolve().is_relative_to(app.resolve()) and not item.is_symlink()+ with item.open('rb') as stream:actual_hash=hashlib.file_digest(stream,'sha256').hexdigest()+ assert item.stat().st_size==row['size'] and actual_hash==row['sha256'],row['path']out=BASE/'tests'/TASK/(label+'-'+vendor);tmp=BASE/'tmp'/TASK/(label+'-'+vendor)for p in (out,tmp):p.mkdir(parents=True,exist_ok=False)logs=BASE/'logs'/TASK;console=logs/(label+'-'+vendor+'.log')@@ -42,7 +66,7 @@ for vendor in ('AMD','NVIDIA'):body=console.read_text(encoding='utf8',errors='replace')required=[p for p in modules if Path(p).name.lower().startswith(('qt6','avcodec','avformat','avutil','swscale','swresample'))]passed=rc==0 and len(required)>=12 and all(Path(p).resolve().is_relative_to(app.resolve()) for p in required) and not any(x in body for x in ('ReferenceError:','TypeError:','[ERROR]','[FATAL]','failed to load'))- results.append(dict(vendor=vendor,passed=passed,exit=rc,seconds=time.monotonic()-begin,exeSha256=hashlib.sha256((app/'veyra_qml_ui.exe').read_bytes()).hexdigest(),packageModules=sorted(required),privateProfile=str(out/'profile')))+ results.append(dict(vendor=vendor,passed=passed,exit=rc,seconds=time.monotonic()-begin,exeSha256=hashlib.sha256((app/'veyra_qml_ui.exe').read_bytes()).hexdigest(),packageModules=sorted(required),privateProfile=str(out/'profile'),archive=str(archive) if archive else None,archiveSha256=archive_hash,extractedApp=str(app) if from_zip else None))print(vendor,'PASS' if passed else 'FAIL','modules',len(required),flush=True)(BASE/'logs'/TASK/(label+'.json')).write_text(json.dumps(results,ensure_ascii=False,indent=2),encoding='utf8')raise SystemExit(0 if all(r['passed'] for r in results) else 1)diff --git a/scripts/acceptance/stability-export-priority-evidence.py b/scripts/acceptance/stability-export-priority-evidence.pynew file mode 100644index 00000000..83a6dcb1--- /dev/null+++ b/scripts/acceptance/stability-export-priority-evidence.py@@ -0,0 +1,78 @@+"""Freeze the measured product; audit the final portable archives separately."""+from pathlib import Path+import hashlib,json,subprocess,sys,zipfile+ROOT=Path(__file__).resolve().parents[2]+BASE=Path('E:/项目/Veyra');TASK='stability-export-priority-20261006'+LOG=BASE/'logs'/TASK;ARCH=BASE/'archives'/TASK;PACK=BASE/'test-packages'/TASK+EXE=BASE/'build'/TASK/'standard/veyra_qml_ui.exe'+def sha(path):+ with path.open('rb') as stream:return hashlib.file_digest(stream,'sha256').hexdigest()+def read(path):return json.loads(path.read_text(encoding='utf8'))+def save(path,value):path.write_text(json.dumps(value,ensure_ascii=False,indent=2)+'\n',encoding='utf8')+def git(*args):return subprocess.check_output(['git',*args],cwd=ROOT,text=True,encoding='utf8').strip()+def check_frozen(frozen):+ assert sha(EXE)==frozen['executableSha256']+ for rel,h in frozen['productInputs'].items():assert sha(ROOT/rel)==h,rel+ for rel,h in frozen['testReceipts'].items():assert sha(LOG/rel)==h,rel+subprocess.run([sys.executable,'-B',str(ROOT/'scripts/acceptance/stability-export-priority-control.py'),'--published'],check=True)+mode=sys.argv[1];assert mode in ('freeze','close')+if mode=='freeze':+ assert not git('status','--porcelain'),'Commit the reviewed source before freezing'+ old=read(ARCH/'before-amd-default/tested-inputs.json')+ assert sha(ARCH/'before-amd-default/veyra_qml_ui.exe')==old['executableSha256']+ changed={rel for rel,h in old['productInputs'].items() if sha(ROOT/rel)!=h}+ assert changed=={'src/ui/QmlPlayerBridge.cpp','qml/Veyra/ProPage.qml','qml/Veyra/NodePage.qml','qml/Veyra/qmldir'},changed+ receipts=dict(old['testReceipts'])+ for rel,h in receipts.items():assert sha(LOG/rel)==h,rel+ additions=['build-amd-default-final.json','build-telemetry-tests.json','units-amd-default.json','telemetry-second.json',+ 'gui-amd-default-seed.json','gui-amd-default-old-second.json','gui-amd-default-migrate.json',+ 'gui-amd-xess-keep.json','gui-nvidia-dlss-keep.json','gui-telemetry-lifecycle.json','gui-fsr-final.json','gui-fsr-final-timestamps.json']+ for rel in additions:+ value=read(LOG/rel)+ if isinstance(value,list):assert all(r['passed'] for r in value),rel+ else:assert value.get('passed',value.get('exit')==0),rel+ receipts[rel]=sha(LOG/rel)+ assert read(LOG/'telemetry-second.json')['componentSha256']==sha(ROOT/'qml/Veyra/VTelemetryValue.qml')+ for label in ('gta-meter-final-c3','gta-meter-final-c4','m2-meter-final-e1'):+ result=read(LOG/label/'result.json')+ assert result['passed'] and result['exeSha256']==sha(EXE)+ assert not result['testEnv'] and result['config']['display']==2+ for name,h in result['uiSourceHashes'].items():assert sha(ROOT/'qml/Veyra'/name)==h,name+ for label in ('gta-meter-final-c3','gta-meter-final-c4','gta-ui-reversal-d1','gta-old-bracket-a5','m2-meter-final-e1','m2-old-final-e2'):+ for name in ('result.json','samples.json','meters.json','raw-timing.json','player.log'):+ rel=label+'/'+name;receipts[rel]=sha(LOG/rel)+ comparison=read(LOG/'performance-final-comparison.json')+ assert abs(comparison['gtaMatchedDifferencePercent'])<1 and abs(comparison['m2MatchedDifferencePercent'])<1+ assert all(r['passed'] and r['steadyPriorityStates']==[['0x0',2]] for r in comparison['records'])+ receipts['performance-final-comparison.json']=sha(LOG/'performance-final-comparison.json')+ product={rel:sha(ROOT/rel) for rel in git('ls-files').splitlines()+ if rel.startswith(('cmake/','include/','src/','shaders/','qml/','apps/','i18n/')) or rel in ('CMakeLists.txt','CMakePresets.json')}+ frozen=dict(executableSha256=sha(EXE),productInputs=product,testReceipts=receipts,sourceCommit=git('rev-parse','HEAD'),+ dependencyCache=old['dependencyCache'],+ validationScope='Prior engine/export/pixel receipts use archived 21e8 EXE and unchanged engine inputs; final 65fc EXE adds AMD settings policy, measured final QML and GUI lifecycle/FSR export. No claim of rerunning every GPU case.',+ archivedPreviousFreezeSha256=sha(ARCH/'before-amd-default/tested-inputs.json'))+ check_frozen(frozen);save(LOG/'tested-inputs.json',frozen)+ print('FROZEN',len(product),'product inputs;',len(receipts),'receipts;',frozen['sourceCommit'])+else:+ frozen=read(LOG/'tested-inputs.json');check_frozen(frozen)+ delivery=read(PACK/'DELIVERY.json');cold=read(LOG/'cold-final-zip.json')+ assert len(delivery)==2 and len(cold)==2 and all(r['passed'] for r in cold)+ for item in delivery:+ app=Path(item['app']);manifest=read(app/'package-manifest.json')+ assert sha(Path(item['archive']))==item['archiveSha256'] and item['zipCrcAndAllPayloadHashesPassed']+ assert manifest['sourceCommit']==frozen['sourceCommit'] and not manifest['worktreeDirty']+ assert manifest['localOnly'] and not manifest['releaseReady'] and manifest['executableSha256']==sha(EXE)+ assert sha(Path(item['sourceZip']))==item['sourceZipSha256']+ probe=next(r for r in cold if r['vendor']==item['vendor'])+ assert probe['archiveSha256']==item['archiveSha256'] and probe['exeSha256']==sha(EXE)+ for rel,h in frozen['productInputs'].items():+ if rel.startswith('qml/'):assert sha(app/rel)==h,rel+ with zipfile.ZipFile(delivery[0]['sourceZip']) as zipped:+ assert zipped.testzip() is None+ for rel,h in frozen['productInputs'].items():+ assert hashlib.sha256(zipped.read('Veyra-2.0.4-fix2-source/'+rel)).hexdigest()==h,rel+ subprocess.run(['git','bundle','verify',str(ARCH/'repair-final.bundle')],cwd=ROOT,check=True)+ save(LOG/'final-check.json',dict(passed=True,productCodeCommit=frozen['sourceCommit'],currentHead=git('rev-parse','HEAD'),+ productInputs=len(frozen['productInputs']),testReceipts=len(frozen['testReceipts']),delivery=delivery,coldZipValidation=True,+ archivedBundleSha256=sha(ARCH/'repair-final.bundle'),preservedWorktrees=25,preservedPublishedFiles=14))+ print('FINAL CHECK PASS; product/source/archives/cold-start/protected worktrees unchanged')diff --git a/scripts/acceptance/stability-export-priority-package.py b/scripts/acceptance/stability-export-priority-package.pyindex 6e31173f..11071cdf 100644--- a/scripts/acceptance/stability-export-priority-package.py+++ b/scripts/acceptance/stability-export-priority-package.py@@ -50,8 +50,9 @@ for vendor in ('AMD','NVIDIA'):(app/'REPAIR_TEST_2.0.4-fix2.md').write_text('# Veyra 2.0.4-fix2 本地修复候选\n\n''请解压到新目录测试。本包沿用已批准的运行库原字节,包含已经合入 main 的 PR19/20 和此前 fix1。尚未公开发布。\n\n'- '修复 AMD 通用补帧入口;FSR 视频导出保留 FSR 后端;AMD 视频导出内部最高 1080p NR、原输出尺寸合成编码;XeSS 导出明确提示改选 FSR/DLSS/VFG。\n\n'+ '修复 AMD 通用补帧入口和旧配置恢复:不可用的 DLSS 选择优先迁移到 FSR 2X,保留启用状态和可用的手动 XeSS 选择;FSR 视频导出保留 FSR 后端;AMD 视频导出内部最高 1080p NR、原输出尺寸合成编码;XeSS 导出明确提示改选 FSR/DLSS/VFG。\n\n''自动显示同步在窗口和全屏等待垂直同步防撕裂,提交 FPS 受显示器刷新率限制;仍可手动选择允许撕裂。GPU 优先级避免重复写入已生效档位。\n\n'+ '已核实 2.0.3 默认 GPU 优先级为普通。修复实时统计动画与 NR 的 GPU 竞争,保留交互动效和真实统计值;未提高优先级或减少 NR 工作。RTX5070 普通档、原版单层 1080p NR:GTA VI 4K30 旧/新均约 6.559ms(差 +0.009%),M2 4K60 为 6.633/6.590ms(差 -0.638%),这两组未再出现此前约 7% 的差距。数据限本机/素材/设置,不代表所有配置或屏幕延迟。\n\n''实测、性能比较的控制条件和未验证项见 docs/STABILITY_EXPORT_PRIORITY_REPORT_2026-10-06.md。本机为 RTX5070,AMD 4K 合成检查使用恒等提供器,不冒充 AMD HIP/硬件编码验收。\n',encoding='utf8')assert sha(app/'veyra_qml_ui.exe')==sha(BUILD/'veyra_qml_ui.exe')for rel,h in immutable.items():assert sha(app/rel)==h,reldiff --git a/scripts/acceptance/stability-export-priority-perf.py b/scripts/acceptance/stability-export-priority-perf.pyindex 1043dbca..f6d8fd4c 100644--- a/scripts/acceptance/stability-export-priority-perf.py+++ b/scripts/acceptance/stability-export-priority-perf.py@@ -7,7 +7,7 @@ ROOT=Path(__file__).resolve().parents[2];BASE=Path('E:/项目/Veyra');TASK='stabPACKAGES={'203':BASE/'releases/release-2.0.3-20261004/Veyra-2.0.3-NVIDIA-win64-portable','204':BASE/'releases/publish-2.0.4-20261006/packages/Veyra-2.0.4-NVIDIA-win64-portable','fix2':BASE/'test-packages'/TASK/'Veyra-2.0.4-fix2-NVIDIA-win64-portable'}-MEDIA=BASE/'tests/perf-matrix/media/M2.mkv'+MEDIA=Path('E:/Ai/知识/小七姐/GTAVI_An_Extended_Look_4K_Native.mp4') if '--gta' in sys.argv else BASE/'tests/perf-matrix/media/M2.mkv'def sha(f):with Path(f).open('rb') as s:return hashlib.file_digest(s,'sha256').hexdigest()def copy(src,dst):@@ -39,29 +39,36 @@ def focus_owned(proc):return Trueuser.EnumWindows(callback(collect),0)if windows:user.SetForegroundWindow(windows[0])-def run(variant,label,priority='normal',seconds=40,test_env=None,explicit=False,display=2):+def run(variant,label,priority='normal',seconds=40,test_env=None,explicit=False,display=2,reduced=False,page='pro',software=False,oldUi=False):assert label.replace('-','').isalnum() and priority in ('normal','high','realtime')subprocess.run([sys.executable,'-B',str(ROOT/'scripts/acceptance/stability-export-priority-control.py')],check=True)if variant in PACKAGES:pkg=PACKAGES[variant]else:pkg=BASE/'tests'/TASK/('candidate-'+variant)app=BASE/'tests'/TASK/('perf-'+label)assert not app.exists();shutil.copytree(pkg,app,copy_function=copy,ignore=shutil.ignore_patterns('*.log','logs','user-data-*','*.dmp','*.pdb'))+ if oldUi:shutil.copytree(PACKAGES['203']/'qml',app/'qml',dirs_exist_ok=True)shutil.copy2(ROOT/'scripts/acceptance/stability-export-priority-perf.qml',app/'qml/Veyra/RegressionPerf.qml')- conf={'modern':variant!='203','seconds':seconds,'media':MEDIA.as_posix(),'display':display}+ conf={'modern':variant!='203','seconds':seconds,'media':MEDIA.as_posix(),'display':display,'reducedMotion':reduced,'page':page,'oldUi':oldUi}main=app/'qml/Veyra/Main.qml';text=main.read_text(encoding='utf8');at=text.rfind('}')text=text[:at]+'\n Loader { source:"RegressionPerf.qml"; onLoaded:item.config='+json.dumps(conf,ensure_ascii=True)+' }\n'+text[at:];main.write_text(text,encoding='utf8')out=BASE/'logs'/TASK/label;profile=BASE/'tests'/TASK/label/'profile';tmp=BASE/'tmp'/TASK/labelfor p in (out,profile,tmp):p.mkdir(parents=True,exist_ok=False)- (profile/'qml-preferences.v1.json').write_text(json.dumps({'overlayCompat':'off','gpuPriority':priority,'decode':'auto'}),encoding='utf8')+ (profile/'qml-preferences.v1.json').write_text(json.dumps({'overlayCompat':'off','gpuPriority':priority,'decode':'auto','reducedMotion':reduced,'obsGameCapture':software}),encoding='utf8')env=os.environ.copy()for key in tuple(env):if key.upper().startswith(('VEYRA_','QT_QUICK_BACKEND','QSG_')):env.pop(key)env.update(TEMP=str(tmp),TMP=str(tmp),QML_DISABLE_DISK_CACHE='1',QT_FORCE_STDERR_LOGGING='1',VEYRA_LOG_FILE=str(out/'player.log'),VEYRA_VERBOSE_FRAME_LOGS='1')if test_env:env.update(test_env)- receipt={'variant':variant,'label':label,'priorityRequested':priority,'mediaSha256':sha(MEDIA),'exeSha256':sha(app/'veyra_qml_ui.exe'),'nrSha256':sha(app/'runtime/experimental/nr-original/nvngx_dlssnr.dll'),'gpuBefore':gpu(),'config':conf,'testEnv':test_env or {}}+ mediaReceipt=BASE/'logs'/TASK/('gta-media.json' if '--gta' in sys.argv else 'm2-media.json')+ st=MEDIA.stat();mediaIdentity={'path':str(MEDIA),'bytes':st.st_size,'mtimeNs':st.st_mtime_ns}+ prior=json.loads(mediaReceipt.read_text(encoding='utf8')) if mediaReceipt.exists() else {}+ if any(prior.get(k)!=v for k,v in mediaIdentity.items()):+ mediaIdentity['sha256']=sha(MEDIA);mediaReceipt.write_text(json.dumps(mediaIdentity,ensure_ascii=False,indent=2),encoding='utf8')+ else:mediaIdentity=prior+ receipt={'uiSourceHashes':{n:sha(app/'qml/Veyra'/n) if (app/'qml/Veyra'/n).is_file() else None for n in ('ProPage.qml','NodePage.qml','VTelemetryValue.qml','qmldir')},'variant':variant,'label':label,'priorityRequested':priority,'mediaSha256':mediaIdentity['sha256'],'exeSha256':sha(app/'veyra_qml_ui.exe'),'nrSha256':sha(app/'runtime/experimental/nr-original/nvngx_dlssnr.dll'),'gpuBefore':gpu(),'config':conf,'testEnv':test_env or {},'softwareUiRequested':software}t=time.monotonic();meters=[]with (out/'console.log').open('xb') as stream:- proc=subprocess.Popen([str(app/'veyra_qml_ui.exe'),'--data-dir',str(profile),'--page','pro','--size','1280x800','--exit-after','125000'],cwd=app,env=env,stdout=stream,stderr=subprocess.STDOUT)+ proc=subprocess.Popen([str(app/'veyra_qml_ui.exe'),'--data-dir',str(profile),'--page',page,'--size','1280x800','--exit-after','125000'],cwd=app,env=env,stdout=stream,stderr=subprocess.STDOUT)applied=Falsetry:while proc.poll() is None and time.monotonic()-t<140:@@ -87,9 +94,12 @@ def run(variant,label,priority='normal',seconds=40,test_env=None,explicit=False,values=[r['ms'] for row in rows for r in row['stages'] if r['label']==name and r['measured']]summary[name]={'medianOfOneSecondMeans':statistics.median(values),'min':min(values),'max':max(values),'observations':len(values)}passed=rc==0 and 'REGRESSION_PASS' in text and not any(s in text for s in ('REGRESSION_FAIL','ReferenceError:','TypeError:','[ERROR]','[FATAL]')) and len(rows)>=10- receipt.update(exitCode=rc,wallSeconds=time.monotonic()-t,passed=passed,summary=summary,foregroundSamples=sum(r['active'] for r in rows),observations=len(rows),medianSubmitFps=statistics.median(r['fps'] for r in rows) if rows else 0)+ uiRates=[b['uiFrames']-a['uiFrames'] for a,b in zip(rows,rows[1:])]+ receipt.update(uiFramesPerSecondMedian=statistics.median(uiRates) if uiRates else None,exitCode=rc,wallSeconds=time.monotonic()-t,passed=passed,summary=summary,foregroundSamples=sum(r['active'] for r in rows),observations=len(rows),medianSubmitFps=statistics.median(r['fps'] for r in rows) if rows else 0)for name,obj in [('result',receipt),('meters',meters),('samples',rows),('raw-timing',raw)]:(out/(name+'.json')).write_text(json.dumps(obj,ensure_ascii=False,indent=2),encoding='utf8')print(json.dumps(receipt,ensure_ascii=False),flush=True)if not passed:print('\n'.join(text.splitlines()[-20:]));raise SystemExit(1)-if __name__=='__main__':run(*sys.argv[1:4],seconds=int(sys.argv[4]) if len(sys.argv)>4 else 40,explicit='--explicit' in sys.argv,display=0 if '--tearing' in sys.argv else 2)+if __name__=='__main__':run(*sys.argv[1:4],seconds=int(sys.argv[4]) if len(sys.argv)>4 else 40,explicit='--explicit' in sys.argv,display=0 if '--tearing' in sys.argv else 2,+ reduced='--reduced' in sys.argv,page='min' if '--minimal' in sys.argv else 'pro',software='--software' in sys.argv,oldUi='--old-ui' in sys.argv,+ test_env={key:value for flag,key,value in [('--compute','VEYRA_TEST_GRAPH_COMPUTE','1'),('--d3d11','VEYRA_UI_RHI','d3d11'),('--basic','QSG_RENDER_LOOP','basic'),('--scene-info','QSG_INFO','1')] if flag in sys.argv})diff --git a/scripts/acceptance/stability-export-priority-perf.qml b/scripts/acceptance/stability-export-priority-perf.qmlindex 7cfb1b2a..781e382d 100644--- a/scripts/acceptance/stability-export-priority-perf.qml+++ b/scripts/acceptance/stability-export-priority-perf.qml@@ -4,13 +4,15 @@ Item {property var config:({})property var appWindow:Window.windowproperty int ticks:0+ property int uiFrames:0property double ready:0function require(v,s){if(!v)throw new Error(s)}Connections {target:veyra;function onNotice(text,error){console.log("REGRESSION_NOTICE",text,error)}}+ Connections {target:probe.appWindow;function onFrameSwapped(){++probe.uiFrames}}Timer {interval:1000;running:true;repeat:true;onTriggered:{try{++probe.ticks;probe.require(probe.ticks<125,"125s deadline")if(probe.ticks===3){- probe.appWindow.width=1280;probe.appWindow.height=800;veyra.nodeMode=0;veyra.muted=true+ probe.appWindow.width=1280;probe.appWindow.height=800;veyra.nodeMode=0;veyra.muted=true;veyra.reducedMotion=probe.config.reducedMotion===trueveyra.displaySync=probe.config.display===0?0:2veyra.nrEnabled=false;veyra.srEnabled=false;veyra.fgEnabled=false;veyra.videoHdr=false;veyra.colorEnabled=false;veyra.lowLatency=falseif(!veyra.nrLayers.length)veyra.addEffect("nr")@@ -20,12 +22,12 @@ Item {probe.require(veyra.setNrLayerParameter(n,p[0],p[1]),p[0])if(probe.config.modern)probe.require(veyra.setNrLayerParameter(n,"correctionEnabled",0),"correction off")veyra.nrEnabled=true- console.log("REGRESSION_CONFIG",JSON.stringify({layers:veyra.nrLayers,nr:veyra.nrEnabled,sr:veyra.srEnabled,fg:veyra.fgEnabled,lowLatency:veyra.lowLatency}))+ console.log("REGRESSION_CONFIG",JSON.stringify({layers:veyra.nrLayers,nr:veyra.nrEnabled,sr:veyra.srEnabled,fg:veyra.fgEnabled,lowLatency:veyra.lowLatency,reducedMotion:veyra.reducedMotion}))veyra.openPath(probe.config.media)}probe.require(!veyra.failed,"engine failed")if(!probe.ready&&veyra.running&&veyra.position>0&&veyra.nrActive)probe.ready=Date.now()- console.log("REGRESSION_SAMPLE",JSON.stringify({tick:probe.ticks,active:probe.appWindow.active,ready:probe.ready>0,position:veyra.position,fps:veyra.submitFps,nr:veyra.nrActive,stages:veyra.stageTimings,total:veyra.chainTotalMs,detail:veyra.runStatusDetail}))+ console.log("REGRESSION_SAMPLE",JSON.stringify({tick:probe.ticks,uiFrames:probe.uiFrames,active:probe.appWindow.active,ready:probe.ready>0,position:veyra.position,fps:veyra.submitFps,nr:veyra.nrActive,stages:veyra.stageTimings,total:veyra.chainTotalMs,detail:veyra.runStatusDetail}))if(probe.ready&&Date.now()-probe.ready>=probe.config.seconds*1000){console.log("REGRESSION_PASS");Qt.quit()}}catch(e){console.error("REGRESSION_FAIL",e.message);Qt.exit(3)}}}}diff --git a/scripts/acceptance/stability-export-priority-quick.py b/scripts/acceptance/stability-export-priority-quick.pynew file mode 100644index 00000000..6d5af2c0--- /dev/null+++ b/scripts/acceptance/stability-export-priority-quick.py@@ -0,0 +1,26 @@+"""Bounded software-rendered tests of the actual staged telemetry component."""+from pathlib import Path+import hashlib,json,os,shutil,subprocess,sys,time+ROOT=Path(__file__).resolve().parents[2];BASE=Path('E:/项目/Veyra');TASK='stability-export-priority-20261006'+label=sys.argv[1];assert label.replace('-','').isalnum()+subprocess.run([sys.executable,'-B',str(ROOT/'scripts/acceptance/stability-export-priority-control.py')],check=True)+app=BASE/'tests'/TASK/label;tmp=BASE/'tmp'/TASK/label;logs=BASE/'logs'/TASK+app.mkdir(parents=True,exist_ok=False);tmp.mkdir(parents=True,exist_ok=False)+shutil.copy2(BASE/'build'/TASK/'standard/veyra_qml_quick_tests.exe',app/'veyra_qml_quick_tests.exe')+shutil.copytree(ROOT/'qml',app/'qml');shutil.copytree(ROOT/'tests/qml/quick',app/'qml-tests')+qt=BASE/'deps/qt/6.8.3/msvc2022_64'+env={k:v for k,v in os.environ.items() if not k.upper().startswith(('VEYRA_','QT_','QSG_'))}+env.update(TEMP=str(tmp),TMP=str(tmp),PATH=str(qt/'bin')+';'+env['PATH'],+ QML_IMPORT_PATH=str(qt/'qml'),QT_PLUGIN_PATH=str(qt/'plugins'),+ QT_QUICK_BACKEND='software',QML_DISABLE_DISK_CACHE='1',QT_FORCE_STDERR_LOGGING='1')+args=[str(app/'veyra_qml_quick_tests.exe'),'-platform','offscreen','-input',str(app/'qml-tests/tst_telemetry.qml')]+begin=time.monotonic();log=logs/(label+'.log')+with log.open('xb') as stream:+ try:rc=subprocess.run(args,cwd=app,env=env,stdout=stream,stderr=subprocess.STDOUT,timeout=120).returncode+ except subprocess.TimeoutExpired:rc=124+body=log.read_text(encoding='utf8',errors='replace')+passed=rc==0 and '0 failed' in body and 'Telemetry::test_frequent_samples' in body+receipt=dict(passed=passed,exit=rc,seconds=time.monotonic()-begin,args=args,softwareOnly=True,+ componentSha256=hashlib.sha256((app/'qml/Veyra/VTelemetryValue.qml').read_bytes()).hexdigest(),log=str(log))+(logs/(label+'.json')).write_text(json.dumps(receipt,ensure_ascii=False,indent=2),encoding='utf8')+print(json.dumps(receipt,ensure_ascii=False));print('\n'.join(body.splitlines()[-22:]));raise SystemExit(0 if passed else 1)diff --git a/scripts/acceptance/stability-export-priority-ui.py b/scripts/acceptance/stability-export-priority-ui.pyindex 0ea0898b..8e0e0e01 100644--- a/scripts/acceptance/stability-export-priority-ui.py+++ b/scripts/acceptance/stability-export-priority-ui.py@@ -6,7 +6,7 @@ label,vendor,case=sys.argv[1:4];assert label.replace('-','').isalnum() and vendoout=BASE/'tests'/TASK/label;tmp=BASE/'tmp'/TASK/label;logs=BASE/'logs'/TASKsubprocess.run([sys.executable,'-B',str(ROOT/'scripts/acceptance/stability-export-priority-control.py')],check=True)out.mkdir(parents=True,exist_ok=False);tmp.mkdir(parents=True,exist_ok=False)-source=BASE/'releases/publish-2.0.4-20261006/packages'/f'Veyra-2.0.4-{vendor}-win64-portable' if case=='before' else BASE/'test-packages'/TASK/f'Veyra-2.0.4-fix2-{vendor}-win64-portable'+source=BASE/'releases/publish-2.0.4-20261006/packages'/f'Veyra-2.0.4-{vendor}-win64-portable' if case in ('before','migration-before') else BASE/'test-packages'/TASK/f'Veyra-2.0.4-fix2-{vendor}-win64-portable'def copy(a,b):p=Path(a)if p.suffix.lower() in ('.dll','.bin','.hsaco','.onnx','.f16','.f32'):@@ -15,20 +15,26 @@ def copy(a,b):return shutil.copy2(a,b)app=out/'app';shutil.copytree(source,app,copy_function=copy,ignore=shutil.ignore_patterns('*.log','logs','user-data-*','*.dmp','*.pdb'))shutil.copy2(ROOT/'scripts/acceptance/stability-export-priority-ui.qml',app/'qml/Veyra/RepairRegression.qml')-conf=dict(catalogOnly=case in ('before','catalog'),before=case=='before',restore=case=='restore',media=(BASE/'tests/perf-matrix/media/M2.mkv').as_posix(),exportMedia=(BASE/'tests/release-2.0.4-20261005/nr-fixture.mp4').as_posix())+conf=dict(case=case,catalogOnly=case in ('before','catalog'),before=case in ('before','migration-before'),restore=case=='restore',media=(BASE/'tests/perf-matrix/media/M2.mkv').as_posix(),exportMedia=(BASE/'tests/release-2.0.4-20261005/nr-fixture.mp4').as_posix())main=app/'qml/Veyra/Main.qml';text=main.read_text(encoding='utf8');at=text.rfind('}')main.write_text(text[:at]+'\nLoader{source:"RepairRegression.qml";onLoaded:item.config='+json.dumps(conf)+'}\n'+text[at:],encoding='utf8')env={k:v for k,v in os.environ.items() if not k.upper().startswith(('VEYRA_','QT_','QSG_'))}env.update(TEMP=str(tmp),TMP=str(tmp),VEYRA_LOG_FILE=str(logs/(label+'-engine.log')),QML_DISABLE_DISK_CACHE='1',QT_FORCE_STDERR_LOGGING='1')(out/'outputs').mkdir()profile=BASE/'tests'/TASK/'gui-fsr-export-second/profile' if case=='restore' else out/'profile'+if case=='telemetry':+ profile.mkdir();(profile/'qml-preferences.v1.json').write_text(json.dumps({'gpuPriority':'normal','overlayCompat':'off'}),encoding='utf8')+if case in ('migration-before','migration','nvidia-keep'):+ shutil.copytree(BASE/'tests'/TASK/'gui-amd-default-seed/profile',profile)+elif case=='xess-keep':+ shutil.copytree(BASE/'tests'/TASK/'gui-amd-default-migrate/profile',profile)args=[str(app/'veyra_qml_ui.exe'),'--data-dir',str(profile),'--page','pro','--size','1280x800','--exit-after','250000','--export-out',str(out/'outputs')]console=logs/(label+'.log');begin=time.monotonic()with console.open('xb') as stream:try:rc=subprocess.run(args,cwd=app,env=env,stdout=stream,stderr=subprocess.STDOUT,timeout=270).returncodeexcept subprocess.TimeoutExpired:rc=124body=console.read_text(encoding='utf8',errors='replace')-passed=rc==0 and ('REPAIR_UI_EXPECTED_OLD' if case=='before' else 'REPAIR_UI_PASS') in body and not any(s in body for s in ('REPAIR_UI_FAIL','ReferenceError:','TypeError:'))+passed=rc==0 and ('REPAIR_UI_EXPECTED_OLD' if conf['before'] else 'REPAIR_UI_PASS') in body and not any(s in body for s in ('REPAIR_UI_FAIL','ReferenceError:','TypeError:'))receipt=dict(passed=passed,exit=rc,seconds=time.monotonic()-begin,case=case,vendorPackage=vendor,actualGpu='RTX5070; missing-NVIDIA-runtime gate reproduction is not AMD hardware validation',exeSHA=hashlib.sha256((app/'veyra_qml_ui.exe').read_bytes()).hexdigest(),config=conf)if case=='export':files=list((out/'outputs').glob('*.mp4'));receipt['outputs']=[]diff --git a/scripts/acceptance/stability-export-priority-ui.qml b/scripts/acceptance/stability-export-priority-ui.qmlindex f79eee4f..6dd5f30d 100644--- a/scripts/acceptance/stability-export-priority-ui.qml+++ b/scripts/acceptance/stability-export-priority-ui.qml@@ -7,18 +7,58 @@ Item {property int phase:0property int readyTick:0property bool exportStarted:false+ property double pausePosition:0+ property int uiFrames:0function require(v,s){if(!v)throw new Error(s)}function preset(){const p=veyra.presets.find(p=>p.name==="FSR repair regression");require(p!==undefined,"saved list preset missing");require(veyra.applyPresetIndex(p.index),"apply preset refused")}function saved(){console.log("REPAIR_UI_SAVED",JSON.stringify({backend:veyra.fgBackendName,multiplier:veyra.fgMultiplier,enabled:veyra.fgEnabled,flow:veyra.flowQuality,content:veyra.contentRate}));require(veyra.fgBackendName==="fsr3"&&veyra.fgMultiplier===2&&veyra.fgEnabled,"FSR saved choice");require(veyra.flowQuality===2&&veyra.contentRate===2,"shared flow saved in list preset")}Connections {target:veyra;function onNotice(text,error){console.log("REPAIR_UI_NOTICE",text,error)}}+ Connections {target:test.appWindow;function onFrameSwapped(){++test.uiFrames}}Timer {interval:300;running:true;repeat:true;onTriggered:{try{++test.ticks;test.require(test.ticks<800,"240s deadline phase="+test.phase)if(test.phase===0){if(test.ticks<10)return+ if(test.config.case==="seed-dlss"){+ veyra.nodeMode=0;veyra.nrEnabled=false;veyra.srEnabled=false+ veyra.fgBackendName="dlss";veyra.fgMultiplier=6;veyra.fgEnabled=true+ test.require(veyra.fgBackendName==="dlss"&&veyra.fgEnabled&&veyra.fgMultiplier===6,"seed live list DLSS 6X")+ veyra.nodeMode=1;veyra.fgBackendName="dlss";veyra.fgMultiplier=4;veyra.fgEnabled=false+ test.require(veyra.nodeMode===1&&veyra.fgBackendName==="dlss","seed inactive node DLSS choice")+ veyra.nodeMode=0;test.require(veyra.fgEnabled&&veyra.fgMultiplier===6,"seed mode roundtrip")+ console.log("REPAIR_UI_PASS");Qt.quit();return+ }+ if(["migration-before","migration","nvidia-keep","xess-keep"].includes(test.config.case)){+ console.log("REPAIR_UI_DEFAULT",test.config.case,veyra.fgBackendName,veyra.fgMultiplier,veyra.fgEnabled,veyra.nodeMode)+ const old=test.config.case==="migration-before"+ const nv=test.config.case==="nvidia-keep"+ const expected=old||nv?"dlss":test.config.case==="xess-keep"?"xess":"fsr3"+ test.require(veyra.nodeMode===0&&veyra.fgBackendName===expected,"restored list backend")+ test.require(veyra.fgMultiplier===(old?1:nv?6:2)&&veyra.fgEnabled===!old,"list multiplier and enabled state")+ veyra.nodeMode=1+ test.require(veyra.nodeMode===1&&veyra.fgBackendName===(old||nv?"dlss":"fsr3"),"inactive node backend restored")+ test.require(!veyra.fgEnabled,"disabled node stage must remain disabled")+ veyra.nodeMode=0+ test.require(veyra.fgBackendName===expected&&veyra.fgEnabled===!old,"list return preserves backend and switch")+ if(test.config.case==="migration"){+ veyra.fgBackendName="xess";test.require(veyra.fgBackendName==="xess"&&veyra.fgMultiplier===2,"manual XeSS choice remains available")+ }+ console.log(old?"REPAIR_UI_EXPECTED_OLD":"REPAIR_UI_PASS");Qt.quit();return+ }if(test.config.restore){test.saved();veyra.flowQuality=0;veyra.contentRate=0;veyra.fgEnabled=falsetest.preset();test.saved();console.log("REPAIR_UI_PASS");Qt.quit();return}+ if(test.config.case==="telemetry"){+ veyra.nodeMode=0;veyra.muted=true;veyra.reducedMotion=false+ veyra.nrEnabled=false;veyra.srEnabled=false;veyra.fgEnabled=false;veyra.videoHdr=false;veyra.colorEnabled=false+ if(!veyra.nrLayers.length)veyra.addEffect("nr")+ test.require(veyra.nrLayers.length===1,"single list NR layer")+ const n=veyra.nrLayers[0].index+ for(const p of [["runtime",3],["sizePolicy",0],["style",0],["total",1],["temporal",0],["antiFlicker",0],["correctionEnabled",0]])+ test.require(veyra.setNrLayerParameter(n,p[0],p[1]),"list NR parameter "+p[0])+ veyra.nrEnabled=true;veyra.displaySync=2+ veyra.openPath(test.config.media);test.phase=10;return+ }veyra.nodeMode=0;veyra.muted=true;veyra.nrEnabled=false;veyra.srEnabled=false;veyra.fgEnabled=falseconsole.log("REPAIR_UI_CATALOG",JSON.stringify(veyra.fgBackendChoices),JSON.stringify(veyra.effectCatalog))const generic=veyra.effectCatalog.find(p=>p.id==="frame-generation")@@ -27,6 +67,7 @@ Item {test.require(generic!==undefined&&fsr!==undefined&&!fsr.disabled,"FSR component available")if(test.config.catalogOnly){test.require(dlss.disabled,"missing NVIDIA runtime is required to reproduce old generic-entry gate")+ if(!test.config.before)test.require(veyra.fgBackendName==="fsr3","missing DLSS provider defaults to FSR before adding")const added=veyra.addEffect("frame-generation")if(test.config.before){test.require(generic.disabled&&added<0,"old gate did not reproduce");console.log("REPAIR_UI_EXPECTED_OLD");Qt.quit();return}test.require(!generic.disabled&&added>=0,"generic FG entry must use any available provider")@@ -43,6 +84,53 @@ Item {if(test.config.catalogOnly){console.log("REPAIR_UI_PASS");Qt.quit();return}veyra.displaySync=2;veyra.outputRateMode=0veyra.openPath(test.config.media);test.phase=1+ }else if(test.phase>=10){+ test.require(!veyra.failed,"telemetry lifecycle player failed")+ const dwell=test.ticks-test.readyTick+ if(test.phase===10){+ if(!veyra.running||!veyra.nrActive||veyra.position<2)return+ if(!test.readyTick)test.readyTick=test.ticks+ if(dwell<10)return+ test.pausePosition=veyra.position;veyra.togglePlayPause();test.phase=11;test.readyTick=test.ticks+ }else if(test.phase===11){+ if(dwell<6)return+ test.require(veyra.paused&&Math.abs(veyra.position-test.pausePosition)<0.2,"pause must retain media position")+ console.log("REPAIR_UI_TELEMETRY","paused",test.uiFrames,JSON.stringify(veyra.stageTimings))+ veyra.togglePlayPause();test.phase=12;test.readyTick=test.ticks+ }else if(test.phase===12){+ if(dwell<10)return+ test.require(!veyra.paused&&veyra.nrActive,"resume NR")+ test.appWindow.showFullScreen();test.phase=13;test.readyTick=test.ticks+ }else if(test.phase===13){+ if(dwell<10)return+ test.require(veyra.nrActive,"fullscreen NR")+ test.appWindow.showNormal();veyra.seekTo(12);test.phase=14;test.readyTick=test.ticks+ }else if(test.phase===14){+ if(dwell<10||veyra.position<12)return+ test.appWindow.page="node";test.require(veyra.nodeMode===1,"node page mode")+ const i=veyra.addEffect("nr");test.require(i>=0,"add node NR")+ for(const p of [["runtime",3],["sizePolicy",0],["temporal",0],["antiFlicker",0],["correctionEnabled",0]])+ test.require(veyra.setNrLayerParameter(i,p[0],p[1]),"node NR parameter "+p[0])+ const node=veyra.chain.find(p=>p.index===i)+ test.require(node!==undefined&&veyra.insertNodeAfter(node.id,0),"connect NR between input and output")+ test.phase=15;test.readyTick=test.ticks+ }else if(test.phase===15){+ if(dwell<12||!veyra.nrActive)return+ console.log("REPAIR_UI_TELEMETRY","node",JSON.stringify(veyra.nodeTimings),JSON.stringify(veyra.nodeConnections))+ veyra.nodeMode=0;test.appWindow.page="pro";test.phase=16;test.readyTick=test.ticks+ }else if(test.phase===16){+ if(dwell<10||!veyra.nrActive)return+ test.require(veyra.nrLayers.length===1&&veyra.nrLayers[0].runtime===3&&!veyra.fgEnabled&&!veyra.srEnabled,"list configuration survives mode roundtrip")+ veyra.reducedMotion=true;test.phase=17;test.readyTick=test.ticks+ }else if(test.phase===17){+ if(dwell<5)return+ test.require(veyra.reducedMotion&&veyra.nrActive,"reduced-motion switch preserves NR")+ veyra.stopPlayback();test.phase=18;test.readyTick=test.ticks+ }else if(test.phase===18){+ if(dwell<5)return+ test.require(!veyra.running,"stop must finish")+ console.log("REPAIR_UI_PASS");Qt.quit()+ }}else if(test.phase===1){test.require(!veyra.failed,"FSR preview failed "+veyra.runStatus)if(!veyra.running||veyra.position<2)returndiff --git a/src/ui/QmlPlayerBridge.cpp b/src/ui/QmlPlayerBridge.cppindex 04e200bf..27e2ae2f 100644--- a/src/ui/QmlPlayerBridge.cpp+++ b/src/ui/QmlPlayerBridge.cpp@@ -2,6 +2,7 @@#include "veyra/gfx/PresentSink.h"#include <QElapsedTimer>#include "veyra/ui/EffectAvailability.h"+#include "veyra/engine/FrameGenerationSelection.h"#include "veyra/ui/QmlExportQueueModel.h"#include "veyra/ui/UiLanguage.h"#include <QQmlEngine>@@ -494,8 +495,8 @@ struct QmlPlayerBridge::Impl {if(desc.VendorId==0x1002||desc.VendorId==0x8086){initial.opticalFlowBackend=engine::OpticalFlowBackend::AmdFidelityFx;initial.videoSrQuality=engine::kVideoSrFsr;- initial.frameGenerationBackend=engine::FrameGenerationBackend::Fsr;}+ initial.frameGenerationBackend=engine::defaultFrameGenerationBackend(desc.VendorId);facade.setPending(initial);veyra::log::info("nr-default",std::format("adapter={} selected={}",utf8Of(std::wstring(desc.Description)).toStdString(),engine::nrRuntimeName(initial.nrRuntime)));break;@@ -925,8 +926,23 @@ static QString unavailableEffects(const engine::EnhancementSettings& settings) {}static QString disableUnavailableEffects(engine::ChainConfiguration& configuration) {const auto caps = currentEffectCapabilities();+ const auto available = [&](const char* id) { return caps.value(id).toMap().value("available").toBool(); };+ const engine::FrameGenerationAvailability fgAvailable{+ available("dlss"),available("xess"),available("fsr3"),available("fsr4"),available("vfg")};QStringList reasons;const auto sanitize = [&](engine::EffectChain& chain, engine::ChainGlobalSettings& globals) {+ // Also migrate disabled stages: keeping an unavailable DLSS selection+ // left the AMD dropdown at DLSS even though a fresh profile chose FSR.+ const auto savedBackend = globals.fgBackend;+ globals.fgBackend = engine::restoredFrameGenerationBackend(savedBackend,fgAvailable);+ if (globals.fgBackend != savedBackend) {+ if (engine::fsrFrameGeneration(globals.fgBackend)) chain.fgMultiplier=2;+ else if (globals.fgBackend==engine::FrameGenerationBackend::XeSS)+ chain.fgMultiplier=normalizeFgMultiplier(chain.fgMultiplier,globals.fgBackend,2);+ else chain.fgMultiplier=normalizeFgMultiplier(chain.fgMultiplier,globals.fgBackend,6);+ veyra::log::warn("fg-default",std::format("unavailable saved backend={} selected={} rememberedMultiplier={} enabled flags preserved",+ engine::frameGenerationBackendName(savedBackend),engine::frameGenerationBackendName(globals.fgBackend),chain.fgMultiplier));+ }for (uint32_t i = 0; i < chain.nodeCount; ++i) {auto& node = chain.nodes[i];QString id;@@ -1048,6 +1064,7 @@ QmlPlayerBridge::QmlPlayerBridge(engine::EngineController& engine, std::filesystconst auto migrationNotice = uiText(impl_->facade.error());if (!migrationNotice.isEmpty())QTimer::singleShot(0, this, [this, migrationNotice] { emit notice(migrationNotice, false); });+ const auto savedConfiguration = restored;QStringList disabled;for (auto& configuration : restored.configurations) {const auto reason = disableUnavailableEffects(configuration);@@ -1063,7 +1080,10 @@ QmlPlayerBridge::QmlPlayerBridge(engine::EngineController& engine, std::filesystconfiguration.apply(settings);const auto previous = impl_->facade.pendingSettings();if (settings.validate().empty() && impl_->facade.applySettings(settings,engine::runtimeOrder(configuration.chain))) {- impl_->session = impl_->savedSession = restored;+ impl_->session = restored;+ // Persist a repaired backend as well as the active mode. Otherwise+ // every restart reloads the unavailable DLSS value again.+ impl_->savedSession = savedConfiguration;impl_->restoreConfiguration(configuration);impl_->options = engine::PlayerOptions::from(settings,engine::runtimeOrder(impl_->activeRuntime()));impl_->revalidate();@@ -1360,12 +1380,8 @@ QmlPlayerBridge::QmlPlayerBridge(engine::EngineController& engine, std::filesyst: tr("上次采集时显卡设备丢失");emit notice(head + QStringLiteral(";") + advice, true);});- // A saved FSR 4 ML choice on a non-AMD GPU crashed at the first open; move it on.- if (settings().frameGenerationBackend == engine::FrameGenerationBackend::Fsr4 && !fsr4Possible()) {- auto s = settings();- s.frameGenerationBackend = primaryGpuVendor() == 0x10DE ? engine::FrameGenerationBackend::Dlss : engine::FrameGenerationBackend::Fsr;- if (impl_->commit(s)) veyra::log::warn("fg-backend", "saved FSR 4 ML frame generation needs an AMD RX 9000; switched for this GPU");- }+ // Unsupported saved FG choices were repaired together with both modes+ // above, using actual provider availability rather than a brand alone.}QmlPlayerBridge::~QmlPlayerBridge() {diff --git a/tests/qml/quick/tst_telemetry.qml b/tests/qml/quick/tst_telemetry.qmlnew file mode 100644index 00000000..ce08e942--- /dev/null+++ b/tests/qml/quick/tst_telemetry.qml@@ -0,0 +1,70 @@+import QtQuick+import QtTest+import Veyra++Item {+ VTelemetryValue { id: motion; duration: 120 }+ SignalSpy { id: changes; target: motion; signalName: "valueChanged" }+ Timer {+ id: samples+ interval: 10+ repeat: true+ property int sequence: 0+ onTriggered: { ++sequence; motion.targetValue = sequence % 2 ? 0.7 : 0.9 }+ }+ TestCase {+ name: "Telemetry"+ when: windowShown+ function init() {+ samples.stop()+ samples.sequence = 0+ motion.animate = false+ motion.targetValue = 0+ motion.duration = 120+ motion.animate = true+ changes.clear()+ }+ function cleanup() { samples.stop(); motion.animate = false }+ function test_converges_and_retargets() {+ motion.targetValue = 1+ wait(50)+ verify(motion.value > 0 && motion.value < 1)+ motion.targetValue = 0.2+ tryCompare(motion, "value", 0.2, 400)+ verify(!motion.driver.running)+ motion.targetValue = 0.8+ tryCompare(motion, "value", 0.8, 400)+ }+ function test_frequent_samples_progress_without_display_rate_animation() {+ samples.start()+ wait(700)+ samples.stop()+ verify(motion.value > 0.5, "frequent readings must not postpone every animation tick")+ verify(changes.count > 5 && changes.count < 35,+ "telemetry must progress without a change on every high-refresh display tick: " + changes.count)+ motion.targetValue = 0.75+ tryCompare(motion, "value", 0.75, 400)+ }+ function test_hidden_or_reduced_motion_snaps_and_stops() {+ motion.targetValue = 0.9+ wait(40)+ motion.animate = false+ compare(motion.value, 0.9)+ verify(!motion.driver.running)+ motion.targetValue = 0.1+ compare(motion.value, 0.1)+ motion.animate = true+ motion.targetValue = 0.7+ tryCompare(motion, "value", 0.7, 400)+ }+ function test_zero_duration_during_animation() {+ motion.targetValue = 1+ wait(40)+ motion.duration = 0+ compare(motion.value, 1)+ verify(!motion.driver.running)+ motion.targetValue = 0.3+ compare(motion.value, 0.3)+ }+ }+}diff --git a/tests/unit/RepairContractTests.cpp b/tests/unit/RepairContractTests.cppindex 93902c83..91f323c4 100644--- a/tests/unit/RepairContractTests.cpp+++ b/tests/unit/RepairContractTests.cpp@@ -1,4 +1,5 @@#include "veyra/engine/EnhancementSettings.h"+#include "veyra/engine/FrameGenerationSelection.h"#include "veyra/engine/BackendRecovery.h"#include "veyra/diagnostics/DiagnosticEvent.h"#include "veyra/diagnostics/FrameMetrics.h"@@ -596,5 +597,25 @@ int main(){VirtualFree(page,0,MEM_RELEASE);}}+ {+ using F=engine::FrameGenerationBackend;+ check(engine::defaultFrameGenerationBackend(0x1002)==F::Fsr,"AMD fresh session prefers FSR");+ check(engine::defaultFrameGenerationBackend(0x8086)==F::Fsr,"Intel fresh session prefers FSR");+ check(engine::defaultFrameGenerationBackend(0x10DE)==F::Dlss,"NVIDIA fresh session retains DLSS default");+ const engine::FrameGenerationAvailability crossVendor{false,true,true,false,false};+ check(engine::restoredFrameGenerationBackend(F::Dlss,crossVendor)==F::Fsr,"unavailable saved DLSS moves to FSR ahead of XeSS");+ check(engine::restoredFrameGenerationBackend(F::Vfg,crossVendor)==F::Fsr,"unavailable NVIDIA VFG moves to cross-vendor FSR");+ check(engine::restoredFrameGenerationBackend(F::XeSS,crossVendor)==F::XeSS,"usable manual XeSS choice is retained");+ check(engine::restoredFrameGenerationBackend(F::Fsr,crossVendor)==F::Fsr,"usable manual FSR choice is retained");+ const engine::FrameGenerationAvailability xessOnly{false,true,false,false,false};+ check(engine::restoredFrameGenerationBackend(F::Dlss,xessOnly)==F::XeSS,"XeSS remains usable when the FSR provider is missing");+ const engine::FrameGenerationAvailability noProvider{};+ check(engine::restoredFrameGenerationBackend(F::Dlss,noProvider)==F::Dlss,"missing all providers never pretends a fallback exists");+ const engine::FrameGenerationAvailability nvidia{true,true,true,false,true};+ check(engine::restoredFrameGenerationBackend(F::Dlss,nvidia)==F::Dlss,"available NVIDIA DLSS is never replaced");+ check(engine::restoredFrameGenerationBackend(F::Vfg,nvidia)==F::Vfg,"available manual VFG is never replaced");+ const engine::FrameGenerationAvailability ml{false,true,true,true,false};+ check(engine::restoredFrameGenerationBackend(F::Fsr4,ml)==F::Fsr4,"supported manually selected FSR4 remains FSR4");+ }std::cout<<checks<<" checks "<<failures<<" failures\n";return failures?1:0;}