GPU: reduce submit-thread work tracking pending refreshes #2665
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!2665
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2665"
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?
@yumaste on GitHub · 2026-11-29 15:44 UTC · original
yumaste:nvidia/perf-submit-overlap→main· +68 −22 · 1 files · 1 commits · merged 2026-11-30 14:12 UTC## Changes
The direct scan is used when write-watch is queried per range and when the submitter checks again after a flight lands. The submit lock prevents a new declaration during the scan. If the last writer retires during that scan, the existing stale check finds no pending ranges under the shadow lock.
Measurement
Optimized synthetic A/B on a Core Ultra 9 275HX, with 20,000 refreshes to 4,500 copies across 20 lists. Both scan implementations ran in the same process, in alternating order. Each row reports the median of 12 batches of 150 scans. Output ranges and host-copy identity matched before timing.
Range merging took 2.67 to 2.48 µs for 256 existing ranges and 64 incoming ranges. These timings describe CPU work in synthetic benchmarks. In-game frame time is still unmeasured.
Validation
829188e9and on this branch.@BitWuehler on GitHub · 2026-11-29 16:41 UTC · original
Confirmed clean merge and in-game stability on Linux (CachyOS) / GE-Proton 11-14 (
vkd3d-proton master) / Ryzen 7 9800X3D / RTX 5080 16 GB (base829188e9+ #2647 + #2656, Series X profile, 1440p, DLSS Quality):(Test summary compiled with AI assistance.)
@tillo88 on GitHub · 2026-11-29 18:05 UTC · original
In-game measurement, since the description says frame time is still unmeasured.
Same route each run: load a save at the start of the game, prison cutscene, then the first boat section to the first package (about 5 min, the same inputs). Numbers are means of the 5-second lines over the run.
829188e9, run 1The PR lands between the two base runs, so on this route the difference is below the run-to-run noise (about 5%). No crashes or visual problems in its run. That fits the synthetic numbers: about 0.1 ms saved a scan against frames of ~33 ms.
For what it's worth, VICTORY_FLUSH_SIFT=1 + VICTORY_FRONT_SIFT=1 measured the same way gave 30.3 fps / 8.4 ms (also noise: here flushes average ~170 refreshes, under the 256 that turns them on), and VICTORY_NEW_BATCH=1 was worse: 29.1 fps / 11.0 ms refreshes.
Setup: Ryzen 7 9800X3D, RTX 5070 Ti 16 GB (driver 621.40), 32 GB RAM, Windows 11, release build, Series X 1440p, DLSS Quality, frame generation off, ray tracing builder off.
@icdmkg2 on GitHub · 2026-11-29 18:20 UTC · original
An in-game data point from an 8 GB laptop. It covers this PR together with four others, so it can't attribute the gain to this one alone.
Setup: RTX 5060 Laptop GPU (8 GB), Ryzen 7 H 260 (8 cores), 32 GB, Windows 11, driver 621.24.
mainat55d06914, release build, Series S, DLSS performance,VICTORY_LEVELS_ON_DEMAND=0andVICTORY_COMMIT_FLOOR_MB=1024in both builds (see #1411 for why). Same save (the prologue's cell), driven by a script: 60 s measured after a 30 s settle, warm shader cache, two alternating pairs.Combo:
main+ #2549 + #2783 + #2647 + #2665 + #2795. These merge cleanly together. #2796, #2656, #2604 and #2587 conflict with that set, so they weren't tested.mainThat's about 15–18 % shorter frames and half the slow frames, with no crash and no device removal. A frame capture of the combo (diagnostics build,
VICTORY_CAPTURE_WORLD) matchedmain's brightness (mean luma 66.4 against 66.2), with no black holes.One thing for the diagnostics build: with these merged together,
--features diagnosticsno longer compiles. A localtiminginsubmitshadowshost::timing()at three call sites, andcopystat::log_heap_elsewhereuses anmbhelper it doesn't define. Both are one-line fixes; mentioning it in case whichever lands second hits it.@Yuanzer on GitHub · 2026-11-29 18:47 UTC · original · edited 2026-11-29 19:16 UTC
Correction after a same-source control run (AI-assisted local test):
My first pair used an older prebuilt main binary, and it was not comparable to a fresh #2665 build. I rebuilt clean main
829188e9in a new worktree with the same toolchain, target directory style, release profile, and host-log filter. The corrected pair is:829188e951db545dBoth runs used Series S 720p, DLSS Quality preset M, frame generation off, fixed world clock 12:00, and the same saved F1 settings. The PR shows a modest improvement here: +1 FPS, about 2.9 ms shorter median frames, and about 1.8 ms less submit-thread work. The size is within the range of run noise, so I would call it neutral-to-positive rather than a proven universal gain.
I withdraw the earlier regression claim. The earlier 21 FPS comparison was against a stale/pre-existing binary whose build context was not the same as the fresh PR build. I also tried a local variant that cached writes_pending per copy; it did not improve this scene, so I am leaving the submitted implementation alone.
Runs and readings are from the reporter's machine; analysis and wording are AI-assisted.
@icdmkg2 on GitHub · 2026-11-29 19:21 UTC · original
A second data point, for comparison with @Yuanzer's. Different CPU: RTX 5060 Laptop 8 GB with a Ryzen 7 H 260 (8 cores, no E-cores), Series S, DLSS performance, release.
Same base set (
main55d06914+ #2549 + #2783 + #2647 + #2795), with and without this PR, two alternating pairs:Neutral here: no gain and no loss within the noise, so I don't see the 6 ms regression measured on the i7-14700KF. That's consistent with the per-refresh
writes_pending()hypothesis costing more on a hybrid CPU, but it doesn't confirm it.