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-1 work: P1.4 Feature 18 Create success (result 0x1, handle non-null) in both configs
Veyra Goal Agentdd430b4c72c2
diff --git a/include/veyra/ngx/DlssNrRuntimeAdapter.h b/include/veyra/ngx/DlssNrRuntimeAdapter.hindex 56d4a7d6..17dd4c7c 100644--- a/include/veyra/ngx/DlssNrRuntimeAdapter.h+++ b/include/veyra/ngx/DlssNrRuntimeAdapter.h@@ -83,6 +83,20 @@ public:static DWORD WINAPI testShimGetModuleFileNameW(HMODULE module, LPWSTR filename, DWORD size);static HMODULE testCallerModule();+ // --- SEH-guarded snippet calls (Playbook 7.2/8.4). Each writes the raw+ // result and the SEH code (0 when none); returns false only on SEH.+ bool snippetInitExt(ID3D12Device* device, const std::wstring& runtimeDir, uint64_t& result, uint32_t& sehCode);+ bool snippetCreateFeature(ID3D12GraphicsCommandList* cmdList, NVSDK_NGX_Parameter* parameters,+ NVSDK_NGX_Handle** handle, uint64_t& result, uint32_t& sehCode);+ bool snippetEvaluateFeature(ID3D12GraphicsCommandList* cmdList, const NVSDK_NGX_Handle* handle,+ const NVSDK_NGX_Parameter* parameters, uint64_t& result, uint32_t& sehCode);+ bool snippetReleaseFeature(NVSDK_NGX_Handle* handle, uint64_t& result, uint32_t& sehCode);+ bool snippetShutdown1(ID3D12Device* device, uint64_t& result, uint32_t& sehCode);++ // Feature-18 scaling ratio callback: sets DLSSNR.ScalingRatio to 1.0 and+ // reports success (same-resolution, non-upscaling V1 contract).+ static NVSDK_NGX_Result NVSDK_CONV scalingRatioCallback(NVSDK_NGX_Parameter* parameters);+private:HMODULE module_ = nullptr;Exports exports_{};diff --git a/loop/BACKLOG.md b/loop/BACKLOG.mdindex 0da3c137..6fbe43a3 100644--- a/loop/BACKLOG.md+++ b/loop/BACKLOG.md@@ -22,7 +22,7 @@ Phase 0 gate:以 Playbook 第 16 节 Phase 0 为准。未完成 P0.9 禁止开- [x] P1.1 先建立 phase1 gate 和确定性 RGBA8 测试帧/输出统计。(2026-09-02:phase1.ps1 fail-closed 建立并负向验证 exit 1;JSON 契约含输出统计/变体 hash/防陈旧字段;nr-default.json 就位;NGX SDK 310.7 已 staging。)- [x] P1.2 封装 NGX Core、parameter block、DLSSNR runtime 和严格逆序 RAII。(2026-09-02:Init_with_ProjectID result=0x1 真实成功;exports 5/5;逆序释放干净;harness --load-only 双配置 PASS。)- [x] P1.3 实现受隔离、可关闭的 caller-name 兼容层;禁止 patch DLL。(2026-09-02:IAT 单 owner shim + 8 项边界测试全过;DLL 文件从未被修改。)-- [ ] P1.4 严格按 Playbook 参数名与类型 Create Feature 18。+- [x] P1.4 严格按 Playbook 参数名与类型 Create Feature 18。(2026-09-02:CreateFeature id=18 result=0x1 handle=non-null,双配置 PASS;8.5 参数全表按名按类型设置。)- [ ] P1.5 实现 Proxy→Feature18→Raw 的 D3D12 资源、barrier、subrect 与异步 4-slot 执行。- [ ] P1.6 连续 300/300 Evaluate;验证输出非黑、非恒定、随输入/参数变化;记录 GPU timings/result/capture。- [ ] P1.7 重建/reset/释放测试。diff --git a/loop/JOURNAL.md b/loop/JOURNAL.mdindex ffc1043b..8f492da0 100644--- a/loop/JOURNAL.md+++ b/loop/JOURNAL.md@@ -377,6 +377,29 @@ Result:---+## Cycle 014 — P1.4 Feature 18 Create++### Before++- Phase: 1+- 唯一任务: adapter 增加五个 snippet 调用的 SEH 包装(Init_Ext/CreateFeature/EvaluateFeature/ReleaseFeature/Shutdown1);harness --create-test 按 Playbook 8.4 顺序(core Init→load→shim→Init_Ext(AppID 0x0876232C)→AllocateParameters→8.5 全部 Create 参数→CreateFeature(18)→执行并等待一次→handle 非空→逆序清理);ScalingRatioCallback 固定 1.0。+- 可证伪假设: 若任一参数名/类型/顺序错误,CreateFeature 返回非 Success(如 0xBAD00005 InvalidParameter)或 handle 为空——按 Playbook 18 逐项 dump 排查而不是随机删参数。+- 预计修改文件: include/veyra/ngx/DlssNrRuntimeAdapter.h、src/ngx/DlssNrRuntimeAdapter.cpp、tools/nr_harness/main.cpp。+- 快速检查命令: `build.ps1 -Preset x64-debug` → 0;`veyra_nr_harness.exe --create-test --runtime-dir <abs>` → 0 且 CreateFeature result=0x1、handle!=null。+- 预期新增证据: Init_Ext/Create/Release/Shutdown 全链 result hex + handle 非空日志。++### After++- 实际修改: DlssNrRuntimeAdapter 五个 SEH 包装(Init_Ext/Create/Evaluate/Release/Shutdown1)+ scalingRatioCallback;harness --create-test 按 Playbook 8.4 顺序完整执行。+- 实际命令与 exit code: `build.ps1 -Preset x64-debug` → 0(一轮过,无编译错误);`--create-test` Debug 与 Release 均 exit 0(PASS)。+- 新证据/日志路径: 关键链路——core Init 0x1 → shim 安装 → **snippet Init_Ext appId=0x876232C result=0x1** → 18 个 Create 参数(8.5 全表:8 个尺寸变体 + Upscaling=0 + Scale/ScalingRatio=1.0 + callback + Preset=0(int) + Width/Height(uint32) + PerfQualityValue=1(int,Balanced) + 两个 node mask(uint32)=1)→ **CreateFeature id=18 result=0x1 handle=non-null** → ReleaseFeature 0x1 → snippet Shutdown1 0x1 → restore shim → FreeLibrary → core Shutdown1 0x1。+- 失败 fingerprint: 无(一次通过)。+- 是否有进展,依据: 是——项目核心可行性在本工程内得到直接证明:signed snippet Feature 18 可用 Playbook 8.5 契约 Create 成功且完整释放。+- STATE/BACKLOG 更新: cycle.completed=14;BACKLOG P1.4 → DONE。+- 下一唯一动作: P1.5 实现 Proxy/Neural/ZeroMotion(R16G16F)/ZeroDepth(R32F)/Confidence(R8) 资源 + GenerateTestPattern.hlsl(DXC 构建期编译)+ 8.6 Evaluate 参数与 4-slot 逐帧执行。++---+复制下面模板开始每个新 cycle。必须先填 Before,再改代码;完成后填 After。## Cycle NNN — 简短任务名diff --git a/loop/STATE.json b/loop/STATE.jsonindex 510de351..b0d66fe0 100644--- a/loop/STATE.json+++ b/loop/STATE.json@@ -76,14 +76,14 @@}],"cycle": {- "completed": 13,+ "completed": 14,"maximum": 80,"sameFailureAttempts": 0,"maximumSameFailureAttempts": 3,"noProgressCycles": 0,"maximumNoProgressCycles": 5},- "currentTask": "P1.4: create Feature 18 through the signed snippet with the exact Playbook 8.5 parameter names and types (all width/height variants, callback, node masks) and a non-null handle.",+ "currentTask": "P1.5: implement Phase 1 GPU resources (Proxy/Neural RGBA8, ZeroMotion R16G16F, ZeroDepth R32F, Confidence R8), GenerateTestPattern.hlsl compiled at build time via DXC, the 8.6 Evaluate parameter set, and the per-frame Proxy->Feature18->Raw execution on the 4-slot ring.","lastGate": {"name": "phase0","status": "passed",@@ -96,6 +96,6 @@"lastGoodCommit": "1fb7afa5779a6c6a0a585d4ecf18a640260a2fcf","openP0P1Findings": [],"blockers": [],- "nextAction": "Implement P1.4 Feature 18 Create (Playbook 8.4/8.5 order: core init -> load -> shim -> Init_Ext -> params -> CreateFeature), then P1.5 frame loop.",- "updatedAt": "2026-09-02T22:25:00+08:00"+ "nextAction": "Implement P1.5 resources + test pattern shader + Evaluate loop, then P1.6 300-frame run with output statistics.",+ "updatedAt": "2026-09-02T22:40:00+08:00"}diff --git a/src/ngx/DlssNrRuntimeAdapter.cpp b/src/ngx/DlssNrRuntimeAdapter.cppindex 65c31739..c1dc0c6f 100644--- a/src/ngx/DlssNrRuntimeAdapter.cpp+++ b/src/ngx/DlssNrRuntimeAdapter.cpp@@ -140,6 +140,175 @@ HMODULE DlssNrRuntimeAdapter::testCallerModule()return g_callerModule;}+// ---------------------------------------------------------------------------+// SEH-guarded snippet calls. Each outer method is noexcept-friendly: no C+++// objects with destructors inside the __try frame.+// ---------------------------------------------------------------------------+namespace {++__declspec(noinline) NVSDK_NGX_Result CallSnippetInitExt(+ DlssNrRuntimeAdapter::InitExtFn fn, unsigned long long appId, const wchar_t* runtimeDir,+ ID3D12Device* device, NVSDK_NGX_Version version, const NVSDK_NGX_Parameter* parameters,+ uint32_t& sehCode)+{+ sehCode = 0;+ NVSDK_NGX_Result result = NVSDK_NGX_Result_Fail;+ __try {+ result = fn(appId, runtimeDir, device, version, parameters);+ }+ __except (EXCEPTION_EXECUTE_HANDLER) {+ sehCode = static_cast<uint32_t>(GetExceptionCode());+ result = NVSDK_NGX_Result_FAIL_PlatformError;+ }+ return result;+}++__declspec(noinline) NVSDK_NGX_Result CallSnippetCreateFeature(+ DlssNrRuntimeAdapter::CreateFeatureFn fn, ID3D12GraphicsCommandList* cmdList,+ NVSDK_NGX_Feature feature, NVSDK_NGX_Parameter* parameters, NVSDK_NGX_Handle** handle,+ uint32_t& sehCode)+{+ sehCode = 0;+ NVSDK_NGX_Result result = NVSDK_NGX_Result_Fail;+ __try {+ result = fn(cmdList, feature, parameters, handle);+ }+ __except (EXCEPTION_EXECUTE_HANDLER) {+ sehCode = static_cast<uint32_t>(GetExceptionCode());+ result = NVSDK_NGX_Result_FAIL_PlatformError;+ }+ return result;+}++__declspec(noinline) NVSDK_NGX_Result CallSnippetEvaluateFeature(+ DlssNrRuntimeAdapter::EvaluateFeatureFn fn, ID3D12GraphicsCommandList* cmdList,+ const NVSDK_NGX_Handle* handle, const NVSDK_NGX_Parameter* parameters,+ PFN_NVSDK_NGX_ProgressCallback callback, uint32_t& sehCode)+{+ sehCode = 0;+ NVSDK_NGX_Result result = NVSDK_NGX_Result_Fail;+ __try {+ result = fn(cmdList, handle, parameters, callback);+ }+ __except (EXCEPTION_EXECUTE_HANDLER) {+ sehCode = static_cast<uint32_t>(GetExceptionCode());+ result = NVSDK_NGX_Result_FAIL_PlatformError;+ }+ return result;+}++__declspec(noinline) NVSDK_NGX_Result CallSnippetReleaseFeature(+ DlssNrRuntimeAdapter::ReleaseFeatureFn fn, NVSDK_NGX_Handle* handle, uint32_t& sehCode)+{+ sehCode = 0;+ NVSDK_NGX_Result result = NVSDK_NGX_Result_Fail;+ __try {+ result = fn(handle);+ }+ __except (EXCEPTION_EXECUTE_HANDLER) {+ sehCode = static_cast<uint32_t>(GetExceptionCode());+ result = NVSDK_NGX_Result_FAIL_PlatformError;+ }+ return result;+}++__declspec(noinline) NVSDK_NGX_Result CallSnippetShutdown1(+ DlssNrRuntimeAdapter::ShutdownFn fn, ID3D12Device* device, uint32_t& sehCode)+{+ sehCode = 0;+ NVSDK_NGX_Result result = NVSDK_NGX_Result_Fail;+ __try {+ result = fn(device);+ }+ __except (EXCEPTION_EXECUTE_HANDLER) {+ sehCode = static_cast<uint32_t>(GetExceptionCode());+ result = NVSDK_NGX_Result_FAIL_PlatformError;+ }+ return result;+}++} // namespace++bool DlssNrRuntimeAdapter::snippetInitExt(ID3D12Device* device, const std::wstring& runtimeDir,+ uint64_t& result, uint32_t& sehCode)+{+ result = 0;+ sehCode = 0;+ if (module_ == nullptr || exports_.initExt == nullptr) {+ return false;+ }+ result = static_cast<uint64_t>(CallSnippetInitExt(exports_.initExt, kSignedSnippetAppId,+ runtimeDir.c_str(), device, NVSDK_NGX_Version_API, nullptr, sehCode));+ veyra::log::info("ngx", std::format("snippet Init_Ext appId=0x{:X} result={} seh={}",+ kSignedSnippetAppId, veyra::ngxResultString(result), sehCode));+ return sehCode == 0;+}++bool DlssNrRuntimeAdapter::snippetCreateFeature(ID3D12GraphicsCommandList* cmdList,+ NVSDK_NGX_Parameter* parameters, NVSDK_NGX_Handle** handle, uint64_t& result, uint32_t& sehCode)+{+ result = 0;+ sehCode = 0;+ *handle = nullptr;+ if (module_ == nullptr || exports_.createFeature == nullptr) {+ return false;+ }+ result = static_cast<uint64_t>(CallSnippetCreateFeature(exports_.createFeature, cmdList,+ kFeatureId, parameters, handle, sehCode));+ veyra::log::info("ngx", std::format("snippet CreateFeature id={} result={} handle={} seh={}",+ static_cast<uint32_t>(kFeatureId), veyra::ngxResultString(result),+ *handle != nullptr ? "non-null" : "null", sehCode));+ return sehCode == 0;+}++bool DlssNrRuntimeAdapter::snippetEvaluateFeature(ID3D12GraphicsCommandList* cmdList,+ const NVSDK_NGX_Handle* handle, const NVSDK_NGX_Parameter* parameters,+ uint64_t& result, uint32_t& sehCode)+{+ result = 0;+ sehCode = 0;+ if (module_ == nullptr || exports_.evaluateFeature == nullptr) {+ return false;+ }+ result = static_cast<uint64_t>(CallSnippetEvaluateFeature(exports_.evaluateFeature, cmdList,+ handle, parameters, nullptr, sehCode));+ return sehCode == 0;+}++bool DlssNrRuntimeAdapter::snippetReleaseFeature(NVSDK_NGX_Handle* handle, uint64_t& result, uint32_t& sehCode)+{+ result = 0;+ sehCode = 0;+ if (module_ == nullptr || exports_.releaseFeature == nullptr) {+ return false;+ }+ result = static_cast<uint64_t>(CallSnippetReleaseFeature(exports_.releaseFeature, handle, sehCode));+ veyra::log::info("ngx", std::format("snippet ReleaseFeature result={} seh={}",+ veyra::ngxResultString(result), sehCode));+ return sehCode == 0;+}++bool DlssNrRuntimeAdapter::snippetShutdown1(ID3D12Device* device, uint64_t& result, uint32_t& sehCode)+{+ result = 0;+ sehCode = 0;+ if (module_ == nullptr || exports_.shutdown1 == nullptr) {+ return false;+ }+ result = static_cast<uint64_t>(CallSnippetShutdown1(exports_.shutdown1, device, sehCode));+ veyra::log::info("ngx", std::format("snippet Shutdown1 result={} seh={}",+ veyra::ngxResultString(result), sehCode));+ return sehCode == 0;+}++NVSDK_NGX_Result NVSDK_CONV DlssNrRuntimeAdapter::scalingRatioCallback(NVSDK_NGX_Parameter* parameters)+{+ if (parameters != nullptr) {+ parameters->Set("DLSSNR.ScalingRatio", 1.0f);+ }+ return NVSDK_NGX_Result_Success;+}+DlssNrRuntimeAdapter::~DlssNrRuntimeAdapter(){unload();diff --git a/tools/nr_harness/main.cpp b/tools/nr_harness/main.cppindex ef3630b6..278ee6ec 100644--- a/tools/nr_harness/main.cpp+++ b/tools/nr_harness/main.cpp@@ -15,9 +15,12 @@#include "veyra/Log.h"#include "veyra/NgxResult.h"#include "veyra/Result.h"+#include "veyra/gfx/CommandSlotRing.h"#include "veyra/gfx/D3D12DeviceContext.h"+#include "veyra/ngx/DlssNrParameters.h"#include "veyra/ngx/DlssNrRuntimeAdapter.h"#include "veyra/ngx/NgxCoreHost.h"+#include "veyra/ngx/NgxParameters.h"namespace {@@ -200,6 +203,174 @@ int runShimTest(const std::wstring& runtimeDir)return 0;}+// P1.4: Feature 18 Create through the signed snippet, Playbook 8.4 order.+int runCreateTest(const std::wstring& runtimeDir, uint32_t width, uint32_t height)+{+ const std::wstring dllPath = runtimeDir + L"\\nvngx_dlssnr.dll";+ veyra::FileIdentity dllIdentity{};+ veyra::IdentityError dllError = veyra::IdentityError::None;+ if (!veyra::computeFileIdentity(dllPath, dllIdentity, dllError) ||+ dllIdentity.sizeBytes != kExpectedDllSize ||+ dllIdentity.sha256Upper != kExpectedDllSha256 ||+ !dllIdentity.signatureValid ||+ !dllIdentity.signerIsNvidia) {+ veyra::log::error("harness", "create-test: staged runtime identity mismatch");+ return 3;+ }++ // 1. Device context + slot ring (Create needs a real command list).+#if defined(VEYRA_D3D12_DEBUG)+ constexpr bool kDebugLayerByBuild = true;+#else+ constexpr bool kDebugLayerByBuild = false;+#endif+ veyra::gfx::D3D12DeviceContext context;+ veyra::gfx::DeviceContextDesc contextDesc{};+ contextDesc.enableDebugLayer = kDebugLayerByBuild;+ contextDesc.commandSlotCount = 4;+ veyra::Status status = veyra::Status::Ok;+ if (!context.initialize(contextDesc, status)) {+ return 6;+ }+ veyra::gfx::CommandSlotRing ring;+ if (!ring.initialize(context.device(), context.directQueue(), context.fence(), context.fenceEvent(), 4, status)) {+ context.shutdown();+ return 7;+ }++ // 2. NGX core init with the local identity.+ LocalIdentity identity{};+ if (!loadLocalIdentity(runtimeDir, identity)) {+ ring.shutdown();+ context.shutdown();+ return 7;+ }+ veyra::ngx::NgxCoreHost coreHost;+ if (!coreHost.initialize(context.device(), runtimeDir, identity.projectId.c_str(), identity.engineVersion.c_str(), status)) {+ veyra::log::error("harness", std::format("create-test: core init failed result={}", veyra::ngxResultString(coreHost.initResult())));+ ring.shutdown();+ context.shutdown();+ return 8;+ }++ // 3. Snippet load + caller compatibility + Init_Ext.+ veyra::ngx::DlssNrRuntimeAdapter adapter;+ if (!adapter.load(runtimeDir, status) ||+ !adapter.installCallerCompatibility(status)) {+ veyra::log::error("harness", std::format("create-test: adapter load/shim failed status={}", veyra::statusString(status)));+ adapter.unload();+ coreHost.shutdown();+ ring.shutdown();+ context.shutdown();+ return 9;+ }++ uint64_t result = 0;+ uint32_t sehCode = 0;+ if (!adapter.snippetInitExt(context.device(), runtimeDir, result, sehCode) ||+ result != static_cast<uint64_t>(NVSDK_NGX_Result_Success)) {+ veyra::log::error("harness", "create-test: snippet Init_Ext failed");+ adapter.restoreCallerCompatibility();+ adapter.unload();+ coreHost.shutdown();+ ring.shutdown();+ context.shutdown();+ return 10;+ }++ // 4. Create parameters, exactly the Playbook 8.5 table.+ NVSDK_NGX_Parameter* rawParams = coreHost.allocateParameters(status);+ if (rawParams == nullptr) {+ veyra::log::error("harness", "create-test: AllocateParameters failed");+ goto teardown_fail;+ }+ {+ veyra::ngx::ParameterBlock params(rawParams);+ namespace p = veyra::ngx::dlssnr;+ params.setU32(p::kWidth, width);+ params.setU32(p::kHeight, height);+ params.setU32(p::kInputWidth, width);+ params.setU32(p::kInputHeight, height);+ params.setU32(p::kOutputWidth, width);+ params.setU32(p::kOutputHeight, height);+ params.setU32(p::kOutputDotWidth, width);+ params.setU32(p::kOutputDotHeight, height);+ params.setU32(p::kUpscaling, 0);+ params.setF32(p::kScale, 1.0f);+ params.setF32(p::kScalingRatio, 1.0f);+ params.setVoid(p::kComputeScalingRatioCallback,+ reinterpret_cast<void*>(&veyra::ngx::DlssNrRuntimeAdapter::scalingRatioCallback));+ params.setI32(p::kHintRenderPreset, 0);+ params.setU32(p::kStdWidth, width);+ params.setU32(p::kStdHeight, height);+ params.setI32(p::kPerfQualityValue, 1); // NVSDK_NGX_PerfQuality_Value_Balanced+ params.setU32(p::kCreationNodeMask, 1);+ params.setU32(p::kVisibilityNodeMask, 1);+ veyra::log::info("harness", std::format("create-test: {} create parameters set for {}x{}",+ 18, width, height));+ }++ // 5. CreateFeature(18) on a real command list, then execute and wait once.+ {+ NVSDK_NGX_Handle* handle = nullptr;+ ID3D12GraphicsCommandList* list = ring.acquire(0, status);+ if (list == nullptr) {+ goto teardown_fail;+ }+ if (!adapter.snippetCreateFeature(list, rawParams, &handle, result, sehCode)) {+ veyra::log::error("harness", std::format("create-test: CreateFeature SEH={} result={}", sehCode, veyra::ngxResultString(result)));+ goto teardown_fail;+ }+ if (!ring.submitAndSignal(0)) {+ goto teardown_fail;+ }+ if (!ring.waitIdle()) {+ goto teardown_fail;+ }++ const bool created = result == static_cast<uint64_t>(NVSDK_NGX_Result_Success) && handle != nullptr;+ veyra::log::info("harness", std::format("create-test: CreateFeature result={} handle={}",+ veyra::ngxResultString(result), handle != nullptr ? "non-null" : "null"));+ if (!created) {+ goto teardown_fail;+ }++ // 6. Reverse-order teardown (Playbook 8.8) and clean-exit report.+ uint64_t releaseResult = 0;+ uint32_t releaseSeh = 0;+ (void)adapter.snippetReleaseFeature(handle, releaseResult, releaseSeh);+ coreHost.destroyParameters(rawParams);+ rawParams = nullptr;+ uint64_t snippetShutdownResult = 0;+ uint32_t snippetShutdownSeh = 0;+ (void)adapter.snippetShutdown1(context.device(), snippetShutdownResult, snippetShutdownSeh);+ adapter.restoreCallerCompatibility();+ adapter.unload();+ ring.shutdown();+ coreHost.shutdown();+ context.shutdown();++ const bool clean = releaseResult == static_cast<uint64_t>(NVSDK_NGX_Result_Success) &&+ snippetShutdownResult == static_cast<uint64_t>(NVSDK_NGX_Result_Success);+ veyra::log::info("harness", std::format("create-test: teardown release={} snippetShutdown={}",+ veyra::ngxResultString(releaseResult), veyra::ngxResultString(snippetShutdownResult)));+ veyra::log::info("harness", clean ? "create-test: PASS" : "create-test: FAIL (teardown results)");+ return clean ? 0 : 12;+ }++teardown_fail:+ if (rawParams != nullptr) {+ coreHost.destroyParameters(rawParams);+ }+ adapter.restoreCallerCompatibility();+ adapter.unload();+ ring.shutdown();+ coreHost.shutdown();+ context.shutdown();+ veyra::log::error("harness", "create-test: FAIL");+ return 11;+}+int runLoadOnly(const std::wstring& runtimeDir){// 1. Device context (debug layer follows the build configuration).@@ -276,6 +447,9 @@ int wmain(int argc, wchar_t** argv)std::wstring logFile;bool loadOnly = false;bool shimTest = false;+ bool createTest = false;+ uint32_t width = 1920;+ uint32_t height = 1080;for (int i = 1; i < argc; ++i) {const std::wstring arg = argv[i];if (arg == L"--load-only") {@@ -284,12 +458,21 @@ int wmain(int argc, wchar_t** argv)else if (arg == L"--shim-test") {shimTest = true;}+ else if (arg == L"--create-test") {+ createTest = true;+ }else if (arg == L"--runtime-dir" && i + 1 < argc) {runtimeDir = argv[++i];}else if (arg == L"--log-file" && i + 1 < argc) {logFile = argv[++i];}+ else if (arg == L"--width" && i + 1 < argc) {+ width = static_cast<uint32_t>(wcstoul(argv[++i], nullptr, 10));+ }+ else if (arg == L"--height" && i + 1 < argc) {+ height = static_cast<uint32_t>(wcstoul(argv[++i], nullptr, 10));+ }}if (!logFile.empty()) {@@ -300,11 +483,14 @@ int wmain(int argc, wchar_t** argv)if (shimTest && !runtimeDir.empty()) {exitCode = runShimTest(runtimeDir);}+ else if (createTest && !runtimeDir.empty()) {+ exitCode = runCreateTest(runtimeDir, width, height);+ }else if (loadOnly && !runtimeDir.empty()) {exitCode = runLoadOnly(runtimeDir);}else {- veyra::log::info("harness", "no mode selected; use --load-only/--shim-test --runtime-dir <abs> (frame loop arrives in P1.4-P1.6)");+ veyra::log::info("harness", "no mode selected; use --load-only/--shim-test/--create-test --runtime-dir <abs> (frame loop arrives in P1.5-P1.6)");exitCode = 1;}