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

test(perf): record prefetch memory and separate calibrated trace runs

Veyra Goal Agent1efd3443224e
diff --git a/scripts/perf/nr-export-pipeline.py b/scripts/perf/nr-export-pipeline.py
index 8fc9a018..a3da9003 100644
--- a/scripts/perf/nr-export-pipeline.py
+++ b/scripts/perf/nr-export-pipeline.py
@@ -4,7 +4,7 @@ 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,mode=sys.argv[1:4];groups=sys.argv[4:] or ['none4k','nr','nr2','nrsr4k','sr8k']
-assert mode in ('default','serial','events','async','async-events','prefetch','interleaved','default-interleaved','prefetch-interleaved','all')
+assert mode in ('default','serial','events','async','async-events','prefetch','prefetch-trace','interleaved','default-interleaved','prefetch-interleaved','all')
assert all(g in ('none4k','nr','nr2','sr4k','nrsr4k','sr8k','fg2') for g in groups)
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)
@@ -16,7 +16,7 @@ results=[]
for group in groups:
source=BASE/'tests/perf-matrix/media/M2.mkv' if group in ('none4k','sr8k') else matrix.SOURCES['M1']
config='none' if group=='none4k' else group;frames=60 if group=='sr8k' else 120
- for repeat in range(1,4):
+ for repeat in (range(1,2) if mode=='prefetch-trace' else range(1,4)):
modes=(('default','prefetch') if repeat%2 else ('prefetch','default')) if mode=='prefetch-interleaved' else (('serial','default') if repeat%2 else ('default','serial')) if mode=='default-interleaved' else (('serial','async') if repeat%2 else ('async','serial')) if mode=='interleaved' else (('serial','events','async','async-events') if repeat%2 else ('async-events','async','events','serial')) if mode=='all' else (mode,)
for current in modes:
matrix.assert_gpu_tests_idle();name=f'{label}-{group}-{current}-r{repeat}';out=BASE/'logs'/TASK/name;tmp=BASE/'tmp'/TASK/name
@@ -28,7 +28,8 @@ for group in groups:
if current=='serial':env['VEYRA_TEST_EXPORT_SERIAL']='1'
if current=='events':env['VEYRA_TEST_EXPORT_ASYNC']='0'
if current=='async':env['VEYRA_TEST_EXPORT_FENCE_EVENTS']='0'
- if current=='prefetch':env['VEYRA_TEST_EXPORT_NVOF_PREFETCH']='1'
+ if current in ('prefetch','prefetch-trace'):env['VEYRA_TEST_EXPORT_NVOF_PREFETCH']='1'
+ if current=='prefetch-trace':env['VEYRA_TEST_EXPORT_PREFETCH_TIMESTAMPS']='1'
if current in ('async','async-events'):env['VEYRA_TEST_EXPORT_ASYNC']='1'
if current in ('events','async-events'):env['VEYRA_TEST_EXPORT_FENCE_EVENTS']='1'
command=[str(exe),str(source),str(dest),config,str(frames),str(out)]
diff --git a/src/engine/VideoExportJob.cpp b/src/engine/VideoExportJob.cpp
index 86d4802e..77145731 100644
--- a/src/engine/VideoExportJob.cpp
+++ b/src/engine/VideoExportJob.cpp
@@ -236,8 +236,11 @@ bool exportVideo(const std::wstring& input,const std::wstring& output,PlayerOpti
const bool allowed=asyncNvenc&&graph.nvofSessionInitialized()&&!gd.hdrInput&&!gd.hdrOutput&&
!gd.color.enabled&&!gd.additionalColorCount&&!gd.videoHdr.enabled&&gd.opticalFlowBackend==OpticalFlowBackend::Nvidia;
if(!allowed){failureReason=L"NVOF预取实验配置不受支持";veyra::log::error("flow-prefetch","experimental export admission refused");break;}
+ uint64_t priorBudget=0,priorUsage=0;ctx.videoMemoryInfo(priorBudget,priorUsage);
flowPrefetch=std::make_unique<pipeline::FlowPrefetch>();
if(!flowPrefetch->initialize(ctx,gd)){failureReason=L"NVOF预取实验初始化失败";break;}
+ uint64_t budget=0,usage=0;ctx.videoMemoryInfo(budget,usage);
+ veyra::log::info("flow-prefetch-memory",std::format("beforeMiB={} afterMiB={} budgetMiB={}",priorUsage>>20,usage>>20,budget>>20));
}
if(fenceEvents){
const bool injected=GetEnvironmentVariableW(L"VEYRA_TEST_EXPORT_EVENT_CREATE_FAIL",nullptr,0)>0;