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++

perf: verify native migrations and real provider fallback for compute graphs

Veyra Goal Agentcefbaec68271
diff --git a/docs/PERF_3C_GRAPH_NORMAL_2026-10-05.md b/docs/PERF_3C_GRAPH_NORMAL_2026-10-05.md
index 13f476bc..b91c1230 100644
--- a/docs/PERF_3C_GRAPH_NORMAL_2026-10-05.md
+++ b/docs/PERF_3C_GRAPH_NORMAL_2026-10-05.md
@@ -24,3 +24,13 @@ COMPUTE普通增强区间中位降低8.93%(2X)/7.66%(3X)。这不是纯
队列只在排空后的图重建切换:先创建替代allocator/list/timestamp资源,成功后排空旧队列再交换,保留同一fence递增值。失败保留旧DIRECT,不能降为无效果伪装成功;回到DIRECT失败则旧配置恢复或停止报告。队列变化驱逐最近图,单NR缓存/预热仍走原DIRECT,不破坏已保留优化。修正discardRecording失败重建列表时固定DIRECT的类型错误。定向native逐帧全图/PTS测试包含4次往返、十项不兼容准入及队列创建失败回退,真实Qt再检查后端切换;尚未执行结果不标通过。
构建v1/v3通过。v2新增fixture误写不存在的Fsr3枚举导致编译失败,改为既有Fsr;日志build-queue-admission-v2.log保留。新增测试只在E盘隔离profile和产物运行,无压力或用户应用修改。
+
+## 队列迁移与真实UI结果
+
+`nr-queue-migration.py B2d B3c-migration-v1`九组(DIRECT / 自动 / 注入创建失败,各三次)通过,864真实+414生成=1278完整图像SHA/尺寸/PTS逐行一致,A-A差异0;每个自动进程四次队列往返,fence严格递增(最终453),D3D12 debug错误/设备移除0。十项不兼容准入检查各进程通过。注入E_OUTOFMEMORY只验证错误分支,不冒充真实资源耗尽或设备移除试验;没有制造显存压力。
+
+真实Qt:FSR3.1 `B3c-queue-ui-v3-fsr3/phase-review.json`、XeSS `B3c-queue-ui-v4-xess/result.json`、VFG `B3c-queue-ui-v5-vfg/result.json`通过。每组八个已稳定增强阶段的实际队列为COMPUTE、DIRECT、COMPUTE、DIRECT、DIRECT、COMPUTE、DIRECT、COMPUTE,覆盖DLSS2→其他provider→DLSS3→FG关闭→调色开启/关闭→时域开启/关闭和停止。全部NR/SR/FG效果真实启用,结束没有SDK/debug/退出错误。单NR预热/缓存没有改变准入,完整R0仍待。
+
+保留失败证据:v1脚本把UI后端写成fsr(实际是fsr3),退出后脚本仍改设置,引发创建swapchain失败和退出时C0000005;修正断言终止后没有复现崩溃,但退出/重建竞态列R0,不当成已修复。v2/v4-VFG断言在相邻两次重建尚未完全出生成帧时过早检查FG,改为等待实际3X/稳定有效状态,18秒硬超时不掩盖永久失败。v3-FSR原收据按固定七次队列变化误判:两个UI请求中间实际有一次合法COMPUTE图,共九次变化;保留原false收据,新增phase-review独立按已稳定阶段审核,全部八阶段队列正确。未删除/重写原始日志或收据。该回归不证明切换无停顿,重建仍有约1.6–1.9秒成本。
+
+结论:保留限定准入的自动COMPUTE,约8%的增强区间收益仅限已测组合;HIGH不作为默认,其他设备/组合仍DIRECT。源码逐节点存档,R0最终产品回归未完成。
diff --git a/docs/PERF_EXECUTION_NR_2026-10-04.md b/docs/PERF_EXECUTION_NR_2026-10-04.md
index 2db12414..8efadd26 100644
--- a/docs/PERF_EXECUTION_NR_2026-10-04.md
+++ b/docs/PERF_EXECUTION_NR_2026-10-04.md
@@ -40,7 +40,7 @@
| 3b | NR自动内部尺寸 | pending | 取决于E1、真实预算/画质证据 |
| 1b | 内容帧率预算 | rejected-prerequisite | 1a画面不成立,完整求值仍按transport次数;实测成本构造预算反例,PERF_1B_CONTENT_BUDGET;无生产改动 |
| 1c | 重复节奏预测 | rejected | 三种节奏单像素瞬态反例均漏第49帧且后续未检测;PERF_1C_CADENCE_REJECTION;无产品代码需回退 |
-| 3c | 队列分工/呈现优先级 | in-progress-normal-gain | 完整Graph24组2502输出/PTS一致/debug0;普通负载18组,COMPUTE普通增强21.386→19.477ms(2X)/23.330→21.542ms(3X),约8.93/7.66%,源跳过0;呈现P99无明显改善、3X过期3→4/4/5,仍有长帧;HIGH拒绝默认,生产迁移/回退待;PERF_3C_GRAPH_NORMAL_2026-10-05 |
+| 3c | 队列分工/呈现优先级 | retained-limited-pending-R0 | 普通负载18组,增强21.386→19.477ms(2X)/23.330→21.542ms(3X);准入仅已测5070双NR+SR4K+DLSS2/3文件图;9组往返1278全图/PTS一致/debug0、真实Qt FSR/XeSS/VFG/调色/时域回退通过;源跳过0但长帧仍在,HIGH拒绝默认;PERF_3C_GRAPH_NORMAL_2026-10-05 |
| 5b | 文件/导出跨帧并行 | pending | 保留源帧/PTS/flow依赖,不扩大实时延迟 |
| 4a | 多NR整链低分辨率调度 | pending | 保留每层残差参数;先测同尺寸与一致性 |
| 4b | 先粗后细组合 | pending | 核对现有逐层尺寸;不新增强制预设 |
@@ -54,4 +54,4 @@
基线驱动 `nr-series.py A` 已完成M1/S1、S2-720、S3、S4、S5-existing各三轮、稳态50秒;每个产品进程和驱动有270/280/299秒上限。1280×800窗口、真实GPU timestamp及CPU提交统计,不将16ms UI Timer当渲染FPS。现有UI没有精确50%档位,S2明确为1280×720(1080p输入维度66.7%、像素44.4%)。多层先粗后细已有逐层尺寸参数,S5核对现有行为,不计为新收益。
-2a核心复用、2c单NR缓存、2d空闲预热、5c暂停复用已保留,3a提供用户可选进程优先级且普通默认,均待R0最终产品回归。1a/1c、依赖它们的1b、2b后台创建及SR缓存扩展均拒绝,证据保留。3c完整处理图正确性通过,18组普通负载确认约8%的增强区间收益,默认仍DIRECT直至生产队列迁移/后端回退验收;HIGH未改善呈现。5a/3b/5b/4a/4b/UI/R0仍待,不能将局部耗时或暂停GPU改善冒充整个方案收益。
+2a核心复用、2c单NR缓存、2d空闲预热、5c暂停复用已保留,3a提供用户可选进程优先级且普通默认,均待R0最终产品回归。1a/1c、依赖它们的1b、2b后台创建及SR缓存扩展均拒绝,证据保留。3c已保留限定准入的自动COMPUTE,18组普通负载约8%增强区间收益、9组迁移完整画面及真实三provider切换回归通过;其他组合DIRECT,HIGH不默认。5a/3b/5b/4a/4b/UI/R0仍待,不能将局部耗时或暂停GPU改善冒充整个方案收益。
diff --git a/docs/WORKLOG.md b/docs/WORKLOG.md
index 1c680e82..4e924de2 100644
--- a/docs/WORKLOG.md
+++ b/docs/WORKLOG.md
@@ -8274,3 +8274,6 @@ build-priority-load-v1 2步exit0。本轮三NR竞争fixture SHA a46c2923ab4b7a20
# 2026-10-05 3c生产队列准入候选
before 6bc2a33 / checkpoint/perf-nr-3c-queue-admission-before-20261004。PreviewGpuSession增加限定本机已验双NR+SR4K+DLSS2/3X文件图的自动COMPUTE,其余保留DIRECT;CommandSlotRing事务换队列保留递增fence、错误保留旧资源,最近缓存只在实际换队列时驱逐;所有呈现仍普通DIRECT。Engine重建/旧配置恢复接入,采集/图片禁自动。修正discardRecording错误恢复的list类型。build-queue-admission-v1/v3通过;v2测试枚举Fsr3笔误编译失败、改既有Fsr,失败证据保留E:/项目/Veyra/logs/perf-nr-20261004。将执行native9组往返/全图/PTS/错误回退和真实Qt后端切换,未执行不标验收通过。
+# 2026-10-05 3c限定准入保留
+
+native nr-queue-migration.py B2d B3c-migration-v1九组通过,1278完整输出/PTS一致,自动每进程四次往返、fence递增,debug/移除0,创建失败注入返回DIRECT保持效果。Qt真实FSR3.1、XeSS、VFG、调色、时域NR往返/停止均通过:E:/项目/Veyra/logs/perf-nr-20261004/B3c-queue-ui-v3-fsr3/phase-review.json、v4-xess/result.json、v5-vfg/result.json。脚本枚举、过早断言及固定队列次数误判均保留原失败收据并按实际稳定阶段修正;v1退出后脚本继续改设置触发退出崩溃列R0,不能宣称已修复。详PERF_3C_GRAPH_NORMAL_2026-10-05。限定本机已测文件组合保留自动COMPUTE约8%收益,HIGH不默认,R0及其他组合验证待;无压力/用户配置/主线修改。
diff --git a/scripts/perf/nr-queue-ui-review.py b/scripts/perf/nr-queue-ui-review.py
new file mode 100644
index 00000000..0b493853
--- /dev/null
+++ b/scripts/perf/nr-queue-ui-review.py
@@ -0,0 +1,17 @@
+"""Review preserved UI evidence by actual settled phases, retaining old receipts."""
+from pathlib import Path
+from datetime import datetime
+import json,re,sys
+BASE=Path('E:/项目/Veyra/logs/perf-nr-20261004')
+for name in sys.argv[1:]:
+ assert name.replace('-','').isalnum();folder=BASE/name
+ receipt=json.loads((folder/'result.json').read_text(encoding='utf-8'));log=(folder/'player.log').read_text(encoding='utf-8',errors='replace')
+ phases=[json.loads(line.split('QUEUE_UI_PHASE ',1)[1]) for line in log.splitlines() if 'QUEUE_UI_PHASE ' in line]
+ lines=[line for line in log.splitlines() if '[graph-queue] selected=' in line]
+ changes=[(datetime.fromisoformat(line.split()[0].replace('Z','+00:00')).timestamp()*1000,re.search(r'selected=(COMPUTE|DIRECT)',line)[1]) for line in lines]
+ actual=[next((queue for at,queue in reversed(changes) if at<=phase['at']),None) for phase in phases[1:]]
+ expected=['COMPUTE','DIRECT','COMPUTE','DIRECT','DIRECT','COMPUTE','DIRECT','COMPUTE']
+ passed=receipt['exitCode']==0 and 'QUEUE_UI_PASS' in log and len(phases)==9 and actual==expected and not any(s in log for s in ('QUEUE_UI_FAIL','[ERROR]','[FATAL]','ReferenceError:','TypeError:','leaked parameter block'))
+ result={'originalReceipt':str(folder/'result.json'),'originalPassed':receipt['passed'],'phases':phases,'queueChanges':changes,'steadyPhaseQueues':actual,'expectedPhaseQueues':expected,'passed':passed,'reason':'Two separate UI requests may create an intermediate compatible graph; audit the queue at every settled phase, not a fixed global change count. Original receipt/log unmodified.'}
+ with (folder/'phase-review.json').open('x',encoding='utf-8') as stream:json.dump(result,stream,ensure_ascii=False,indent=2)
+ print(name,passed,actual,flush=True);assert passed
diff --git a/scripts/perf/nr-queue-ui.py b/scripts/perf/nr-queue-ui.py
new file mode 100644
index 00000000..f902f4ce
--- /dev/null
+++ b/scripts/perf/nr-queue-ui.py
@@ -0,0 +1,38 @@
+"""Actual UI provider switches, all ordinary playback; no GPU competitor."""
+from pathlib import Path
+from datetime import datetime
+import importlib.util,json,os,re,shutil,subprocess,sys,time
+ROOT=Path(__file__).resolve().parents[2];BASE=Path('E:/项目/Veyra');TASK='perf-nr-20261004'
+spec=importlib.util.spec_from_file_location('matrix',ROOT/'scripts/perf/nr-matrix.py');matrix=importlib.util.module_from_spec(spec);spec.loader.exec_module(matrix)
+variant,label=sys.argv[1:3];backends=sys.argv[3:] or ['fsr3','xess','vfg'];assert all(b in ('fsr3','xess','vfg') for b in backends)
+matrix.assert_gpu_tests_idle();app=BASE/'tests'/TASK/(label+'-app');assert not app.exists()
+shutil.copytree(BASE/'test-packages'/TASK/'Veyra-2.0.3-perf-baseline-A-NVIDIA-win64-portable',app,copy_function=matrix.copy_dependency)
+shutil.copy2(BASE/'build'/TASK/variant/'veyra_qml_ui.exe',app/'veyra_qml_ui.exe');shutil.copytree(ROOT/'qml',app/'qml',dirs_exist_ok=True)
+shutil.copy2(ROOT/'scripts/perf/nr-queue-ui.qml',app/'qml/Veyra/QueueUiProbe.qml')
+main=app/'qml/Veyra/Main.qml';original=main.read_text(encoding='utf-8');at=original.rfind('}')
+main.write_text(original[:at]+'\n Loader{source:"QueueUiProbe.qml";onLoaded:{const r=new XMLHttpRequest();r.open("GET","'+(app/'queue-run.json').as_uri()+'",false);r.send();const c=JSON.parse(r.responseText);item.media=c.media;item.backend=c.backend}}\n'+original[at:],encoding='utf-8')
+results=[]
+for backend in backends:
+ matrix.assert_gpu_tests_idle();name=f'{label}-{backend}';out=BASE/'logs'/TASK/name;profile=BASE/'tests'/TASK/name/'profile';tmp=BASE/'tmp'/TASK/name
+ for path in (out,profile,tmp):path.mkdir(parents=True,exist_ok=False)
+ (profile/'qml-preferences.v1.json').write_text(json.dumps({'overlayCompat':'off','gpuPriority':'normal','prewarmEnhancement':False}),encoding='utf-8')
+ (app/'queue-run.json').write_text(json.dumps({'media':str(matrix.SOURCES['M1']).replace('\\','/'),'backend':backend}),encoding='utf-8')
+ env=os.environ.copy()
+ for key in tuple(env):
+ if key.upper().startswith(('VEYRA_','QT_QUICK_BACKEND','QSG_RHI_BACKEND')):env.pop(key)
+ env.update(TEMP=str(tmp),TMP=str(tmp),VEYRA_LOG_FILE=str(out/'player.log'),QML_DISABLE_DISK_CACHE='1',QT_FORCE_STDERR_LOGGING='1',QML_XHR_ALLOW_FILE_READ='1',VEYRA_VERBOSE_FRAME_LOGS='1')
+ command=[str(app/'veyra_qml_ui.exe'),'--data-dir',str(profile),'--page','pro','--size','1280x800','--exit-after','110000'];print('START',name,flush=True);start=time.monotonic()
+ with (out/'console.log').open('xb') as stream:
+ try:rc=subprocess.run(command,cwd=app,env=env,stdout=stream,stderr=subprocess.STDOUT,timeout=120).returncode
+ except subprocess.TimeoutExpired:rc=124
+ log=(out/'player.log').read_text(encoding='utf-8',errors='replace');phases=[json.loads(line.split('QUEUE_UI_PHASE ',1)[1]) for line in log.splitlines() if 'QUEUE_UI_PHASE ' in line]
+ queues=[line for line in log.splitlines() if '[graph-queue]' in line or 'queue-rebind type=' in line]
+ selected=re.findall(r'\[graph-queue\] selected=(COMPUTE|DIRECT)',log)
+ expected=['COMPUTE','DIRECT','COMPUTE','DIRECT','DIRECT','COMPUTE','DIRECT','COMPUTE']
+ changes=[(datetime.fromisoformat(line.split()[0].replace('Z','+00:00')).timestamp()*1000,re.search(r'selected=(COMPUTE|DIRECT)',line)[1]) for line in queues if 'selected=' in line]
+ actual=[next((queue for at,queue in reversed(changes) if at<=phase['at']),None) for phase in phases[1:]]
+ passed=rc==0 and 'QUEUE_UI_PASS' in log and len(phases)==9 and actual==expected and not any(s in log for s in ('QUEUE_UI_FAIL','[ERROR]','[FATAL]','ReferenceError:','TypeError:','leaked parameter block'))
+ result={'name':name,'backend':backend,'command':command,'exitCode':rc,'wallSeconds':time.monotonic()-start,'exeSha256':matrix.digest(app/'veyra_qml_ui.exe'),'runtimeSha256':matrix.digest(app/'runtime/experimental/nvngx_dlssnr.dll'),'phases':phases,'queueLines':queues,'actualQueues':selected,'steadyPhaseQueues':actual,'expectedPhaseQueues':expected,'passed':passed,'extraGpuLoad':False}
+ (out/'result.json').write_text(json.dumps(result,ensure_ascii=False,indent=2),encoding='utf-8');results.append(result);print('RESULT',name,passed,selected,flush=True)
+ if not passed:print('\n'.join(s for s in log.splitlines() if 'QUEUE_UI_' in s or '[ERROR]' in s or '[graph-queue]' in s or 'backend-recovery' in s)[-6500:],flush=True);raise SystemExit(1)
+(BASE/'logs'/TASK/(label+'-summary.json')).write_text(json.dumps(results,ensure_ascii=False,indent=2),encoding='utf-8');print('QUEUE_UI_COMPLETE',len(results),flush=True)
diff --git a/scripts/perf/nr-queue-ui.qml b/scripts/perf/nr-queue-ui.qml
new file mode 100644
index 00000000..7ab05b57
--- /dev/null
+++ b/scripts/perf/nr-queue-ui.qml
@@ -0,0 +1,36 @@
+import QtQuick
+Item {
+ id: probe
+ property string media: ""
+ property string backend: "fsr3"
+ property int stage: 0
+ property double began: Date.now()
+ property double phaseAt: 0
+ function require(ok,why){if(!ok){console.log("QUEUE_UI_FAIL",why,veyra.diagnosticsReport());Qt.exit(3);throw new Error("QUEUE_UI_FAIL: "+why)}}
+ function mark(name){console.log("QUEUE_UI_PHASE",JSON.stringify({name:name,backend:veyra.fgBackendName,at:Date.now(),position:veyra.position,nr:veyra.nrActive,sr:veyra.srActive,fg:veyra.fgActive,detail:veyra.runStatusDetail}));phaseAt=Date.now();++stage}
+ Timer {
+ interval: 200;running: true;repeat: true
+ onTriggered: {
+ require(Date.now()-probe.began<100000,"timeout");require(!veyra.failed,"engine failure")
+ if(probe.stage===0){
+ veyra.muted=true;veyra.lowLatency=false;veyra.colorEnabled=false;veyra.videoHdr=false
+ veyra.nrEnabled=true;veyra.srEnabled=true;veyra.videoSrQuality=0;veyra.srTargetIndex=2
+ while(veyra.nrLayers.length<2)require(veyra.duplicateNrLayer(veyra.nrLayers[0].index)>=0,"duplicate")
+ for(let i=0;i<2;++i){require(veyra.setNrLayerParameter(veyra.nrLayers[i].index,"runtime",0),"runtime");require(veyra.setNrLayerParameter(veyra.nrLayers[i].index,"sizePolicy",0),"size");require(veyra.setNrLayerParameter(veyra.nrLayers[i].index,"temporal",0),"temporal")}
+ veyra.fgBackendName="dlss";veyra.fgMultiplier=2;veyra.fgEnabled=true;veyra.openPath(probe.media);probe.mark("open");return
+ }
+ require(Date.now()-probe.phaseAt<18000,"phase did not settle")
+ if(veyra.applying||!veyra.running||veyra.position<1||Date.now()-probe.phaseAt<2200||!veyra.nrActive||!veyra.srActive)return
+ if(probe.stage===1){if(!veyra.fgActive)return;probe.mark("dlss2-active");veyra.fgBackendName=probe.backend;veyra.fgMultiplier=2;return}
+ if(probe.stage===2){if(!veyra.fgActive||veyra.fgBackendName!==probe.backend)return;probe.mark(probe.backend+"-active");veyra.fgBackendName="dlss";veyra.fgMultiplier=3;return}
+ if(probe.stage===3){if(!veyra.fgActive||veyra.fgBackendName!=="dlss"||veyra.fgMultiplier!==3||veyra.runStatusDetail.indexOf("3X")<0)return;probe.mark("dlss3-active");veyra.fgEnabled=false;return}
+ if(probe.stage===4){if(veyra.fgActive)return;probe.mark("fg-off");veyra.fgEnabled=true;veyra.colorEnabled=true;return}
+ if(probe.stage===5){if(!veyra.fgActive||!veyra.colorEnabled)return;probe.mark("color-active");veyra.colorEnabled=false;return}
+ if(probe.stage===6){if(!veyra.fgActive||veyra.colorEnabled)return;probe.mark("color-off");require(veyra.setNrLayerParameter(veyra.nrLayers[0].index,"temporal",1),"temporal on");return}
+ if(probe.stage===7){if(!veyra.fgActive||!veyra.nrLayers[0].temporal)return;probe.mark("temporal-active");require(veyra.setNrLayerParameter(veyra.nrLayers[0].index,"temporal",0),"temporal off");return}
+ if(probe.stage===8){if(!veyra.fgActive||veyra.nrLayers[0].temporal)return;probe.mark("temporal-off");veyra.stopPlayback();return}
+ if(probe.stage===9&&!veyra.running){console.log("QUEUE_UI_PASS",probe.backend);Qt.quit()}
+ }
+ }
+ Timer {interval:200;running:true;repeat:true;onTriggered:if(probe.stage===9&&!veyra.running){console.log("QUEUE_UI_PASS",probe.backend);Qt.quit()}}
+}