DLSS-NR: dynamic chained model passes with per-pass overrides, plus an optional Chinese language pack - #26
Open
Moeblack wants to merge 4 commits into
Conversation
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.
Runs the DLSS neural-rendering model more than once over the same frame on D3D12. Each extra pass is a separate NGX feature with its own frame history, fed the previous pass's answer, so later passes see one frame per frame instead of re-feeding one instance's own output. The pass count is not capped at a product number: 2-3 is the sensible range, the UI suggests 1-6, and a direct numeric input accepts any positive uint32_t. Off by default: [DlssNr] Passes=1 and IndividualPassSettings=false take the same path the code takes today (one evaluate with identical arguments; no scratch, no extra features, no chain).
This is an independent implementation on the same base as #23 (and alongside the draft in #1). The machinery is necessarily close family — separate per-pass features built a frame ahead so nothing is created and evaluated on one command list, a two-texture work set, modelInput left untouched so the resolve's edit = model - proxy stays the whole chain's. Where it differs: no fixed upper bound (extra features are created one per Dispatch, one at a time, and every build frame returns before evaluation); sparse per-layer overrides with live master inheritance; and the menu shows the count that actually completed (DlssNr::ActivePassCount()), not the requested one. If you would rather keep one multipass implementation in the tree I am happy to reconcile or rebase this onto whichever you pick.
Per-pass sparse configuration
[DlssNr] IndividualPassSettings=false by default: every layer uses the master model controls and nothing is copied or materialised. Setting it true does not snapshot the master values — each [DlssNr.PassN] section stores only the fields actually overridden; everything else keeps inheriting the master settings live. Sections are 1-based, may skip numbers, and lowering Passes never deletes higher overrides. On save the owned sections are rebuilt from the in-memory map so cleared fields and alternate spellings (Pass01) cannot resurrect stale keys. Override-map reads/writes are guarded by a dedicated mutex (the render side only looks up, never inserts).
Pipeline notes
Localization (self-contained; drop the last commit to remove entirely)
Optional, non-invasive Chinese language pack. English source text remains the key; Localization::Tr() looks up a UTF-8 dictionary (OptiScaler_zh.ini / zh_CN.ini next to the DLL, then beside the game exe) loaded once per DLL lifetime; missing files or keys fall back to the original English text, and translations that do not preserve every printf directive or that alter ImGui ##/### identity suffixes are rejected at load. When the pack is in use, the menu font atlas merges %WINDIR%\Fonts\msyh.ttc (resolved via GetWindowsDirectoryW) so CJK glyphs render instead of boxes. Without the pack nothing changes: no dictionary, no font merge, no behavioural delta.
All C++/H follows CONTRIBUTING.md PCH rules (new Localization.cpp includes pch.h first; no header includes it).
What I did not do
No HLSL/cbuffer or precompiled-shader changes; no NGX forwarder ABI change; no Vulkan multi-pass; no new model DLL; no new GPU queues. No VRAM formula is claimed beyond the host side (one extra work texture; each feature's internal state still grows with the count).
Test plan