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++
phase-0 work: P0.8 phase0 gate passed (70 checks, 300s/30002 frames, no device removal)
Veyra Goal Agent67498845cfdb
diff --git a/docs/WORKLOG.md b/docs/WORKLOG.mdindex 994bce23..3edc2f27 100644--- a/docs/WORKLOG.md+++ b/docs/WORKLOG.md@@ -1,5 +1,53 @@# Veyra Worklog+## 2026-09-02 Phase 0 — Runtime probe + D3D12 skeleton++Goal:++Complete Phase 0 per the Playbook: fail-closed phase0 gate, minimal CMake/C++20 project, veyra_base (logger/result strings/file identity), veyra_gfx (D3D12DeviceContext + 4-slot ring), full veyra_runtime_probe, and the real gate run including the 5-minute window loop.++Changed:++- Initialized local Git per LOOP_ENGINE fixed order (baseline 2086282, branch agent/veyra-v1-loop, loop pointer commit 09abf5d).+- Added scripts/gates/phase0.ps1 (fail-closed, verified failing before the project existed).+- Added CMakeLists.txt/CMakePresets.json/cmake/VeyraWarnings.cmake (Ninja x64 debug/release, /W4 /permissive- /WX).+- Added scripts/build.ps1 (vswhere/vcvars resolution; no machine paths in presets) and scripts/stage-runtime.ps1 (pinned-identity copy + manifest + persistent ngx-local.json).+- Added include/veyra + src/base (Logger, Status/HRESULT/NGX strings, BCrypt SHA-256 + WinVerifyTrust + signer extraction) and src/gfx (D3D12DeviceContext, CommandSlotRing with timestamp heap).+- Implemented tools/runtime_probe/main.cpp: --self-test, --device-info, full mode (restricted LoadLibraryExW, 5 exports, nvofapi64 probe, fixed-size window + flip swapchain + 4-slot loop, JSON summary with runId/exeSha256).++Commands actually run:++- preflight (54 checks then 66 after Git): exit 0 both times.+- Toolchain/GPU probes: RTX 5070 / 616.56 / 12227 MiB / compute 12.0; nvofapi64 32.0.16.1656; MSVC 14.44.35207; CMake 3.31.6; Ninja 1.12.1; DXC 1.8; Git 2.53.+- scripts/build.ps1 -Preset x64-debug / x64-release: exit 0 (multiple times).+- veyra_runtime_probe --self-test / --device-info / full smoke: exit 0 each.+- loop-gate.ps1 -Gate phase0: three honest failures (locale version format; SwitchParameter binding via -File; ignore probe on non-existent dirs), each fixed without lowering thresholds, then **exit 0: VEYRA GATE PASSED: phase0 (70 checks)**.++Results:++- Gate run-id a5fd6348b3084b44857b1f1ffc96a449 (308.3 s): exports 5/5; Debug window 3 s / 303 frames; Release window **300 s / 30002 frames, deviceRemoved=false**; staged runtime identity matches the pinned contract; git ignore 7/7; no sensitive files tracked.+- Driver version resolves via registry nvlddmkm.sys file version (32.0.16.1656); DisplayVersion value absent on this driver.+- D3D12 debug layer unavailable on this machine (0x887A002D, Windows "Graphics Tools" optional feature missing); recorded in loop/INBOX.md for user action before Phase 1.++Artifacts/logs:++- logs/phase0/a5fd6348b3084b44857b1f1ffc96a449/ (probe logs + JSON, gitignored)+- runtime_local/nvidia/{nvngx_dlssnr.dll, runtime-manifest.json}, runtime_local/config/ngx-local.json (gitignored)++Failures and exact codes:++- Gate iterations: runtime:fileversion "310,8,0,0" != "310.8.0.0" (locale) → FileVersionRaw; build exit 1 via ParameterArgumentTransformationError ("-Clean:$false" as string) → omit switch; git check-ignore exit 1 for non-existent trailing-slash dirs → in-directory probe files.+- Compile iterations: C4838 (DXGI literals), WinVerifyTrust const GUID*, namespace log::, wchar→char C4244, IDXGIAdapter1 vs DESC3, ComPtr .Get() for Signal, GetCurrentBackBufferIndex needs IDXGISwapChain3. All fixed; no warnings remain (/WX).++Decision:++- Keep machine-specific paths out of tracked files (build.ps1 resolves them); gate verifies staged state rather than staging itself; probe JSON embeds runId + exe SHA-256 so stale artifacts cannot pass.++Next single task:++P0.9: independent read-only Reviewer for Phase 0, then checkpoint commit and Phase 1 unlock.++## 2026-09-01 Handoff baselineGoal:diff --git a/loop/BACKLOG.md b/loop/BACKLOG.mdindex d4d31ed6..2a041d54 100644--- a/loop/BACKLOG.md+++ b/loop/BACKLOG.md@@ -11,7 +11,7 @@- [x] P0.5 实现结构化 logger、HRESULT/NGX result 字符串、文件 size/hash/signature 检查。(2026-09-02:--self-test 实测 BCrypt SHA256、WinVerifyTrust、CryptQueryObject 签名者、版本提取;staged DLL 身份与固定契约全匹配;双 preset 构建 exit 0。)- [x] P0.6 实现 D3D12DeviceContext:RTX adapter、device、direct queue、debug layer、4-slot command allocator/list/fence/event ring。(2026-09-02:--device-info 实测 RTX 5070/0x10DE/FL 12_2/4-slot ring + timestamp query 全通过;debug layer 缺失记 INBOX。)- [x] P0.7 实现 veyra_runtime_probe:受限绝对路径加载本地复制的 nvngx_dlssnr.dll,验证 required exports;不得加载 addon。(2026-09-02:LoadLibraryExW 受限 flags 成功,exports 5/5 实测,3s 冒烟 PASS;addon 从未被加载。)-- [ ] P0.8 Debug/Release 构建并实际运行 probe;D3D12 窗口循环 5 分钟无 device removed;记录命令、exit code、GPU/driver、hash/signature/exports、日志路径。+- [x] P0.8 Debug/Release 构建并实际运行 probe;D3D12 窗口循环 5 分钟无 device removed;记录命令、exit code、GPU/driver、hash/signature/exports、日志路径。(2026-09-02:phase0 gate exit 0/70 checks;run-id a5fd6348…;Release 300s/30002 帧 deviceRemoved=false;证据见 loop/EVIDENCE.md。)- [ ] P0.9 当前 gate 通过、只读 Reviewer 通过、修完 P0/P1、写 checkpoint。Phase 0 gate:以 Playbook 第 16 节 Phase 0 为准。未完成 P0.9 禁止开始 Phase 1。diff --git a/loop/EVIDENCE.md b/loop/EVIDENCE.mdindex be64fb16..9f2972d5 100644--- a/loop/EVIDENCE.md+++ b/loop/EVIDENCE.md@@ -47,6 +47,21 @@反向证据:`phase0` exit 1(Git 与 phase0 gate 缺失);`phase1` exit 1(并命中 requested=1/current=0);`cycle.completed=80,status=ready` exit 1(state-loop-bounds);提前解锁 Phase 1 exit 1(state-phase-sequence)。两次临时 STATE 修改均已恢复,随后再次执行正向 preflight。+## Phase 0 / phase0 / 2026-09-02T21:09:09+08:00++- Commit: gate 运行于 639fd48d 工作树之上(含 gate 修复,未提交时运行);验证内容 checkpoint 在 Reviewer 通过后登记于 STATE.phases[0].commit+- Command: `powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\scripts\loop-gate.ps1 -Gate phase0`+- Exit code: 0(外层 70 checks;内部 phase0.ps1 61 checks 全过,run-id a5fd6348b3084b44857b1f1ffc96a449,总 308.3s)+- Build configuration: x64-debug(VEYRA_ENABLE_D3D12_DEBUG=ON)与 x64-release(OFF)均通过 scripts/build.ps1 真实 configure+build;probe exe sha256 debug=E75D22D04A9DCAADC31451FD6CA14A90CC86B5D1C2C736016BD2A47FE9EA683F,release=0C1AB463E94588998D8BD1E4E11CAC5DBE6C44A9B97CD05308D6146401C9ED2C(JSON 自报与 gate 独立计算一致)+- Hardware/runtime identity: NVIDIA GeForce RTX 5070 / vendor 0x10DE / LUID 0x00000000:0x000000005D5F2320 / dedicatedVideoMiB 11943 / driver 32.0.16.1656(注册表 nvlddmkm.sys)/ featureLevel 12_2 / OS 10.0.26200;staged nvngx_dlssnr.dll 165840496 / E16B…FC8E / 310.8.0.0 / Valid / NVIDIA Corporation;System32 nvofapi64.dll 32.0.16.1656+- Logs/captures: logs/phase0/a5fd6348b3084b44857b1f1ffc96a449/(probe-debug.log/json、probe-release.log/json)+- Quantitative result: exports 5/5;Debug 窗口 3s/303 帧;**Release 窗口 300s/30002 帧,deviceRemoved=false,reason=0x00000000**;git ignore 7/7 探针通过;git-sensitive-files none tracked;D3D12 debug layer 在本机不可用(0x887A002D,INBOX 已记录,非 Phase 0 门禁项)+- Reviewer: not run yet(gate 首次通过后立即安排,见 STATE)+- Open P0/P1: none known+- Conclusion: Playbook §16 Phase 0 全部门槛(Debug/Release 构建、5 分钟窗口无 device removed、runtime hash/签名与 manifest 一致、proprietary ignored、真实命令记录)机器验证通过;等待独立 Reviewer++迭代记录:第 1 次运行 exit 1(runtime:fileversion 区域逗号格式);第 2 次 exit 1(-Clean:$false 的 SwitchParameter 字符串转换);第 3 次 exit 1(不存在目录的 ignore 匹配);第 4 次 exit 0。三次修复均未降低任何阈值。+## Goal Cycle 001 / preflight / 2026-09-02T20:23:27+08:00- Commit: not available(本地 Git 尚未初始化,属 P0.2 范围)diff --git a/loop/JOURNAL.md b/loop/JOURNAL.mdindex 1a532289..c529eb9e 100644--- a/loop/JOURNAL.md+++ b/loop/JOURNAL.md@@ -224,6 +224,34 @@ Result:---+## Cycle 008 — P0.8 phase0 gate 实跑++### Before++- Phase: 0+- 唯一任务: 通过统一入口 `scripts/loop-gate.ps1 -Gate phase0` 实跑 P0.3 建立的门禁:双 preset 重建 + Debug probe(3s 窗口)+ Release probe(300s 窗口)+ 全部阈值解析 + Git ignore 检查;exit 0 后把证据登记 EVIDENCE。+- 可证伪假设: 若任一阈值不达标(窗口不足 299s、framesPresented=0、身份不匹配、exports 缺失、git 跟踪了敏感文件),gate exit 1。+- 预计修改文件: loop/JOURNAL.md、loop/EVIDENCE.md、loop/STATE.json、loop/BACKLOG.md。+- 快速检查命令: `powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\scripts\loop-gate.ps1 -Gate phase0` → 预期 exit 0。+- 预期新增证据: gate 全绿输出 + logs/phase0/<runId>/ 四个 artifact(debug/release 的 log+json)。++### After++- 实际修改: scripts/gates/phase0.ps1 三处修复(FileVersionRaw 取代区域敏感 FileVersion;`-File` 调用下移除 `-Clean:$false` 字符串转换问题;目录 ignore 探测改为目录内探针文件)+ 本 Journal/EVIDENCE/WORKLOG/STATE/BACKLOG 更新。+- 实际命令与 exit code:+ - 第 1 次 `loop-gate.ps1 -Gate phase0` → exit 1:gate 内 19 项中 runtime:fileversion 失败(PowerShell 区域格式返回 "310,8,0,0")。+ - 第 2 次 → exit 1:build:x64-debug/release 双失败——`-File` 下 `-Clean:$false` 以字符串 "$false" 传给 SwitchParameter 无法转换。+ - 第 3 次 → exit 1:构建与双 probe 全过,但 git-ignore:third_party_local/reference_local/captures 失败——目录尚不存在时带斜杠目录模式对裸路径不匹配。+ - 第 4 次 → **exit 0:VEYRA GATE PASSED: phase0 (70 checks)**,内部 gate 61 检查全过,run-id a5fd6348b3084b44857b1f1ffc96a449,总耗时 308.3s。+- 新证据/日志路径: logs/phase0/a5fd6348b3084b44857b1f1ffc96a449/{probe-debug.log,probe-debug.json,probe-release.log,probe-release.json}。关键数字——Debug:3 秒 303 帧;Release:**300 秒 30002 帧,deviceRemoved=false,reason=0x00000000**;exports 5/5;exe sha256 debug=E75D22D0…、release=0C1AB463…。+- 失败 fingerprint: phase0|loop-gate -Gate phase0|1|区域格式/SwitchParameter 转换/不存在目录的 ignore 匹配——3 个不同缺陷依次修复,每个都有新证据。+- 本 fingerprint 第几次不同尝试: 第 4 次运行通过;3 次失败原因互不相同(未触发同指纹 3 次上限)。+- 是否有进展,依据: 是——Phase 0 的机器验收门禁首次真实 exit 0,包含 5 分钟窗口循环无 device removed。+- STATE/BACKLOG 更新: phases[0]=gate_passed + gateEvidence;cycle.completed=8;BACKLOG P0.8 → DONE。+- 下一唯一动作: P0.9 记录 Reviewer 前指纹,按 REVIEW_PROMPT 启动只读 Reviewer 子 Agent。++---+复制下面模板开始每个新 cycle。必须先填 Before,再改代码;完成后填 After。## Cycle NNN — 简短任务名diff --git a/loop/STATE.json b/loop/STATE.jsonindex 53b0e148..aa9eb407 100644--- a/loop/STATE.json+++ b/loop/STATE.json@@ -6,15 +6,15 @@"phase": {"id": 0,"name": "Runtime probe and D3D12 skeleton",- "state": "in_progress",+ "state": "gate_passed","gate": "phase0"},"phases": [{"id": 0,"name": "Runtime probe and D3D12 skeleton",- "status": "in_progress",- "gateEvidence": null,+ "status": "gate_passed",+ "gateEvidence": "loop/EVIDENCE.md#phase-0--phase0--2026-09-02t210909-0800","reviewEvidence": null,"commit": null},@@ -76,19 +76,19 @@}],"cycle": {- "completed": 7,+ "completed": 8,"maximum": 80,"sameFailureAttempts": 0,"maximumSameFailureAttempts": 3,"noProgressCycles": 0,"maximumNoProgressCycles": 5},- "currentTask": "P0.8: run the phase0 gate for real (Debug 3s smoke + Release 300s window loop) and register the evidence.",+ "currentTask": "P0.9: run the read-only Phase 0 Reviewer per loop/REVIEW_PROMPT.md, fix any P0/P1, then create the verified checkpoint commit and unlock Phase 1.","lastGate": {"name": "phase0",- "status": "failed",- "exitCode": 1,- "evidence": "loop/JOURNAL.md#cycle-003 (fail-closed proof: 5 missing project inputs reported)"+ "status": "passed",+ "exitCode": 0,+ "evidence": "loop/EVIDENCE.md#phase-0--phase0--2026-09-02t210909-0800"},"lastFailureFingerprint": null,"failureLedger": [],@@ -96,6 +96,6 @@"lastGoodCommit": null,"openP0P1Findings": [],"blockers": [],- "nextAction": "Run phase0 gate via loop-gate.ps1 (Release 300s window), register EVIDENCE, then P0.9 reviewer.",- "updatedAt": "2026-09-02T22:00:00+08:00"+ "nextAction": "Spawn read-only Phase 0 Reviewer with BASE_COMMIT=2086282478ae5d1e07e8162d47148633b59882fe; after PASS do checkpoint commit and unlock Phase 1.",+ "updatedAt": "2026-09-02T21:15:00+08:00"}diff --git a/scripts/gates/phase0.ps1 b/scripts/gates/phase0.ps1index 650efa01..6ab575b5 100644--- a/scripts/gates/phase0.ps1+++ b/scripts/gates/phase0.ps1@@ -148,7 +148,9 @@ if ($dllStaged) {$signer = ""if ($null -ne $sig.SignerCertificate) { $signer = [string]$sig.SignerCertificate.Subject }Add-GateCheck "runtime:signer" ($signer -like "*NVIDIA*") $("subject={0}" -f $signer)- $fileVersion = [string]$item.VersionInfo.FileVersion+ # FileVersionRaw keeps the dotted quad; the locale-aware FileVersion+ # property renders commas on some systems and must not be compared.+ $fileVersion = [string]$item.VersionInfo.FileVersionRawAdd-GateCheck "runtime:fileversion" ($fileVersion -eq $expectedFileVersion) $("actual={0} expected={1}" -f $fileVersion, $expectedFileVersion)}@@ -185,11 +187,13 @@ if ($failures.Count -gt 0) {$buildScript = Join-Path $Root "scripts\build.ps1"$shell = (Get-Process -Id $PID).Path-& $shell -NoProfile -ExecutionPolicy Bypass -File $buildScript -Root $Root -Preset x64-debug -Clean:$false+# Note: -File passes arguments as strings, so a switch parameter cannot be+# given an explicit :$false here; omitting -Clean means "no clean rebuild".+& $shell -NoProfile -ExecutionPolicy Bypass -File $buildScript -Root $Root -Preset x64-debug$debugBuildExit = $LASTEXITCODEAdd-GateCheck "build:x64-debug" ($debugBuildExit -eq 0) ("exitCode={0}" -f $debugBuildExit)-& $shell -NoProfile -ExecutionPolicy Bypass -File $buildScript -Root $Root -Preset x64-release -Clean:$false+& $shell -NoProfile -ExecutionPolicy Bypass -File $buildScript -Root $Root -Preset x64-release$releaseBuildExit = $LASTEXITCODEAdd-GateCheck "build:x64-release" ($releaseBuildExit -eq 0) ("exitCode={0}" -f $releaseBuildExit)@@ -348,14 +352,16 @@ Test-ProbeJson -Label "release" -JsonPath $releaseJson -ExpectedRunId $runId -Ex# ---------------------------------------------------------------------------# 8. Proprietary paths remain ignored# ---------------------------------------------------------------------------+# Trailing-slash directory patterns only match directories git can see, so+# probe a path INSIDE each directory (mirrors loop-gate.ps1's own probes).$ignoreTargets = @("nvngx_dlssnr.dll","renodx-dlss5-1.addon64",- "runtime_local",- "third_party_local",- "reference_local",- "captures",- "logs"+ "runtime_local/.veyra-ignore-probe",+ "third_party_local/.veyra-ignore-probe",+ "reference_local/.veyra-ignore-probe",+ "captures/.veyra-ignore-probe",+ "logs/.veyra-ignore-probe")foreach ($target in $ignoreTargets) {& git -C $Root check-ignore -q --no-index -- $target