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

fix(engine): colour and other live uniform parameters now reach the running graph (revision-stable apply path)

Veyra Goal Agent802cd99ec097
diff --git a/apps/veyra/ui/AppShell.cpp b/apps/veyra/ui/AppShell.cpp
index a94a5d5a..cf634b07 100644
--- a/apps/veyra/ui/AppShell.cpp
+++ b/apps/veyra/ui/AppShell.cpp
@@ -63,6 +63,10 @@ veyra::engine::EnhancementSettings lastSuccessful,jobExpected;bool haveSuccessfu
std::wstring smokeView;bool smokeViewApplied=false;
std::wstring smokeDualOutput;bool smokeEmpty=false;DWORD modeGdiStart=0,modeHandlesStart=0;SIZE_T modePrivateStart=0;
bool smokeDual=false,smokeDualPause=false,smokeMaster=false,smokeMasterReject=false,smokeAudio=false,smokeJob=false,smokeJobCancel=false,smokeJobExit=false,smokeColor=false;int dualStep=0,masterStep=0,audioStep=0,jobStep=0,colorStep=0;double pausedPosition=-1,jobPosition=0;uint64_t pausedFrames=0;ULONGLONG jobPauseTick=0;HANDLE workerMapping=nullptr;
+// Test/acceptance convenience: start in professional mode with the colour page
+// open, so a reviewer lands straight on the panel instead of hunting for it.
+bool openColourPageOnStart=false;
+uint64_t colourLiveRevision=0;
void switchMode();void selectInspector(int);
bool applySettings(veyra::engine::EnhancementSettings s){if(masterPendingRevision)return false;uiState.configured=s;if(uiState.enhanced)engine.requestSettings(s);else {auto effective=engine.snapshot().desired;if(effective.captureCompatible!=s.captureCompatible||effective.forceSdrPreview!=s.forceSdrPreview||effective.captureFlipVertical!=s.captureFlipVertical||effective.captureBuffer!=s.captureBuffer||!(effective.color==s.color)){effective.captureCompatible=s.captureCompatible;effective.forceSdrPreview=s.forceSdrPreview;effective.captureFlipVertical=s.captureFlipVertical;effective.captureBuffer=s.captureBuffer;effective.color=s.color;engine.requestSettings(effective);}veyra::log::info("ui-settings","enhancement off: draft saved; presentation setting applied independently");}veyra::ui::settingsEnabled(uiState.enhanced,uiState.configured);return true;}
@@ -618,7 +622,7 @@ if(wp==ControllerTimer){const auto state=engine.snapshot();if(state.remotePlay&&
#endif
{if(wp==TransitionTimer){transition.sample(GetTickCount64());if(!transition.running){endTransition();veyra::log::info("ui-transition","completed; final layout and swapchain resize released");}layout();return 0;}
if(full&&fullControls&&!menuOpen&&!veyra::ui::popupSelectorOpen()&&!GetCapture()&&GetTickCount64()-pointerTick>1600){POINT p{};GetCursorPos(&p);ScreenToClient(hwnd,&p);RECT r{};GetClientRect(hwnd,&r);if(p.y<r.bottom-veyra::ui::dip(hwnd,98)||p.x<0||p.x>=r.right||p.y>=r.bottom){fullControls=false;layout();if(GetForegroundWindow()==hwnd)SetCursor(nullptr);veyra::log::info("ui-fullscreen","controls hidden; video and subtitles only");}}
-if(closing){if(engine.idle()&&!exportJob.poll().active()){KillTimer(hwnd,TelemetryTimer);DestroyWindow(hwnd);}return 0;}if(!autoInput.empty()){auto file=autoInput;autoInput.clear();openFile(file);startTick=GetTickCount64();if(subtitleRequestAutoAlign){subtitleRequestAutoAlign=false;startSubtitleAutoAlign();}}if(smokeControls&&startTick){const auto elapsed=GetTickCount64()-startTick;
+if(closing){if(engine.idle()&&!exportJob.poll().active()){KillTimer(hwnd,TelemetryTimer);DestroyWindow(hwnd);}return 0;}if(!autoInput.empty()){auto file=autoInput;autoInput.clear();openFile(file);startTick=GetTickCount64();if(subtitleRequestAutoAlign){subtitleRequestAutoAlign=false;startSubtitleAutoAlign();}if(openColourPageOnStart){openColourPageOnStart=false;if(uiState.mode==veyra::ui::Mode::Daily)switchMode();selectInspector(2);layout();}}if(smokeControls&&startTick){const auto elapsed=GetTickCount64()-startTick;
if(smokeStep==0&&elapsed>2200){engine.pause(true);smokeStep=1;}
if(smokeStep==1&&elapsed>2600){engine.seek(1.0);smokeStep=2;}
if(smokeStep==2&&elapsed>3200){engine.pause(false);smokeStep=3;}
@@ -756,8 +760,24 @@ if(colorStep==0&&elapsed>1500){
else if(colorStep==1){if(elapsed>2500)SendMessageW(colourControl(800),BM_CLICK,0,0);}
else if(colorStep==2){
if(auto edit=colourControl(1300))SetWindowTextW(edit,L"1.00");
- colorStep=(colourSnapshot.desired.color.exposure==1.0f)?3:(elapsed>4000?-1:2);
- if(colorStep==3)veyra::log::info("color-ui-test","exposure 1.00 reached the engine through the panel");
+ // The graph must actually receive it: `desired` alone is what let the
+ // "sliders do nothing until NR is toggled" bug ship.
+ colorStep=(colourSnapshot.desired.color.exposure==1.0f&&colourSnapshot.applied.color.exposure==1.0f)?9:(elapsed>5000?-1:2);
+ if(colorStep==9)veyra::log::info("color-ui-test",std::format("exposure 1.00 reached the engine and the running graph (applied, revision={})",colourSnapshot.applied.revision));
+}else if(colorStep==9){
+ // Second edit: same revision, so it must go through the live uniform path -
+ // no rebuild, no history reset, and the graph must show it.
+ colourLiveRevision=colourSnapshot.applied.revision;
+ if(auto edit=colourControl(1300))SetWindowTextW(edit,L"0.75");
+ colorStep=10;
+}else if(colorStep==10){
+ const bool live=colourSnapshot.applied.color.exposure==0.75f&&colourSnapshot.applied.revision==colourLiveRevision&&colourSnapshot.desired.color.exposure==0.75f;
+ colorStep=live?11:(elapsed>9000?-1:10);
+ if(colorStep==11)veyra::log::info("color-ui-test",std::format("live parameter update reached the graph without a rebuild (revision stays {})",colourLiveRevision));
+}else if(colorStep==11){
+ // Put the value back so the reset/undo expectations below stay meaningful.
+ if(auto edit=colourControl(1300))SetWindowTextW(edit,L"1.00");
+ colorStep=(colourSnapshot.desired.color.exposure==1.0f&&colourSnapshot.applied.color.exposure==1.0f)?3:(elapsed>11000?-1:11);
}else if(colorStep==3){SendMessageW(colourControl(801),BM_CLICK,0,0);colorStep=30;}
// The snapshot is taken once per tick, so the reset/undo results are observed on
// the following tick instead of in the same one that clicked the button.
@@ -999,6 +1019,7 @@ int argc=0;auto argv=CommandLineToArgvW(GetCommandLineW(),&argc);for(int i=1;i<a
// fused into the ingest dispatch, so this flag is how the graded cost is measured
// against the grade-off baseline on the same clip.
{int gradeArgc=0;auto gradeArgv=CommandLineToArgvW(GetCommandLineW(),&gradeArgc);for(int i=1;i<gradeArgc;++i){if(!wcsncmp(gradeArgv[i],L"--color-grade=",14)){initialOptions.settings.color.enabled=true;initialOptions.settings.color.exposure=float(_wtof(gradeArgv[i]+14));}}if(gradeArgv)LocalFree(gradeArgv);}
+{int pageArgc=0;auto pageArgv=CommandLineToArgvW(GetCommandLineW(),&pageArgc);for(int i=1;i<pageArgc;++i)if(!_wcsicmp(pageArgv[i],L"--colour-page"))openColourPageOnStart=true;if(pageArgv)LocalFree(pageArgv);}
// The legacy argument clamp caps --fg-multiplier at 4X. Re-read the flag here so
// 6X (and 2X/3X/4X) can be exercised from the command line for diagnostics and
// smoke tests; the interactive UI uses the capability-driven list instead.
diff --git a/docs/WORKLOG.md b/docs/WORKLOG.md
index 8dd51c4f..83df1aa2 100644
--- a/docs/WORKLOG.md
+++ b/docs/WORKLOG.md
@@ -1,5 +1,31 @@
# 2026-09-11 继续修复目标模式执行中
+## 2026-09-17 紧急修复:色彩参数不是实时的(要开关 NR 才生效)
+
+用户上手验收第一条就抓到:拖一堆滑块画面**完全没反应**,必须开关 NR 才应用,之后继续调又不动。
+
+**根因(不是 shader,是引擎的实时更新路径缺失)**:`EngineController` 的渲染线程只在
+`requested.revision != previous.revision` 时才处理设置,而 `requestSettings()` 又按设计**故意**让
+“只改颜色参数”的请求保持同一个 revision(`sameVideoConfiguration()` 把颜色块从“图形结构”比较里排除,
+因为颜色是纯 uniform 更新、不该重建图)。两件事叠起来的结果:颜色改动被写进 `desired`,
+**渲染线程永远看不到**,直到某个真正改变图形结构的操作(开关 NR/SR/切分辨率)顺带把整套设置重放一遍。
+这也解释了为什么我之前的烟测没抓到——它断言的是 `desired`(引擎已收到)而不是 `applied`(图真的收到)。
+
+**修复**:在渲染线程的设置处理里补上**同 revision 的实时 uniform 更新**分支——
+`if(requested.revision==previous.revision&&!(requested==previous))` → `graph.applySettings(requested)`,
+不重建、不重置历史、不打断采集;失败时回滚 `desired` 并给出提示文字。
+日志新增 `[settings] live parameter update revision=… colourEnabled=… exposure=… contrast=… temperature=…`。
+
+**测试补强(这次必须能抓到)**:烟测的曝光步骤改为同时断言 `desired` **和** `applied`,
+并新增两步:把曝光改成 0.75 → 要求 `applied.exposure==0.75` **且 `applied.revision` 不变**
+(证明走的是实时路径、没有重建)。日志:
+`exposure 1.00 reached the engine and the running graph (applied, revision=3)`、
+`live parameter update reached the graph without a rebuild (revision stays 3)`。
+
+**验证**:`--smoke-color` exit 0;`scripts/gates/delivery.ps1` → **DELIVERY SHORT GATE PASS**
+(`logs/delivery/1292ac3a395e451e9d50927f67645df9/result.json`)。
+已用修复后的构建重新拉起测试实例(4K GTA VI 片段 + 色彩页)。
+
## 2026-09-17 色彩页 P1/T3 收口:分组“眼睛”bypass + schema v19
方案 T3 要求的“分组眼睛”落地,并且是**真 bypass**(不只是隐藏 UI):
diff --git a/src/engine/EngineController.cpp b/src/engine/EngineController.cpp
index 28fbeeaa..53b70057 100644
--- a/src/engine/EngineController.cpp
+++ b/src/engine/EngineController.cpp
@@ -733,6 +733,21 @@ void EngineController::run(HWND window,std::wstring path,PlayerOptions options,s
finishReset(diagnostics::ResetOutcome::RolledBack);
std::lock_guard lock(mutex_);desired_.rejectVideoRequest(requested,previous);snapshot_.desired=desired_;snapshot_.rejectedRevision=requested.revision;snapshot_.applying=desired_!=previous;snapshot_.status=L"设置应用失败,已恢复上一套参数";snapshot_.backendWarning=requested.nrRuntime!=previous.nrRuntime?L"NR运行版本切换失败,已恢复上一套参数":requested.frameGenerationBackend==FrameGenerationBackend::XeSS?L"XeSS 未能启用,已恢复上一套参数":requested.frameGenerationBackend==FrameGenerationBackend::Fsr?L"AMD FSR 帧生成未能启用,已恢复上一套参数":L"后端切换失败,已恢复上一套参数";}
}
+ // Live uniform update. The revision identifies the graph *shape*
+ // (NR/SR/FG/resolution and the colour master switch); colour
+ // parameters keep the same revision on purpose, so they must be
+ // pushed into the running graph here - no rebuild, no history
+ // reset. Without this the panel only took effect after an
+ // unrelated rebuild (toggling NR): the "sliders do nothing" report.
+ if(requested.revision==previous.revision&&!(requested==previous)){
+ if(graph.applySettings(requested)){
+ options=PlayerOptions::from(requested);
+ {std::lock_guard lock(mutex_);snapshot_.applied=options.snapshot();snapshot_.applying=desired_!=snapshot_.applied;}
+ veyra::log::info("settings",std::format("live parameter update revision={} colourEnabled={} exposure={:.2f} contrast={:.2f} temperature={:.2f}",requested.revision,requested.color.enabled?1:0,requested.color.exposure,requested.color.contrast,requested.color.temperature));
+ }else{
+ std::lock_guard lock(mutex_);desired_.rejectVideoRequest(requested,previous);snapshot_.desired=desired_;snapshot_.applying=desired_!=previous;snapshot_.status=L"这套参数需要重建管线,已回到上一套数值";
+ }
+ }
if(stop_)break;
double seek;{std::lock_guard lock(mutex_);seek=seekSeconds_.exchange(-1);if(seek>=0)activeSeekId=snapshot_.seekRequested;}
if(seek>=0&&!isImage&&!isCapture){