feat(vk): DLSS 5 neural rendering through NGX, in the temporal chain before the HUD #1833
Open
FIocker wants to merge 1 commit from
FIocker/super-build/neural into main
pull from: FIocker/super-build/neural
merge into: MagicBeanDev:main
MagicBeanDev:main
MagicBeanDev:github/pr/2893
MagicBeanDev:github/pr/2890
MagicBeanDev:github/pr/2887
MagicBeanDev:github/pr/2878
MagicBeanDev:github/pr/2875
MagicBeanDev:github/pr/2874
MagicBeanDev:github/pr/2873
MagicBeanDev:github/pr/2871
MagicBeanDev:github/pr/2756
MagicBeanDev:github/pr/2897
MagicBeanDev:github/pr/2896
MagicBeanDev:github/pr/2718
MagicBeanDev:github/pr/2842
MagicBeanDev:github/pr/2691
MagicBeanDev:github/pr/2895
MagicBeanDev:github/pr/2743
MagicBeanDev:github/pr/2765
MagicBeanDev:github/pr/2708
MagicBeanDev:github/pr/2732
MagicBeanDev:github/pr/2755
MagicBeanDev:github/pr/2817
MagicBeanDev:github/pr/2876
MagicBeanDev:release-please--branches--main
MagicBeanDev:release-please--branches--main--release-notes
MagicBeanDev:github/pr/2778
MagicBeanDev:github/pr/2888
MagicBeanDev:github/pr/2866
MagicBeanDev:github/pr/2877
MagicBeanDev:github/pr/2800
MagicBeanDev:github/pr/2829
MagicBeanDev:github/pr/2850
MagicBeanDev:github/pr/2889
MagicBeanDev:github/pr/2882
MagicBeanDev:github/pr/2860
MagicBeanDev:github/pr/2849
MagicBeanDev:github/pr/2886
MagicBeanDev:github/pr/2794
MagicBeanDev:github/pr/2840
MagicBeanDev:github/pr/2830
MagicBeanDev:github/pr/2834
MagicBeanDev:github/pr/2719
MagicBeanDev:github/pr/2742
MagicBeanDev:github/pr/2741
MagicBeanDev:github/pr/2820
MagicBeanDev:github/pr/2771
MagicBeanDev:github/pr/2859
MagicBeanDev:github/pr/2858
MagicBeanDev:github/pr/2823
MagicBeanDev:github/pr/2757
MagicBeanDev:github/pr/2769
MagicBeanDev:github/pr/2844
MagicBeanDev:github/pr/2843
MagicBeanDev:github/pr/2673
MagicBeanDev:github/pr/2855
MagicBeanDev:github/pr/2739
MagicBeanDev:github/pr/2807
MagicBeanDev:github/pr/2851
MagicBeanDev:github/pr/2789
MagicBeanDev:github/pr/2814
MagicBeanDev:github/pr/2818
MagicBeanDev:github/pr/2774
MagicBeanDev:github/pr/2772
MagicBeanDev:github/pr/2750
MagicBeanDev:github/pr/2786
MagicBeanDev:github/pr/2785
MagicBeanDev:github/pr/2782
MagicBeanDev:github/pr/2779
MagicBeanDev:github/pr/2775
MagicBeanDev:github/pr/2706
MagicBeanDev:github/pr/2766
MagicBeanDev:github/pr/2747
MagicBeanDev:github/pr/2759
MagicBeanDev:github/pr/2745
MagicBeanDev:github/pr/2740
MagicBeanDev:github/pr/2733
MagicBeanDev:github/pr/2725
MagicBeanDev:github/pr/2727
MagicBeanDev:github/pr/2728
MagicBeanDev:github/pr/2729
MagicBeanDev:github/pr/2721
MagicBeanDev:github/pr/2722
MagicBeanDev:github/pr/2715
MagicBeanDev:github/pr/2714
MagicBeanDev:github/pr/2707
MagicBeanDev:github/pr/2703
MagicBeanDev:github/pr/2705
MagicBeanDev:github/pr/2697
MagicBeanDev:github/pr/2679
MagicBeanDev:github/pr/2676
MagicBeanDev:github/pr/2669
MagicBeanDev:docs/what-hookshot-connects-to
MagicBeanDev:fix/hdr-encode-test
MagicBeanDev:fix/main-tests
MagicBeanDev:fix/play-cache-files
MagicBeanDev:perf/game-barrier-order
MagicBeanDev:feat/heap-lazy
MagicBeanDev:feat/texture-detail
MagicBeanDev:perf/astc-opaque-bc1
MagicBeanDev:fix/fs-dir-lock
MagicBeanDev:fix/framegen-native-kept
MagicBeanDev:fix/update-no-downgrade
MagicBeanDev:port/k10-gcn-f16-mirrors
MagicBeanDev:fix/framegen-mult-cap
MagicBeanDev:chore/release-as-2.1.1
MagicBeanDev:perf/pcache-load-switch
MagicBeanDev:fix/prepare-progress-log
MagicBeanDev:fix/update-closes-stale-game
MagicBeanDev:fix/hdr-scaled-sampled
MagicBeanDev:perf/first-start-preset
MagicBeanDev:perf/zero-upload
MagicBeanDev:fix/vcore-escape-2s
MagicBeanDev:test/fake-gh-atomic
MagicBeanDev:perf/batch-idle-flush
MagicBeanDev:test/finish-stub-a
MagicBeanDev:chore/record-2.1.0
MagicBeanDev:fix/main-red-tests
MagicBeanDev:fix/test-display-startup-driver-cache
MagicBeanDev:feat/mesh-shader-mode
MagicBeanDev:fix/menu-probes-at-startup
MagicBeanDev:fix/fps-counter-classic
MagicBeanDev:fix/test-log-batch-flake
MagicBeanDev:fix/narrow-screen-hud
MagicBeanDev:ci/prereleases
MagicBeanDev:release/v2.0.15
MagicBeanDev:hotfix/v2.0.15
MagicBeanDev:fix/present-ahead-replay
MagicBeanDev:release/v2.0.13
MagicBeanDev:fix/bracket-paths-2013
MagicBeanDev:fix/hdr-overlays-2013
MagicBeanDev:fix/fps-counter-scale-2013
MagicBeanDev:fix/stick-seen-at-rest
MagicBeanDev:hotfix/menu-fits-screen
MagicBeanDev:fix/f1-always-opens-menu
MagicBeanDev:fix/ini-keep-lines
MagicBeanDev:claude/cranky-pike-7cf247
MagicBeanDev:perf/texture-answer-flat
MagicBeanDev:fix/stamp-test-modules
MagicBeanDev:fix/appimage-fonts
MagicBeanDev:fix/display-awake
MagicBeanDev:release/v2.0.12
MagicBeanDev:fix/discord-windows
MagicBeanDev:rc/v2.0.12-tests
MagicBeanDev:fix/dlss-keep-feature
MagicBeanDev:rc/v2.0.12
MagicBeanDev:button-icons
No reviewers
Labels
Clear labels
accessibility
Barrier affecting people with disabilities
autorelease: pending
autorelease: tagged
bug
Something isn't working
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
duplicate
This issue or pull request already exists
enhancement
New feature or request
github_actions
Pull requests that update GitHub Actions code
good first issue
Good for newcomers
help wanted
Extra attention is needed
invalid
This doesn't seem right
question
Further information is requested
testing wanted
wontfix
This will not be worked on
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
testing wanted
wontfix
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
No assignees
2 participants
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Hookshot!1833
Loading…
Reference in a new issue
No description provided.
Delete branch "FIocker/super-build/neural"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This adds NVIDIA's DLSS 5 neural rendering model, through NGX, running in the temporal chain on the upscaler's picture before the HUD. Over the finished frame it left a dark smudge behind the hearts and text. Off by default.
Rebuilt on main (
51da0464) as reviewers suggested: NGX direct plus the in-chain placement, on #2118's NGX session. It builds on its own now. Streamline and the vendored OpenDLSS-NR are gone from this PR; they could come later as follow-ups if wanted. The menu rows and hooks it needs, which #1834 used to carry, are folded in.What it does
tests/test_nr_settings_live.py). They're saved asneural_renderingandnr_<name>. The rows sit before Bug report, so Restart and Quit stay the table's last two.vk_temporal.cpp, on the engine's picture before the game draws its HUD. That's DLSS, DLAA, FSR 4 or FSR 3.1 on the chain.depth_reversedfor FSR 3.1's 1 − d), motion, jitter and cut resets (NrFrame). It's much cheaper: on an RTX card at 4168×1976, DLSS Quality, 47 fps against 37 after.dlss_nr_before_hud).On #2118's NGX session
vk_dlss.cppexports four small things; there's no secondNVSDK_NGX_VULKAN_Init:dlss_ngx_ready(): itsngx_init(), once.dlss_ngx_runtime(name, …): looks the runtime up inruntime_dirs(), the same folders #2118 gives NGX.nvngx_dlssnr.dllgoes wherenvngx_dlss.dllandnvngx_dlssg.dlldo: the game folder'sngx,RX_VK_DLSS_DIR, or%LOCALAPPDATA%\Hookshot\ngx. The log and the row name where it looked.dlss_ngx_feature_mutex(): DLSS Frame Gen's own lock. Neural rendering holds it around its create, evaluate and release, so with DLSS-G on, the two features' NGX calls never overlap. The order matches DLSS-G's inputs: the chain's lock, then this one. The device idle before a release is taken outside it, under the queue's lock, asfg_releasedoes.dlss_nr_device_extensions(): DLSS-G's own discovery code, made a helper that takes the feature. It's asked only on a device DLSS may run on, so AMD and Intel device creation is unchanged.Fixed from the earlier reviews
nr::apply's two callers (the chain's, under its lock;present_image's) take one at a time.vk_work.hcomes last, withB_DIRECTbefore NGX records.NrFrame) and resets at cuts.Known limits
For maintainers
nvngx_dlssnr.dllruns on RTX 50. The docs don't describe anything else, and Hookshot doesn't read or change NGX's settings or NVIDIA's files.Testing
vk_dlssnr_ngx.cppandvk_dlss.cppcompile with-DHOOKSHOT_NGXagainst NVIDIA's NGX SDK headers and without it, with clang andnx2/build.py's renderer flags. So dovk_temporal.cpp,vk_replay.cpp,vk_main.cppandvk_menu.cpp.tests/run_all.py, the whole suite, locally (clang targeting MSVC, the CPM Vulkan headers, glslang 16.6): 434 passed. The failures are exactly the ones main at51da0464has on this machine, all down to the local toolchain.test_recorder_sync.pyandtest_nr_settings_live.pypass.🤖 Generated with Claude Code
Thanks, this is a lot of careful work, and putting the model inside the upscale chain (before the HUD) is the right fix for the HUD smudge. I read this PR along with the parts of #1831 and #1834 that wire it in, since this PR can't be judged on its own. Several things need sorting before it can land:
This PR can't merge on its own.
nx2/build.pyon main compiles everygpu/vk/*.cpp, so the four new.cppfiles get built right away.vk_dlssnr_ngx.cppthen fails to compile with no NGX SDK:asked()andnr::usenr_settings()andopts.nr_backend, which only #1834 adds.vk_opennr.cppneedsopennr_ptx.h(generated by #1834's build.py) andvk_camera_motion.h/scene_frame_inputs(from #1831). Please mark it as depending on those two, or fold the three into one PR. As things stand, merging them in any other order breaks every build.Tests. main's
tests/run_all.pyretired the central ARGS/SKIP tables. Each test now declaresRUN_ALL_ARGS/RUN_ALL_SKIPin its own file, and any entry added to the old tables stops the whole run ("ARGS, MODULES and SKIP are retired"). #1834 adds the opennr tests to those retired tables, and these test files declare nothing. Sotest_opennr_kernels/harness/khr.pyrun with no arguments and fail on theirrequired=Trueargs, andtest_nr_settings_live.py/test_opennr_backend.pyfail on main without #1834'svk_menu.handvk_main.cpp. CI hasn't run on the branch ("no checks reported").Two threads, one unlocked state.
nr::applyis now called fromtemporal_upscale(the replay thread, with the chain's lock held) and also frompresent_image(the display thread). Onlydlss_nr_before_hud()'s frame window keeps them apart. On the first chain frame after a gap (2 frames in the default stage, 600 before the upscaler), both threads can be insidedlssnr_ngx::apply/opennr::applyat once. Neither has a lock. They share oneNVSDK_NGX_Parameterblock (each points it at its own stackNVSDK_NGX_Resource_VKs) and one set of images. If the two sizes differ (render size vs window size in Before upscaler mode), each call frees and rebuilds the feature and images the other thread just recorded.vk_dlssnr.cpp's resize comment ("apply() runs on the display thread") no longer holds.Compared with #1590:
shutdown()of the three backends is called anywhere in the four PRs, so none is called even at exit. Separately,opennr'scheckerstd::thread can be left joinable in a static at exit (inline comment).s.depth,s.motionandcam.jitterare right there intemporal_upscale. If the model is temporal, it will average the jitter away before DLSS sees it ("slightly softer on fine foliage" fits that) and ghost on camera motion.Other notes:
B_DIRECTdoesn't exist on main yet. If it lands first, every NGX create/evaluate here and the directvkCmd*in these files needrec::boundary(B_DIRECT). Itstest_recorder_sync.pywould flag these files.RX_VK_DLSS_NR*names are distinct,RX_VK_DLSS=0deliberately turns off NGX NR too, and NR's quality values are separate fromopts.dlss3/4/5. This PR adds no numeric option ids (the Neural rows in #1834 are keyed by name).nvngx_dlssnr.dllwith NGX's signature override turned on. The Open backend needs a model folder that can only come from NVIDIA's weights. Maintainers should decide whether they want to document either.@ -0,0 +1,686 @@// (hookshot) DLSS 5 neural rendering through NGX directly; gpu/vk/vk_dlssnr_ngx.h says why there are two paths and whereFine at the present, but #1831 now also calls this from
temporal_upscaleon the jittered render-size scene (Before upscaler). The model is told there is no jitter and no motion, and gets a flat depth, while the reals.depth,s.motionandcam.jitterare right there. If the model keeps history, it will average out the jitter DLSS needs and ghost on camera motion. Can that path pass the real inputs, or at least reset on cuts?@ -0,0 +37,4 @@/// reach the next frame (tests/test_nr_settings_live.py says why that matters here).bool asked() {if (const char* e = getenv("RX_VK_DLSS_NR")) return atoi(e) != 0;return nr_settings().on;This (and
nr::asked_backendreadingopts.nr_backendbelow) is compiled in every build, with or without NGX, andnr_settings()/opts.nr_backendonly exist after #1834. Since build.py globsgpu/vk/*.cpp, this PR alone breaks the build on main.@ -0,0 +77,4 @@VmaAllocation memory{};};struct State {There's no lock on this state, and
applynow has two callers on different threads:temporal_upscale(replay thread, Before upscaler / before HUD) andpresent_image(display thread). Onlydlss_nr_before_hud()'s frame window keeps them apart, and on the first chain frame after a gap both can be in here at once. They shareparams(each points it at its own stack resources) andin/out, and when the sizes differ,ensure_feature/resizefree what the other thread just recorded. A mutex aroundapply, or one owner per stage, would fix it.vk_opennr.cpphas the same problem.@ -0,0 +385,4 @@/// The feature, made for this size, preset and quality: those are creation parameters, so a change of any of them makes/// it again. Creation records into `cmd`.bool ensure_feature(State& s, VkCommandBuffer cmd, const NrSettings& want, uint32_t w, uint32_t h) {if (s.feature && s.feature_w == w && s.feature_h == h && s.feature_preset == want.preset &&Same as #1590: any size change releases the feature and recreates it, and
release_feature/resizeeach do a full device idle. In Before upscaler mode with Resolution Auto, that's a stall on every render-size change. Each refusal is also held against the size, and after six NR is off for the run. Could the feature be created at the max render size and evaluated with subrects, or at least kept for a size seen recently?@ -0,0 +485,4 @@VkImage apply(VkCommandBuffer cmd, VkImage src, uint32_t sw, uint32_t sh, VkImageView* out_view, const NrFrame* frame) {State& s = state();if (!src || !sw || !sh || !asked()) return VK_NULL_HANDLE;When NR is turned off (or another backend is picked), this returns before anything is released. The feature, the parameter block and four full-size images stay allocated for the rest of the run. No
shutdown()of the three backends is called anywhere in this series, so none is called at exit either.@ -0,0 +645,4 @@s.check_done = false;s.phase = kChecking;if (s.checker.joinable()) s.checker.join();s.checker = std::thread([&s] {This thread is joined only on a later
applywith NR on (the kChecking branch) or inshutdown(), and nothing callsshutdown(). If the row is turned off while the check runs,applyreturns early from then on, so thestd::threadstays joinable in the staticState. Its destructor at exit then callsstd::terminate.@ -0,0 +34,4 @@def main():p = argparse.ArgumentParser()p.add_argument("--glslang", required=True)main's run_all.py has retired the ARGS/SKIP tables (#1834 adds these tests there, which stops the whole run). Each test now declares
RUN_ALL_ARGS = ["--glslang", "{glslang}", "--spirv-val", "{spirv_val}"]andRUN_ALL_SKIP = {...}at top level. Without that, this test runs with no args and fails here. The same applies to test_opennr_harness.py and test_opennr_khr.py.Thanks; this review found real bugs. I rebuilt the series on main at
d7a73062, and the description is rewritten.super-build/allis the three together.RUN_ALL_ARGS/RUN_ALL_SKIPthemselves, and nothing goes in the retired tables. Locally,run_all.pyon the three together gives 328 passed. The only failures are the same 18 main has on this machine, all down to the toolchain.nr::applynow takes a lock, so the chain's call (replay thread, chain lock held) andpresent_image's (display thread) never overlap. The order is always the chain's lock, thenapply_mu, then a backend's own; neither caller holdspresent_muthere.nr::apply, which frees its feature or network and images. There's no device teardown path in the renderer to hook at exit; the process just ends.Statelets go of a still-running check, so a static destroyed joinable no longer callsstd::terminateat exit.NrFrame). NGX gets them asDLSSNR.Depth,MVec,JitterOffsetandReset; the open backend drops its history on a reset.vk_dlssnr,vk_dlssnr_ngxandvk_opennrincludevk_work.hlast, withB_DIRECTbefore NGX's, Streamline's and the open network's own recording.test_recorder_sync.pypasses.Thanks for the thorough follow-up. Most of what I raised is fixed, but the ground under this PR moved today, so it can't land as it stands.
Fixed since my last review:
nr::applynow takesapply_mu, and the lock order (chain, thenapply_mu, then the backend's own) holds in the code.nr::apply(row off or another backend picked).std::terminateat exit (one nit inline).NrFramecarries depth, motion, jitter and the cut reset, and both NGX and Open use them.RUN_ALL_ARGS/RUN_ALL_SKIP, and the placeholders (cxx,vulkan_headers,glslang,spirv_val) are ones main'srun_all.pyprovides.vk_work.hcomes last, withB_DIRECTbefore NGX's, Streamline's and the network's own recording.Answered, kept as known limits: the rebuild with a device idle on every size change, and the RGBA8 hop. Both are listed in the description, which is fine for an off-by-default feature.
Still open, and now blocking: the series no longer has a base. #1831 was closed today in favour of #2118 (DLSS-G through NGX, merged). This PR still relies on things only #1831 added:
vk_dlssnr_ngx.cppneedsdlss_ngx_session()/dlss_ngx_runtime()fromvk_dlss.handvk_ngx.h. Main'svk_dlss.hhas neither, andvk_ngx.hdoesn't exist. #2118's NGX session lives invk_dlss.cpp's own state (ngx_init(), file-local).vk_opennr.cppincludesvk_camera_motion.hand callsscene_frame_inputs()/camera_motion::record, which are also #1831-only. That include isn't behindHOOKSHOT_NGX, so it breaks every build, not just NGX ones.nr_settings(),opts.nr_*,opennr_ptx.hfrom build.py, the menu rows and the callers in the chain and the present path. #1834 also patches thevk_dlss.cpp/vk_framegen.cppthat #2118 has since rewritten.So this has to be rebased onto main as it is now. The NGX direct backend should use #2118's session: one small exported accessor from
vk_dlss.cpp(e.g. "NGX is up on this device", runningngx_init()once), and no secondNVSDK_NGX_VULKAN_Init. The camera motion for the Open backend should either come from the chain'sNrFrame(which already has motion before the upscaler) or be dropped from the present-time path. Before that, please check two things against #2118. Isnvngx_dlssnrfound inruntime_dirs(), the paths #2118 gives NGX? And with DLSS-G on, do NR's feature create/release (with its device idle) and DLSS-G's evaluate stay apart?vk_dlss.cppserialises its own NGX calls unders.mu, but NR's run outside that lock.New:
opennr::selected()is true whether or not NR is on, so device creation asks forVK_EXT_shader_float8(and chains its feature struct) on AMD/Intel even when NR is off. NR off should mean no change to device creation there. If Open on AMD must be possible without a restart, that's worth a sentence in the description and docs, plus a test on a non-RDNA GPU.third_party/opendlss-nris MIT with LICENSE, NOTICE and PROVENANCE pinned to an upstream commit, no weights, and the NGX path copies no SDK code. The maintainer questions from last time (documenting the community-patched DLL and a model folder that only NVIDIA's weights can fill) are still for @NotRexed.Overlap: #1590 (DLSS 5 tab plus feature 18 inside
vk_dlss.cpp) and this PR can't both land. #1590 now conflicts with #2118'svk_dlss.cppas well. #1542 is a different mechanism (an external AGPL Vulkan layer driven over IPC, with its own F1 page), so the overlap there is the menu and the "DLSS 5" naming, not code. My suggestion from last time still stands: rebuild this onto main as NGX direct plus the in-chain placement (with the #1834 plumbing it needs folded in, now that #1831 is gone), and send Streamline and the vendored OpenDLSS-NR as follow-ups. That would also make the non-NVIDIA question moot for the first PR.@ -0,0 +16,4 @@#include "vk_streamline.h"#if defined(HOOKSHOT_NGX)#include "vk_dlss.h" // (dlss_ngx_session, dlss_ngx_runtime: the one NGX session and the folders it was given)dlss_ngx_session()/dlss_ngx_runtime()andvk_ngx.hcame from #1831, which is closed. Main'svk_dlss.h(after #2118) exports neither, and its NGX init is file-local invk_dlss.cpp. This needs a small accessor there, sharing #2118's singleNVSDK_NGX_VULKAN_Init, rather than bringing #1831's version back.@ -0,0 +29,4 @@#include "shaders/opennr_khr_spv.h"#include "shaders/opennr_post_comp_spv.h"#include "shaders/opennr_pre_comp_spv.h"#include "vk_camera_motion.h"vk_camera_motion.h,scene_frame_inputs()andcamera_motion::recordare #1831-only too, and this isn't behindHOOKSHOT_NGX, so every build fails on main. Before the upscaler,NrFramealready carries the chain's motion. Could the present-time path go without it, or get it from the chain?@ -0,0 +76,4 @@// (a check still running at exit: let go of, not destroyed joinable, which is std::terminate. It is joined on a later// apply with the row on, or in shutdown; the row turned off mid-check left it joinable in this static for good)~State() {if (checker.joinable()) checker.detach();Nit: this avoids
std::terminate, but the detached lambda captures&sand still writess.check/s.check_doneinto aStatethat is being destroyed. It's only at exit and only mid-check, so it's minor. Giving the thread its own heap result (ashared_ptrit writes into) would make the detach clean.@ -0,0 +461,4 @@if (const char* e = getenv("RX_VK_NR_BACKEND"); e && !strcmp(e, "open")) return true;if (const char* e = getenv("RX_VK_DLSS_NR_BACKEND"); e && (!strcmp(e, "open") || !strcmp(e, "3"))) return true;if (opts.nr_backend == 3) return true;if (dev.physical && dev.props.vendorID != 0x10de) return true; // (not NVIDIA: Open, the khr route)This makes
selected()true on every non-NVIDIA GPU, sodevice_extensions/device_featuresaddVK_EXT_shader_float8and its feature struct on AMD/Intel even with NR off. NR off should leave device creation on non-NVIDIA cards as it is on main. Could this be gated on the row or env asking for Open (or on a model folder being there, as on NVIDIA)?I think this should be closed. It only builds together with #1831 and #1834, and #1831 was closed today in favour of #2118 (merged). vk_opennr.cpp still includes vk_camera_motion.h and calls scene_frame_inputs, which only #1831 added, and neither is on main. vk_dlssnr_ngx.cpp needs nr_settings() from #1834. GitHub shows it as mergeable, but nx2/build.py compiles every gpu/vk/.cpp, so merging it would break every build. Separately, the ~29k lines of opennr__spv.h come from a new scripts/opennr_kernels.py instead of scripts/host_shaders.py, which the repo rules require. The Open backend's model folder can also only come from NVIDIA's weights. #1590 covers the same NGX feature 18 path, builds on its own and is in active review. If you want to keep going, I'd offer the in-chain placement before the HUD to #1590 as a follow-up.
No new commits since my review at this head, so everything in it still stands: the series has lost its base now that #1831 is closed (
vk_ngx.h,dlss_ngx_session()/dlss_ngx_runtime(),vk_camera_motion.handscene_frame_inputs()aren't on main), it still needs #1834's plumbing, and the non-NVIDIA device-creation change (VK_EXT_shader_float8asked for with NR off) is still open.On @Joey-Magnus's review: I agree on the build break, which is the same blocker as above. One point I'd correct:
scripts/host_shaders.pyonly builds the texture shaders ingpu/vk/host_shaders/(a fixed list of three), notgpu/vk/shaders/, and main already has a separate generator inscripts/fsr3_shaders.py. The rule in AGENTS.md is that*_spv.hheaders are compiled by glslang from their sources rather than hand-edited.scripts/opennr_kernels.pydoes that, andtests/test_opennr_kernels.py --checkrecompiles and compares. The real cost of those headers is size (~29k lines of SPIR-V for the vendored network), which is one more reason to send OpenDLSS-NR as a follow-up, as suggested before.On closing in favour of #1590: #1590 currently shows conflicts with main too (it touches the
vk_dlss.cppthat #2118 rewrote), so both need a rebase before either builds on main. Which design lands stays with @NotRexed. My technical view is unchanged: the in-chain placement before the HUD and the separation from SR history are the better base, and the cleanest next step for this PR is a rebuild onto main as NGX direct plus the in-chain placement, using #2118's NGX session, with the #1834 pieces it needs folded in.feat(vk): DLSS 5 neural rendering (NGX direct, Streamline, OpenDLSS-NR), in the upscale chain (builds with #1831, #1834)to feat(vk): DLSS 5 neural rendering through NGX, in the temporal chain before the HUDRebuilt on main at
51da0464(ef1b7b81), as hckrman101 suggested: NGX direct plus the in-chain placement, on #2118's session, with the plumbing it needs folded in. It builds on its own now. Streamline and OpenDLSS-NR are gone from it.Your two questions:
runtime_dirs(): yes.dlss_ngx_runtimelooks the runtime up inruntime_dirs(), and NGX is told the same folders, sonvngx_dlssnr.dllgoes where #2118'snvngx_dlssg.dllgoes.dlss_ngx_feature_mutex(), which is DLSS-G's ownFg::mu, so the two never overlap. The order matchesdlss_fg_inputs: the chain's lock first. The device idle before a release is taken outside it, under the queue's lock, asfg_releasedoes.The rest:
@Joey-Magnus: thanks for the review. The build break is gone:
vk_camera_motion.h,scene_frame_inputs,vk_ngx.hand the SPIR-V headers are no longer in this PR, andnr_settings()comes with it. Which of this and #1590 lands is NotRexed's call. If it's #1590, I'm happy to offer the before-HUD placement there.Locally, the whole
run_all.pymatches main on this machine (434 passed). An in-game run of this head with DLSS-G on and off, plus screenshots, is still to come.github-sync referenced this pull request2026-11-12 13:39:06 +00:00
The rebuild fixes what I raised. It builds on its own now (no vk_camera_motion.h, no scene_frame_inputs, nothing from #1834), the OpenDLSS-NR SPIR-V headers and Streamline are gone, and the NGX session, the runtime folders and the DLSS-G lock all come from #2118. CI is green on ef1b7b8, which sits on current main.
Still open:
#1590 adds the same feature-18 path, so only one of them can land. Which one is @NotRexed's call.