Repository navigation
Add the DLSS (nvngx) backend with a CPU-only unit test - #1
Closed
xiaochen200000 wants to merge 1 commit into
Closed
xiaochen200000 wants to merge 1 commit into
xiaochen200000 wants to merge 1 commit into
Conversation
The DLSS side of the upscaler landscape docs/upscaler_backends.md maps, as code:
- runtime/test/nvngx_api_min.h: the NGX ABI subset written out from the driver's export table and the
public DLSS Programming Guide 310.6 — export names, the 17-slot parameter vtable, result codes
(OUT_OF_DATE = FAIL|12 for the deprecated GetParameters fallback), FeatureCommonInfo's shipped 40-byte
layout (16B path list + internal + 16B logging) pinned by static_assert, and the per-slot preset keys.
Nothing from NVIDIA's SDK is vendored; their license forbids it.
- runtime/src/dlss_backend.{h,cpp}: the pure translation surface — pick_quality over the FFX mode's ratio
(the shipped-enum collisions resolve conservatively: 1.7237x keeps Balanced, 2.0-3.0 folds into
UltraQuality), create_flags from the measured 1.0.2.1 context, the shipped helper's 0-means-1.0 MV rule,
the create/eval bags in the shipped helpers' exact key and type order with the preset hint riding the
create bag before CreateFeature (guide 3.12) and refreshed per eval — plus the process-level Core load,
init with the 40B info record, capability gate, feature create/evaluate/release, and the FFX bridge
(ffx_to_native) from the game's ffx::DispatchDescUpscale.
- runtime/test/dlss_backend_unit_test.cpp: CPU-only test. A recording mock of the parameter ABI drives
fill_create_params/fill_eval_params key-and-type-order checks (helper order, preset on the create bag,
PRESET_DEFAULT leaving the key unset), pins the shipped enum numbering and the result-code family, and
sweeps 1.0..4.5 @0.001 against a table-driven reference (3,501 points).
- runtime/CMakeLists.txt: dlss_backend_test registered like the other CPU tests, ctest-gated.
- docs/upscaler_backends.md: the component/license map, indexed from docs/README.md.
No game data, no NVIDIA SDK source, no keys.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
claiming: DLSS (nvngx) backend provider port
This is the continuation of the DLSS integration that was going in against the original It's-NotRexed repository (upstream issue/PR thread went dark when the GitHub project was removed; the git mirror at git.notrexed.dev is down at the moment). Rebased onto this runtime: the FFX-facing surface now bridges from
ffx::DispatchDescUpscale(runtime/src/dlss_backend.cppffx_to_native), the NGX ABI declarations live beside the FFX subset the repo already vendors (runtime/test/nvngx_api_min.hnext toffx_api_min.h), and the unit test follows the own-main PASS/FAIL style of the other CPU tests.What lands here
runtime/test/nvngx_api_min.h— the NGX ABI subset written out from the driver's NGX Core export table (nvngx.dll310.x D3D12 section) and the public DLSS Programming Guide 310.6: export names, the 17-slot parameter vtable, result codes (RESULT_FAIL_OUT_OF_DATE = RESULT_FAIL | 12— the deprecatedGetParametersfallback story),FeatureCommonInfo's shipped 40-byte record (16B path list + opaque internal + 16B inline logging) pinned bystatic_assert, the six per-slot preset keys, and the shippedPerfQualityValue/PresetValueenum numbering. Nothing from NVIDIA's SDK is vendored (their license forbids redistributing it under an open-source license) — only written-out declarations from the ABI and the public guide, same disciplineffx_api_min.happlies to AMD's.runtime/src/dlss_backend.{h,cpp}— the translation surface and the process-level wrap:pick_quality(ratio)over the FFX mode's ratio with the shipped-enum collisions resolved conservatively (1.7237x keeps Balanced, 2.0–3.0 folds into UltraQuality, the 1.71 cut is where the shipped values stop differing);create_flagsfrom the measured 1.0.2.1 context (HDR + low-res MVs + inverted depth + auto exposure);fill_create_params/fill_eval_paramsin the shipped helpers' exact key and type order (NGX_D3D12_CREATE_DLSS_EXT/NGX_D3D12_EVALUATE_DLSS_EXT), with the preset hint riding the create bag beforeCreateFeature(guide 3.12: the slot pick is read at creation) and refreshed per eval;LEONIDA_NGX_DLLoverride), init with the 40B info record, capability gate (SuperSampling.Available+ min-driver), feature create/evaluate/release;ffx_to_native: the bridge from the game'sffx::DispatchDescUpscale(jitter/MV scale pass-through, sharpening on the deprecated key, reset).runtime/test/dlss_backend_unit_test.cpp— CPU-only, own-main PASS/FAIL: a recording mock of the parameter ABI drives the create/eval bags' key-and-type-order checks (helper order, preset on the create bag,PRESET_DEFAULTleaving the key unset so the driver's OTA default stays); pins the shipped enum numbering (E5/F6/J10/K11/L12/M13) and the result-code family; sweeps 1.0..4.5 @0.001 (3,501 points) against an independent table-driven reference.runtime/CMakeLists.txt—dlss_backend_testregistered like the other CPU tests, ctest-gated.docs/upscaler_backends.md— the component/license map (what the package ships, what it can reach on PC, per-component redistribution terms), indexed fromdocs/README.md.Compliance
No game data (text and hashes only — checked against
no-game-data.yml's extension list), no NVIDIA SDK source or headers, no keys or workarounds. The NGX declarations carry their own written-out provenance comments, asffx_api_min.hdoes for FFX.Verification
Unit test runs everywhere (no device, no NGX, no DLL needed): the mock records every
Set, so key/type order drift shows as a bag diff; CI compiles the .cpp with /W4 (the real-NGX path stays exercised by hand or a later GPU run, same story asfsr_dispatch_test).