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-4 work: SR WORKS with absolute path — capability=1, 1080p->4K Create+30 Evaluate+resize all pass (root cause: relative path broke NGX DLL search)
Veyra Goal Agent25ef77d38a55
diff --git a/include/veyra/ngx/DlssSrBackend.h b/include/veyra/ngx/DlssSrBackend.hindex d76c0d44..c498f2b7 100644--- a/include/veyra/ngx/DlssSrBackend.h+++ b/include/veyra/ngx/DlssSrBackend.h@@ -67,12 +67,14 @@ public:bool isBypass() const; // true when input == output extent// 1:1 bypass: the entire SR backend is skipped (Playbook section 11).- bool shouldBypass(uint32_t inputWidth, uint32_t outputWidth) const {- return inputWidth == outputWidth;- }+ // Checks BOTH dimensions to handle non-uniform extents correctly.bool shouldBypass(uint32_t inW, uint32_t inH, uint32_t outW, uint32_t outH) const {return inW == outW && inH == outH;}+ // Convenience overload for width-only check (backward compat).+ bool shouldBypass(uint32_t inputWidth, uint32_t outputWidth) const {+ return inputWidth == outputWidth;+ }private:NVSDK_NGX_Handle* handle_ = nullptr;diff --git a/scripts/gates/phase4.ps1 b/scripts/gates/phase4.ps1index 0c48e66a..8f4d36bc 100644--- a/scripts/gates/phase4.ps1+++ b/scripts/gates/phase4.ps1@@ -77,15 +77,10 @@ Add-GateCheck "sr:bypass-1to1" ([bool]$sr.bypass11 -eq $true) "bypass11=$($sr.by$srCap = [bool]$sr.srCapabilityAvailableAdd-GateCheck "sr:capability-reported" ($null -ne $sr.srCapabilityAvailable) "srCapabilityAvailable=$srCap"-# 6. Upscale + resize only when capability is available.-if ($srCap) {- Add-GateCheck "sr:upscale" ([bool]$sr.upscale540to1080 -eq $true) "upscale=$($sr.upscale540to1080)"- Add-GateCheck "sr:upscale-evaluates" ([int64]$sr.upsscaleEvaluates -ge 30) "evaluates=$($sr.upscaleEvaluates)"- Add-GateCheck "sr:resize-recreate" ([bool]$sr.resizeRecreate -eq $true) "resize=$($sr.resizeRecreate)"-}-else {- Write-Host "[INFO] sr:capability-unavailable :: SR not available on this system (capability query); bypass is the only testable path"-}+# 6. Upscale + resize required (fail-closed: SR must actually work).+Add-GateCheck "sr:upscale" ([bool]$sr.upscale540to1080 -eq $true) "upscale=$($sr.upscale540to1080)"+Add-GateCheck "sr:upscale-evaluates" ([int64]$sr.upscaleEvaluates -ge 30) "evaluates=$($sr.upscaleEvaluates)"+Add-GateCheck "sr:resize-recreate" ([bool]$sr.resizeRecreate -eq $true) "resize=$($sr.resizeRecreate)"# 7. Debug-layer d3d12va run (Phase 3 Reviewer deferred P2: d3d12va GPU path# was never executed under the D3D12 debug layer / InfoQueue).diff --git a/scripts/stage-runtime.ps1 b/scripts/stage-runtime.ps1index 52a770b4..a2f1a8bd 100644--- a/scripts/stage-runtime.ps1+++ b/scripts/stage-runtime.ps1@@ -58,24 +58,34 @@ else {}}-$manifestPath = Join-Path $runtimeDir "runtime-manifest.json"-$manifestJson = @'-{- "schema": 1,- "mode": "local-experimental-only",- "files": [- {- "name": "nvngx_dlssnr.dll",- "size": 165840496,- "sha256": "E16BCF15E16E13F527491CDF7845B2FE6521A738D8F7C9C721866A8496E1FC8E",- "fileVersion": "310.8.0.0",- "authenticode": "Valid",- "source": "user-provided workspace file",- "redistributable": false+# Stage the official DLSS SR DLL from the SDK (Playbook section 3.2).+$sdkRel = Join-Path $Root "third_party_local\nvidia\DLSS_SDK_310.7.0\lib\Windows_x86_64\rel\nvngx_dlss.dll"+$srDll = Join-Path $runtimeDir "nvngx_dlss.dll"+if (Test-Path -LiteralPath $sdkRel -PathType Leaf) {+ if (-not (Test-Path -LiteralPath $srDll -PathType Leaf)) {+ Copy-Item -LiteralPath $sdkRel -Destination $srDll+ Write-Host "stage-runtime.ps1: copied nvngx_dlss.dll from SDK rel/"+ }+ else {+ $sdkHash = (Get-FileHash -LiteralPath $sdkRel -Algorithm SHA256).Hash.ToUpperInvariant()+ $stagedSrHash = (Get-FileHash -LiteralPath $srDll -Algorithm SHA256).Hash.ToUpperInvariant()+ if ($sdkHash -ne $stagedSrHash) {+ Copy-Item -LiteralPath $sdkRel -Destination $srDll -Force+ Write-Host "stage-runtime.ps1: staged nvngx_dlss.dll drifted; replaced from SDK"+ }}- ]}-'@++$manifestPath = Join-Path $runtimeDir "runtime-manifest.json"+$srManifestEntry = ""+if (Test-Path -LiteralPath $srDll -PathType Leaf) {+ $srItem = Get-Item -LiteralPath $srDll+ $srHash = (Get-FileHash -LiteralPath $srDll -Algorithm SHA256).Hash.ToUpperInvariant()+ $srSig = Get-AuthenticodeSignature -LiteralPath $srDll+ $srVersion = [string]$srItem.VersionInfo.FileVersion+ $srManifestEntry = ",`n {`n `"name`": `"nvngx_dlss.dll`",`n `"size`": $($srItem.Length),`n `"sha256`": `"$srHash`",`n `"fileVersion`": `"$srVersion`",`n `"authenticode`": `"$([string]$srSig.Status)`",`n `"source`": `"official DLSS SDK 310.7.0 rel`",`n `"redistributable`": false`n }"+}+$manifestJson = "@'`n{`n `"schema`": 1,`n `"mode`": `"local-experimental-only`",`n `"files`": [`n {`n `"name`": `"nvngx_dlssnr.dll`",`n `"size`": 165840496,`n `"sha256`": `"E16BCF15E16E13F527491CDF7845B2FE6521A738D8F7C9C721866A8496E1FC8E`",`n `"fileVersion`": `"310.8.0.0`",`n `"authenticode`": `"Valid`",`n `"source`": `"user-provided workspace file`",`n `"redistributable`": false`n }$srManifestEntry`n ]`n}`n'@"Set-Content -LiteralPath $manifestPath -Value $manifestJson -Encoding utf8Write-Host "stage-runtime.ps1: runtime-manifest.json written"diff --git a/src/ngx/DlssSrBackend.cpp b/src/ngx/DlssSrBackend.cppindex c19999f1..f983536a 100644--- a/src/ngx/DlssSrBackend.cpp+++ b/src/ngx/DlssSrBackend.cpp@@ -81,7 +81,8 @@ bool DlssSrBackend::create(NgxCoreHost& coreHost,outputHeight_ = desc.outputHeight;// 1:1 bypass: never create SR for same-resolution (Playbook section 11).- if (shouldBypass(desc.inputWidth, desc.outputWidth)) {+ // Check BOTH dimensions for non-uniform extent correctness.+ if (shouldBypass(desc.inputWidth, desc.inputHeight, desc.outputWidth, desc.outputHeight)) {log::info("ngx", std::format("sr-backend: bypass ({}x{} == {}x{})",desc.inputWidth, desc.inputHeight, desc.outputWidth, desc.outputHeight));return true;@@ -104,7 +105,12 @@ bool DlssSrBackend::create(NgxCoreHost& coreHost,desc.inputWidth, desc.inputHeight, desc.outputWidth, desc.outputHeight,ngxResultString(createResult_), handle_ != nullptr ? "non-null" : "null", sehCode));- if (result != NVSDK_NGX_Result_Success || handle_ == nullptr) {+ if (result != NVSDK_NGX_Result_Success) {+ // Query FeatureInitResult for diagnostic detail (user directive).+ int featureInitResult = 0;+ const NVSDK_NGX_Result gir = params->Get(NVSDK_NGX_Parameter_SuperSampling_FeatureInitResult, &featureInitResult);+ log::info("ngx", std::format("sr-backend: FeatureInitResult Get=0x{:X} value={} (0x{:X})",+ static_cast<uint64_t>(gir), featureInitResult, featureInitResult));status = Status::DeviceFailure;return false;}diff --git a/tools/nr_harness/sr_test.cpp b/tools/nr_harness/sr_test.cppindex 96a59488..385d304b 100644--- a/tools/nr_harness/sr_test.cpp+++ b/tools/nr_harness/sr_test.cpp@@ -85,7 +85,11 @@ int runSrTest(const FrameLoopArgs& args)context.shutdown(); return 7;}- // Core init.+ // Core init - canonical absolute path (user directive: full absolute path).+ wchar_t absRuntimeDir[MAX_PATH * 2]{};+ GetFullPathNameW(L"runtime_local\\nvidia", MAX_PATH * 2, absRuntimeDir, nullptr);+ log::info("sr-test", std::format("runtimeDir (absolute): {}", narrowText(absRuntimeDir)));+std::ifstream idStream("runtime_local/config/ngx-local.json", std::ios::binary);std::string idText((std::istreambuf_iterator<char>(idStream)), std::istreambuf_iterator<char>());const std::string projectId = scanField(idText, "ngxProjectId");@@ -93,12 +97,12 @@ int runSrTest(const FrameLoopArgs& args)if (projectId.empty()) { ring.shutdown(); context.shutdown(); return 7; }veyra::ngx::NgxCoreHost coreHost;- if (!coreHost.initialize(context.device(), L"runtime_local\\nvidia",+ if (!coreHost.initialize(context.device(), absRuntimeDir,projectId.c_str(), engineVersion.c_str(), status)) {ring.shutdown(); context.shutdown(); return 8;}- // Query SR capability (Playbook section 11).+ // Query SR capability (Playbook section 11) - full diagnostic per user directive.bool srCapabilityAvailable = false;{NVSDK_NGX_Parameter* capParams = nullptr;@@ -107,11 +111,16 @@ int runSrTest(const FrameLoopArgs& args)veyra::ngxResultString(static_cast<uint64_t>(capResult)), capParams != nullptr ? "non-null" : "null"));if (capParams != nullptr && capResult == NVSDK_NGX_Result_Success) {int ssAvailable = 0;- capParams->Get(NVSDK_NGX_Parameter_SuperSampling_Available, &ssAvailable);+ const NVSDK_NGX_Result g1 = capParams->Get(NVSDK_NGX_Parameter_SuperSampling_Available, &ssAvailable);int needsUpdatedDriver = 0;- capParams->Get(NVSDK_NGX_Parameter_SuperSampling_NeedsUpdatedDriver, &needsUpdatedDriver);+ const NVSDK_NGX_Result g2 = capParams->Get(NVSDK_NGX_Parameter_SuperSampling_NeedsUpdatedDriver, &needsUpdatedDriver);+ // DeepLearningSuperSampling variants+ int dlssAvailable = 0;+ const NVSDK_NGX_Result g3 = capParams->Get("#\x02", &dlssAvailable);srCapabilityAvailable = ssAvailable != 0;- log::info("sr-test", std::format("SR available={} needsUpdatedDriver={}", ssAvailable, needsUpdatedDriver));+ log::info("sr-test", std::format(" SuperSampling.Available: Get=0x{:X} value={}", static_cast<uint64_t>(g1), ssAvailable));+ log::info("sr-test", std::format(" SuperSampling.NeedsUpdatedDriver: Get=0x{:X} value={}", static_cast<uint64_t>(g2), needsUpdatedDriver));+ log::info("sr-test", std::format(" DeepLearningSuperSampling.Available: Get=0x{:X} value={}", static_cast<uint64_t>(g3), dlssAvailable));NVSDK_NGX_D3D12_DestroyParameters(capParams);}}@@ -142,15 +151,15 @@ int runSrTest(const FrameLoopArgs& args)bypassOk = bypassOk && !srBackend.created();}- // Test 2: 540p->1080p upscale (SR should be created and active).+ // Test 2: 1080p-4K upscale (Playbook -16: "1080p-4K - SR->NR").bool upscaleOk = false;uint64_t upscaleEvals = 0;veyra::gfx::ComPtr<ID3D12Resource> color540, output1080;{srBackend.release(); // clean up from bypass testveyra::ngx::DlssSrBackend::CreateDesc cdesc{};- cdesc.inputWidth = 960; cdesc.inputHeight = 540;- cdesc.outputWidth = 1920; cdesc.outputHeight = 1080;+ cdesc.inputWidth = 1920; cdesc.inputHeight = 1080;+ cdesc.outputWidth = 3840; cdesc.outputHeight = 2160;cdesc.perfQuality = 1;cdesc.enableOutputSubrects = false;ID3D12GraphicsCommandList* list = ring.acquire(0, status);@@ -165,12 +174,12 @@ int runSrTest(const FrameLoopArgs& args)if (upscaleOk) {// Create color (render res) and output (target res) textures.- color540 = makeTexture(context, 960, 540, DXGI_FORMAT_R16G16B16A16_FLOAT);- output1080 = makeTexture(context, 1920, 1080, DXGI_FORMAT_R16G16B16A16_FLOAT);+ color540 = makeTexture(context, 1920, 1080, DXGI_FORMAT_R16G16B16A16_FLOAT);+ output1080 = makeTexture(context, 3840, 2160, DXGI_FORMAT_R16G16B16A16_FLOAT);if (color540 && output1080) {// Zero guidance (no depth/motion for V1 SR baseline).- auto zeroMotion = makeTexture(context, 960, 540, DXGI_FORMAT_R16G16_FLOAT);- auto zeroDepth = makeTexture(context, 960, 540, DXGI_FORMAT_R32_FLOAT);+ auto zeroMotion = makeTexture(context, 1920, 1080, DXGI_FORMAT_R16G16_FLOAT);+ auto zeroDepth = makeTexture(context, 1920, 1080, DXGI_FORMAT_R32_FLOAT);// Evaluate 30 frames.for (int frame = 0; frame < 30; ++frame) {@@ -265,7 +274,7 @@ int runSrTest(const FrameLoopArgs& args)// required when SR capability is available on this system. When the NGX// capability query reports SR as unavailable (hardware/driver limitation),// bypass + honest capability reporting is the correct pass condition- // (Playbook: "SR runtime 来自官方 310.7 manifest" is verified; the+ // (Playbook: "SR runtime ---- 310.7 manifest" is verified; the// capability result is reported, not bypassed silently).const bool allOk = bypassOk && (!srCapabilityAvailable || (upscaleOk && resizeOk));