Skip unused raw twins for cached list views #3833
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3833"
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?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by andrewpozdnakov7-jpg on 2026-11-30T08:45:50Z.
Fixes #3807.
What it changes
make_listedcreates a raw twin for each buffer view even when the shader translator is using the ordinary indices. On a capped view heap whereraw_views() == 0, that twin never reaches a slot the shader reads.Skip the scratch twin when the shader translator has no twin region. Use the translator's setting because the list cache can supply a record to more than one heap. The existing stride-table test now checks the cache entry's twin flag as well as the ordinary stride for the first copy and the cache hit.
How it was tested
HostHeap::make_listed. With twins disabled, main41adb551created two scratch twins and failed the new zero-count assertion. This patch created zero and passed. The ordinary descriptor strides matched in both runs.git diff --checkpassed.Checked for overlap
Hardware follow-up
Robotniq ran two five-minute passes from the same save on an RTX 3070 Ti 8 GB with a 1M-view heap and
raw_twins=false. The baseline reported a median 7,708 twins per frame. With6cf5ea7the counter never printed. All 80 descriptor-host tests passed on that system. The measured frame-rate difference was within run-to-run noise. Hardware reportakimfomin backported the same change onto a pinned test control and repeated the same route on an RTX 4070 Ti SUPER with a 1M-view heap. Their baseline reported about 25,000 scratch twins per frame near the end. The patched run reported none, and all 71 enabled descriptor-host tests passed. Both runs reached the route and exited normally. The single 15-second pair does not establish a frame-rate change. Ada hardware report
Prepared with Codex.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by andrewpozdnakov7-jpg on 2026-11-30T09:01:40Z.
The Windows CI job stopped at the first Clippy step with
unwind_copyunused invictory-loader/src/crash.rs:804. I reproduced that diagnostic on the unmodified base41adb551with Rust 1.98.1/MSVC andcargo clippy --locked -p victory-loader --all-targets -- -D warnings. The CI diagnostics build and workspace tests were skipped after that first failure. CI jobThe focused WARP comparison and staged asset policy passed. The upstream loader warning is already covered by #3785 and #2019.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Robotniq on 2026-11-30T09:33:07Z.
Tested on the setup #3807 came from: RTX 3070 Ti 8 GB, driver 621.40, Windows 11,
views=1000000 raw_twins=false. Two automated 5-minute runs from the same save (boat scene, Series S, DLSS Quality, diagnostics build), with nobody at the controls:41adb551+ local commits that do not touchdescriptor/)6cf5ea7d)raw twins of buffer views made per framelinespresentCommon()lineSo the count goes away, as expected. There is no measurable change in list-thread time or fps in this scene; the fps gap is within run-to-run noise here.
cargo test --locked -p victory-gpu --lib descriptor::host: 80 passed.Not checked: anything visual, since nobody was watching the screen, and the city, where the list threads do more work.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by akimfomin on 2026-11-30T10:51:27Z.
@andrewpozdnakov7-jpg @Robotniq I reproduced the descriptor result on Windows with RTX 4070 Ti SUPER (617.14) and the 1M-view heap reporting raw_twins=false. I backported
6cf5ea7donto the pinned Lab control. All 71 enabled descriptor-host tests passed. In the same native 2560×1440 Series X moving route with full stock RT, no DLSS/FG, and the same prepared cache, the baseline printed ~25k scratch twins per frame near the end, while the patched build printed none across the whole session. One 15 s pass each gave 13.42 → 13.38 median rendered FPS and 12.27 → 12.64 average. The graphics checks reached the route and normal exit. That corroborates the eliminated descriptor work on Ada. Frame pacing and FPS would need paired repeats for a performance claim.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by andrewpozdnakov7-jpg on 2026-11-30T15:27:59Z.
The existing PR branch now contains the current release main
c71899dinb4575c7. This merge keeps the original fix commit and GitHub still shows one changed file.I repeated the same fixture on WARP 1.0.22 with Agility 1.620.2. With raw twins disabled, the two synthetic records and their cache hits made two scratch twins on release main and zero with this PR. With the scratch path enabled in the fixture, both sides made two. The ordinary descriptor strides matched in all cases. The rest of the descriptor-host suite passed 84 tests on each side with one benchmark ignored.
Both local test builds included the #4018 unit-test build fix. The outgoing change passed staged asset policy. The current-base Windows CI job stopped at Clippy on unused
loop_caps, unusedShadow::ranged, and the two missingcard_passarguments. The clean-main CI job reports the same four errors. The automated test step is pending those baseline fixes.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by mia03ther on 2026-11-30T16:37:18Z.
Follow-up from #3909: I tested a local release build on top of
c71899d(v2026.11.30.01) with #3833 applied on the same laptop and settings (Ryzen 9 8940HX,RTX 5070 Ti Laptop 12 GBdriver621.24,16 GB DDR5, Windows 1126300,console=series-s,DLSS Performance,1M-view heap withraw_twins=false).Startup heap line (patched run):
>=1500 draws/frame/ active world12-250 msmedians)v2026.11.29.05(895s blocks,4841s intervals)c71899d+ #3833 build (2245s blocks,1,1801s intervals)raw twins of buffer views made per framelines484lines (13,236–13,258twins/frame,~594null late-run)0lines (0raw twins made across all56,348frames / 22 min)descriptor recordssync ms (1s world median)13.54 ms(279.8pages,241,304slots)12.34 ms(291.2pages,261,881slots)descriptorbreakdown05:37:58:13.60 ms(3.89 asking, 6.60 reading, 2.22 making,263.9pages,212,197slots)16:22:00:12.04 ms(4.64 asking, 4.41 reading, 2.35 making,285.5pages,256,142slots)host_perfFPS median (p10/p90)14.9 fps(8.4/18.1),67.0 ms19.4 fps(15.7/21.7),51.5 msframe_timesp99 (world intervals) />100 mstotal frames141.8 ms/694of10,933(6.35%)77.3 ms/398of56,348(0.71%)Disclosure on comparability: because the patched run moved from
v2026.11.29.05tov2026.11.30.01(c71899d) and also included local cherry-picks (#4006, #3881, #3904, #4025) plusVICTORY_KEEP_RAM_GB=8/VICTORY_SLOT_EVICT_PERCENT=94(which cut eviction look time from20.69 msto3.27 ms), the overall FPS and hitch gains reflect the full stack, while the complete disappearance ofraw twins of buffer views made per framelines (484->0over 22 min of city/open-world play) cleanly confirms #3833 on Blackwell withraw_twins=false. Clean exit with zero crashes.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by andrewpozdnakov7-jpg on 2026-12-01T06:34:59Z.
Thanks @mia03ther for the laptop follow-up. The raw-twin counter went from 13,236–13,258 per frame in the earlier build to no reports across 56,348 frames in the tested build. The FPS and frame-time figures cover the release change and the other cherry-picks too. Field report
I merged current upstream main
5fabb46into this PR at7fa2234. On WARP 1.0.22, the same two generated records and their cache hits created 2 scratch twins on main and 0 with this PR when raw twins were disabled. With raw twins enabled in the fixture, both built 2. The expected descriptor strides matched in each case. Both revisions also passed 84 descriptor-host tests, with one benchmark ignored. The one-file staged asset check passed.If you cherry-pick the fix, please retain its Git author. If you fold it into another commit, please retain
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>.The new PR CI check and CI on clean main both stopped at Clippy with the same five diagnostics, before running tests. The descriptor results above come from the separate WARP runs.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.