perf(dlss): create features at the recommended render size #311
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/upscaling
beanstalk: approved @ 1697603
beanstalk: approved @ 2c5a62e
beanstalk: approved @ 4fd82b7
beanstalk: approved @ 64d6d09
beanstalk: approved @ 6f91fae
beanstalk: approved @ 70a78f9
beanstalk: approved @ 8d361dc
beanstalk: approved @ 9d8356e
beanstalk: approved @ abf2227
beanstalk: approved @ d82f202
beanstalk: approved @ e5f1e40
beanstalk: approved @ ee8ab5f
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
testing wanted
ci: approved
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!311
Loading…
Reference in a new issue
No description provided.
Delete branch "futondestroyer/Longshot:perf/dlss-chain"
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?
Type: perf · Risk: medium · Tested on: Windows, RTX 4070 · Needs: Linux NVIDIA NGX build/runtime
Why
Scaled DLSS spends unnecessary GPU time and power with models L and M. Initializing the feature at NGX's recommended render size removes an avoidable part of that cost.
What changed
Use NGX's recommended creation size while retaining full dynamic input resources and the actual evaluation subrect. This targets scaled L/M initialization cost without changing models or synchronization.
gpu/vk/vk_dlss.cpp::prepare: retain the recommended dimensions for each successful quality-mode query and use the selected recommendation for feature creation. Input allocations still cover the advertised dynamic range; evaluation still receives the actual render subrect. Native AA retains full-resolution feature creation.Measurements
Current review base: main @
7494ce4e. The current pushed head is named in Reviewer notes; the table retains the actual historical measured builds.Verdict: Historical Windows measurements show about 16.1% higher average FPS for L and 12.4% for M. The exact M gain remains preliminary because PR repeats span 6.08%; the ABBA run order and per-run statistics remain disclosed.
Main at original submission:
514591a3(2026-11-13; baseline actually used for the performance comparisons below).Branch at original submission: perf/dlss-chain @
b319780c(the measured code commit). The branch is now rebased onto main5e072fc8at65c27efb.Rebase evidence: the DLSS source and SDK-free regression remain byte-for-byte unchanged from the measured branch. Main
5e072fc8has not changed vk_dlss.cpp since the previouscf605c85refresh. The sizing documentation now clarifies the fixture boundary. The original comparison measures the same feature-sizing change on the exact old build named in every column. Main has changed other renderer/runtime paths: the old absolute FPS, GPU time and power are historical measurements, not measurements of5e072fc8or a new post-rebase performance claim. The rebased code has been rechecked and rebuilt as described under Testing.Hardware: RTX 4070 12 GB, NVIDIA 621.01, i7-13700F, 32 GB RAM, Windows 11 Home build 26300.
Scene: Market, child, standing at the fountain from the same locally copied save; 3440x1440 output and client area, DLSS 67% (2294x960), K/L/M, sharpness 0, frame generation off, Reflex off, V-Sync off, uncapped. HDR Native/Vanilla selected, but the display advertised no HDR surface: all four performance runs actually used SDR, confirmed by the startup and NGX feature logs.
Method: renderer-only development packs on the same build
v2.1.0-rc.3-413-g514591a3(source2af40fe2); baseline host hash verified before every run. Four sequential processes in main / PR / PR / main order, two runs each. This is ABBA, not the prescribed main / PR / main / PR (ABAB); it is a method deviation and no fresh ABAB run is claimed. The second and fourth processes used reversed phase order. Game time and NPCs advance naturally; the two arms each cover both phase orders, rather than freezing world state. Each mode settles for 12 s, then records at least 25 s and 1,200 presents. Table values are medians of the two run summaries. Present intervals come fromHOS_PRESENT_TRACE; GPU time from the ordinary runtime log (no serializing diagnostic timestamps); board power from 500 msnvidia-smisampling. Every recorded scaling sample passed the quiet-machine check and continuously checked scene/window dimensions. 1% low is 1000 divided by the mean of the slowest 1% of present intervals.How to reproduce: stand at the Market fountain on a child save, fix output at 3440x1440 and render resolution at 67%, turn frame generation/V-Sync off and remove the cap, then alternate main and this PR with the same save/cache/settings for each model. Compare the
GPU timeandNVIDIA DLSSstatus lines as well as present intervals. Do not compare a different display/HDR mode or a profiled build.514591a3b319780cThe measured average-FPS gain is 16.1% for L and 12.4% for M. The exact M gain is preliminary: the two PR M runs span 17.699–18.809 ms average frame time, a 6.08% repeat spread. The repeated L runs are tighter (1.29% main, 2.31% PR). K and upscaler-off do not show a repeatable gain. This does not remove the intrinsic cost of DLSS or claim a Native AA speedup. VRAM samples varied with accumulated caches/feature retirement, so no memory saving is claimed.
Repeat spread below is
(maximum - minimum) / median * 100of the two per-run average frame times, not of individual frame times or per-run medians. Each summary metric above is independently the median of its two run summaries; FPS is computed as 1000 / average interval for each run before taking that median.Per-run timing and quiet-machine summaries (original measured builds)
The per-run timing numbers were recomputed from locally retained traces and matched every original audited summary. Each frame range is complete and contiguous. p99 is the nearest-rank 99th percentile; the 1% low uses the slowest
ceil(N * 0.01)intervals. Interval sums give the measured duration, not wall time including setup. Quiet figures are CPU busy cores excluding the game's process; eligibility requires mean <3 and peak over 5 seconds <=6. All 16 phases passed. Raw game-derived traces remain local under CONTRIBUTING.md; these numeric summaries expose the aggregation without uploading them.Flags and settings
None. None added. Existing DLSS settings use the corrected initialization. No model defaults change.
Testing
Readiness validation on main7494ce4e: clean main: 533 passed, 7 failed, 34 skipped in 119 s (windows, 24 at once). This PR: 534 passed, 7 failed, 34 skipped in 121 s (windows, 24 at once). The same seven failures occur on both:
tests/test_cpm_discovery.py,tests/test_linux_preflight.py,tests/test_make_game_cache.py,tests/test_oot_state_tap.py,tests/test_release.py,tests/test_tested_configurations.py,tests/test_walk_key.py. No PR-only failures. The previous Windows NGX renderer build passed and its production source is byte-identical; the additional current-main renderer rebuild is deferred while another job holds the shared test lock and for the scheduled autobuild priority window. The PR production files are byte-identical to the prior submitted head. All eight related PR screenshot links were checked anonymously with range GET: HTTP206 and valid PNG signatures; HEAD requests are rejected by the server and were not used as evidence of broken links. No new in-game or performance run is claimed.Tested: Original pre-rebase Windows renderer pack built from the committed change with llvm-mingw and the local optional NGX SDK. New regression passes here and fails at the recommended-width assertion on unchanged main. Full
python -I -B tests/run_all.py: 496 passed, 5 failed, 33 skipped in 126 s. The same five checks fail on clean main:nx2/test_nup_paths.py,tests/test_finish_output.py,tests/test_check_third_party.py,tests/test_menu_i18n.py,tests/test_release.py. These include Windows symlink privilege, NGX staging expectations and translation/release fixtures outside this change. The third-party checker also counts ignored build DLLs on the built checkout because its text-modegit check-ignore --stdinloses ignored-path matching on Windows; the fresh main checkout lacks those artifacts. Every shared file in the three affected parts (a64-kit,sdl2,zbic) was compared byte for byte to clean main with no differences, and the fake clean-tree ignored-file case fails on both. A direct text-stdin versus byte-stdin control confirmed the ignore-matching difference. No provenance hashes were changed or checks weakened.Actual Native HDR/Vanilla correctness controls on main and the PR: K/L/M Native AA sustained 600/600 evaluations in the last complete interval for every phase. One run per arm, so these are correctness controls, not speedup measurements. aa3-main-a: KAA GPU 12.3 ms, LAA GPU 17.5 ms, MAA GPU 16.1 ms; aa3-pr-b: MAA GPU 16.5 ms, LAA GPU 17.8 ms, KAA GPU 12.3 ms. The PR also sustained K/L/M at 83% (2867x1200, above the 2293x960 creation recommendation), with full-size 3440x1440 input resources, no evaluation fallback, and quiet/scene/window guards passing. Local captures were inspected for coverage and obvious corruption. The performance comparisons and these HDR controls are separate datasets; no HDR-versus-SDR speed comparison is made.
Post-rebase validation on main
5e072fc8and this PR @65c27efb, bundled Python 3.14.7 and llvm-mingw: fullpython -I -B tests/run_all.pygave 522 passed, 6 failed, 34 skipped in 119 s on the PR and 521 passed, 6 failed, 34 skipped in 117 s on clean main. Shared failures:tests/test_framegen_resources.py,tests/test_module_ids.py,tests/test_oot_state_tap.py,tests/test_pad_layout.py,tests/test_release.py,tests/test_tested_configurations.py. No PR-only failures. The tested-configurations unit failure is its ASCII-pipe CRLF/LF expectation on Windows; the seven migrated records remain verbatim and the frozen main table is unchanged.The source-reading DLSS regression passes on the rebased PR and fails on clean current main at the intended recommended-size assertion (2293x960). The Windows renderer with the actual optional NGX SDK compiles and links successfully (54 s); this is a build check, not a new in-game performance run. No third-party files, provenance hashes or regression assertions were changed. The fixture checks requested input dimensions; it does not allocate GPU images or execute NGX evaluation.
Forgejo source-check jobs on the pushed head are blocked by required conditions, not passing: CI run 5047 and third-party run 5048. The description job succeeded. A maintainer must unblock the fork workflows; local test results above are separate evidence.
Not tested: Linux build/runtime, other NVIDIA generations/drivers, other areas, extended gameplay or injected GPU failures. The SDK-free fixture covers sizing in both color modes but cannot prove other drivers' behavior. Frame generation and PsychoV35 are separate from this change.
External checks: Fork CI remains blocked by required conditions; Test Farm approval awaits a maintainer. These are pending, not passing. The Linux checkbox stays unticked; do not mark ready until required external coverage is settled.
Must be tested:
Screenshots
No intended visible change. The two original measured-build images are now PR attachments, verified anonymously accessible (HTTP 200, identical hashes). Same-scene images checked for output coverage and obvious corruption; HDR screenshots are not used to claim calibrated color accuracy.
main @
514591a3, L 67%, SDRthis PR @
b319780c, L 67%, SDRRisks
What could break: NGX dynamic-resolution handling can differ by driver/runtime. Test inputs above the creation recommendation, rounded dimensions and native AA before accepting additional hardware coverage. Reverting the sizing commit restores the previous creation dimensions. Input allocations, evaluation subrects and resource synchronization are unchanged.
Turning it off: Revert the sizing change.
Compatibility: No save migration, option-file schema, public renderer ABI or builder-tool requirement is introduced by this PR. No shader-cache format change is introduced by this PR.
Reviewer notes
Final upstream check: main advanced to
5d3ecc78after the validated rebase at7494ce4e.git merge-treereports a clean merge for this PR against that newer main; the full-suite/build numbers above remain tied to the validated7494ce4e base. No new measured result on5d3ecc78 is claimed. The combined-tree fixture run is prepared but deferred while another job holds the shared lock and for the17:30 Halifax autobuild priority window; standalone PR fixtures passed.Review the separate recommended, maximum-resource and actual-evaluation dimensions first. This addresses the scaled initialization penalty only; the original report also includes Native AA and model cost. PsychoV35 work was checked before claiming and is not duplicated here.
Current readiness refresh rebases onto main7494ce4e; current branch head
705f1534. Historical game measurements retain their original measured commits. This rebase includes upstream build/profile changes, so no current-head performance claim is made. The relevant production functions are unchanged by this readiness refresh; no production changes were added in this readiness refresh. Each PR merges individually against current main; shared documentation requires preserving each path when the other PRs land.Issues
See #17
Checklist
Everyone
type(scope): description) of the status line's type.main. (Validated7494ce4e; final clean-merge check against5d3ecc78.)python -I -B tests/run_all.pypasses (any failure that also fails onmainis named).third_party/untouched (a new folder with aPROVENANCE.mdinstead).When it applies
Assisted-by:/Co-Authored-By:trailers.docs/tested/for each new measured run (format indocs/tested-configurations.md).mainand passing here.tests/that reads changed source updated in this PR, not weakened.Recorded the completed main/PR/PR/main Windows comparison, actual Native HDR Native-AA controls and above-recommended 83% validation; added inspected SDR screenshots. Linux/NVIDIA request T-EJXP is open and awaits a maintainer testing wanted label. The code remains WIP for Linux coverage.
proci referenced this pull request2026-11-14 00:01:43 +00:00
5bcd5d47c6db2a83b851Rebased onto main
cf605c85and resolved the catalogue conflict by migrating all seven original measurement rows verbatim into docs/tested/ files; the frozen table is unchanged. The DLSS source and regression fixture are unchanged. Rebased checks: PR 520 passed/6 failed/34 skipped, clean main 519 passed/the same 6 failed/34 skipped; the new regression passes here and fails at the intended assertion on current main. The Windows renderer rebuilt and linked with the actual NGX SDK (58 s, zero compiler failures). Description/checklist refreshed, including explicit historical-measurement scope. Linux/NVIDIA coverage remains pending T-EJXP: could a maintainer add testing wanted so a tester can claim it? Keeping this PR WIP until that coverage is settled.Read head
db2a83b8against maincf605c85: the complete diff, description and both comments, the empty review list, the preparation/allocation/evaluation paths and NVIDIA's reference implementation; the new regression and twelve related drivers pass here, with GCC and Clang for every compiled fixture. The new regression fails against main at the recommended-size assertion with both compilers. No game or renderer build was run.What's good
514591a3andb319780c, not the rebuilt head. All seven records are now underdocs/tested/, and the frozen table is unchanged.Must change
No patch-introduced correctness defect found in this head.
Measurement and smaller points
CONTRIBUTING.md. Per-run median, p99 and 1% low values, with the underlying traces and quiet-check results, would let readers check the rest of the summary rather than just its average-FPS arithmetic.docs/temporal-history.md, lines 20-22, says it checks input allocations. It executesprepare()and checks the returned dimensions; it does not allocate the images or call NGX evaluation. Say “requested input dimensions” there. For the pending Linux run, include the rounded Ultra Performance case as well as 67%, 75%/83% and Native AA: the fixture's 1147x480 input is above its advertised 1146x480 maximum, which a recording stand-in cannot validate against the real runtime.Not checked
No Linux NGX build or game run, Windows execution of these fixtures, other NVIDIA hardware, frame generation, extended play or visual comparison here. The remaining Linux coverage in T-EJXP is still needed; these game-free checks do not satisfy that request. The source-check jobs are blocked, not passing: https://git.magicbean.dev/MagicBeanDev/Longshot/actions/runs/3860. The full published captures, timing traces and quiet-check records were not available in the pull request.
db2a83b85165c27efb08Addressed the actionable items in the review, rebased onto main
5e072fc8, and pushed head65c27efb.Validation: full game-free suites give 522 passed, 6 failed, 34 skipped on the PR versus 521 passed, the same 6 failed, 34 skipped on fresh main; no PR-only failures. The DLSS regression passes here and fails at the intended recommended-size assertion on main. The actual Windows NGX renderer compiles and links successfully. The description names all shared failures and preserves the exact historical measured commits; no new performance runs are claimed.
Remaining: real Linux NGX build/runtime evidence and maintainer authorization for the test request (
testing wanted). The pushed head's CI source checks and third-party checks are blocked by required conditions, not passing. The Linux checklist remains unticked and the PR remains WIP until that evidence is available. Could a maintainer enable the test request and unblock the fork workflows?WIP: perf(dlss): create features at the recommended render sizeto perf(dlss): create features at the recommended render sizeperf(dlss): create features at the recommended render sizeto WIP: perf(dlss): create features at the recommended render sizeReadiness refresh: rebased onto main7494ce4e. The PR production files are byte-identical to the previously submitted head; historical game measurements remain tied to their measured commits. Fresh local main/branch suites and Windows builds are in progress under the shared-machine lock; no new gameplay or performance run is claimed.
@Beanstalk Linux NVIDIA renderer build with a locally installed NGX SDK/runtime, then real NGX checks of K/L/M at 67%, 75/83%, Native AA and rounded Ultra Performance 1147x480 input versus advertised maximum1146x480, SDR and supported Native HDR. Expect sustained evaluations and no crop/flicker/device loss or K/Native-AA regression; use the documented same-scene comparisons, preserve game files locally. Build and run through the development guide; publish compiler/OS/hardware, exact tested commit, results and safe log excerpts on this PR. The existing manual test request remains open; no duplicate manual request is being created.
The Linux checklist is still unticked, so this PR has been returned to WIP consistently with that requirement. No PR has been merged.
@futondestroyer only members of
BigBeanscan start the farm.One of them can approve this request by reacting 👍 to it.This request was for65c27ef, and the PR has changed since (705f153), so a 👍 no longer approves it. Comment@Beanstalkagain to ask for the new commit.65c27efb08705f153432Readiness audit completed: rebased onto7494ce4e; final clean-merge check also passes against newer main5d3ecc78. Refreshed the description to the current template, preserving the actual historical game-measurement commits and screenshots. Fresh full suites have no PR-only failures against the same seven failures reproduced on clean7494ce4e. All screenshot links return valid PNG data through anonymous range GET. The prior Windows NGX build remains valid for byte-identical production source; the extra current-main rebuild is deferred while another job owns the shared lock and for the scheduled autobuild. The combined-tree fixture check is similarly deferred; no combined-runtime claim is made. Linux (and the listed AMD HDR checks where applicable) remain pending. Test Farm approval and fork CI jobs explicitly await maintainer authorization, so this remains WIP. Please approve the farm/fork jobs and enable the existing manual requests as appropriate. No PR was merged.
@Beanstalk Please validate current head
705f153432: Linux NVIDIA renderer build with a locally installed NGX SDK/runtime, then actual NGX checks for K/L/M at 67%, 75%/83%, Native AA and rounded Ultra Performance 1147x480 input versus advertised maximum 1146x480, SDR and supported Native HDR. Follow the development guide and preserve game files locally. Expect sustained evaluations without crop, flicker, device loss or K/Native-AA regression; report exact commits, OS/compiler/GPU/driver and the same-scene results. This replaces the earlier request that the farm attached to the pre-rebase head. Fresh Windows suites have no PR-only failures; the extra current-main Windows rebuild remains deferred for shared-job/autobuild priority.@futondestroyer only members of
BigBeanscan start the farm. One of them can approve this request by reacting 👍 to it.WIP: perf(dlss): create features at the recommended render sizeto perf(dlss): create features at the recommended render sizeView command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.