feat(vk): neural rendering at the present, through NGX direct and OpenDLSS-NR, with a Neural tab #2820
Open
github-sync
wants to merge 6 commits from
github/pr/2820 into main
pull from: github/pr/2820
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/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
1 participant
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!2820
Loading…
Reference in a new issue
No description provided.
Delete branch "github/pr/2820"
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?
Hookshot has no neural rendering in the tree: #1590 and #1833 are both open for it, and #1833 (which carries an earlier copy of this code from my fork) cannot be merged because it only builds together with two other PRs. This is the same work as one branch that builds and passes the checks alone on main, with the review points raised on #1833 and #1335 dealt with.
Two things to know before reviewing. NVIDIA ships no Linux
libnvidia-ngx-dlssnr.so, so the NGX direct backend has not evaluated a frame on the PC this was prepared on: it needs a run on Windows with an RTX card before it merges (testing wanted). And it overlaps #1590, which is in review for the same NGX feature: I would rather the maintainers say how they want the two to relate (this as a follow-up for the Open backend and the Resolution scale, or parts of it folded into #1590) than have two PRs compete.What it is
A model run over each of the game's finished frames at the present, before frame generation, with a Neural tab in the Insert menu (On/Off, Backend, Model, Style, Preset, Passes, Resolution scale, Intensity and the tone and structure strengths, Auto mask), every row read live and saved as
nr_<name>.vk_dlssnr_ngx.cpp,vk_ngx.cpp): NGX feature 18 on DLSS's own NGX session. Nothing of NVIDIA's is in the repository; the player's ownnvngx_dlssnr.dllis looked for where DLSS's runtime is.vk_opennr.cpp,gpu/vk/opennr/,third_party/opendlss-nr, MIT): OpenDLSS-NR, the network run by compute shaders, from a model folder the player supplies. Hookshot ships no weights and fetches none.vk_nr_scale.cpp,nr_plan.h): the model on a smaller copy of the picture with its detail put back at full size, which is what makes it affordable (numbers below).Review points from #1833, and what this does about them
vk_camera_motion.h, noscene_frame_inputs. The temporal path takes the scene's motion fromvk_fsr3_inputsas FSR 3.1's interpolation does.VK_EXT_shader_float8asked for with NR off on non-NVIDIA devices." The Open backend's extensions and features are requested only when the player has asked for it by the time the device is made: Neural rendering saved On with Backend at Open (or Auto on a GPU that is not NVIDIA's), a model folder already in place, orRX_VK_DLSS_NR_BACKEND=open. With the row off and no model folder,vkCreateDevicegets exactly what it gets today on every vendor;tests/test_opennr_backend.pypins that. A row turned on later without them says a restart is needed.opennr_*_spv.h. They are compiled by glslang from their sources byscripts/opennr_kernels.py, andtests/test_opennr_kernels.pyrecompiles and compares. Size: of this PR's lines, the vendoredthird_party/opendlss-nrand the generated SPIR-V headers are the large majority; the hand-written part is about 7,400 lines across 56 files, tests and docs included.How it was tested
tests/run_all.py(Linux, main at65a4d874merged in): 504 passed, 2 failed, 22 skipped. Two checks fail on this branch exactly as they fail on main at65a4d874without it:test_readme_menu_rows(the Skip opening row has no readme line; #2857 is open for it) andtest_program_cache_one_variant(its fixture lacks the zstd cache's names since #1630).test_readme_menu_rowsnow reads the Neural tab too, and the readme's option table has a line for each of its rows.65a4d874(run again after that merge) and a synthetic model (scripts/opennr_harness.py model, random weights of the right shapes: it proves the path, not the picture): RTX 5060 Ti 16 GB, driver 615.71.09, Linux (COSMIC, Wayland), Kokiri Forest, 2048x1152 output, DLSS, V-Sync Off.Scale changed in play both ways, the row off and on again, Backend to NGX direct (refused with the reason below, the game's picture shown) and back to Auto (Open again), DLSS Frame Generation at 2x on top (600 of 600 presents made by DLSS-G): no device lost, no error.
NGX answers DLSSNR.Available = 0 ... NVIDIA has not shipped it for Linux yet.Not tested
nvngx_dlssnr.dll). Compiled and read only.khrroute), Intel, and Windows at all.Known and left
🤖 Generated with Claude Code