Descriptors: per-thread copies of the placed-view shapes (VICTORY_SHAPE_CACHE) #2804
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!2804
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2804"
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?
@Demos974 on GitHub · 2026-11-29 17:30 UTC · original
Demos974:view-shape-cache→main· +114 −8 · 1 files · 1 commits · merged 2026-11-30 14:12 UTCWhat it changes
The table of placed-view shapes (
ViewShapes) only ever grows and a shape keeps its number, yet every lookup took itsRwLock: when a view is written (shape to number) and when a record is read back (number to shape,with_view_at). In a sampled kernel trace with the executable's symbols, taking that lock (shapes_read) was 8-11 % of each list translator's time, the eight of them reading it at once.With
VICTORY_SHAPE_CACHE=1each thread keeps 1024 shapes by number and 1024 numbers by shape, direct-mapped, and takes the lock only on a miss. A copy is never stale. Off by default: the gain is not yet clear of the noise (below).How it was tested
VICTORY_AB=10,VICTORY_SHAPE_CACHE, the opening's house). Each phase with the switch against the two around it: frame time -9.1 % in the median of 21 pairs, but only 13 of 21 faster; the process's processor time the same (8.56 and 8.59 cores busy). In a run of four combinations with a scripted walk: -2.5 % against the cycle's mean, p90 -13 %.cargo testpassed for the crates it touches: yes (victory-gpu 916 passed, one new test: the copies answer as the table does past their size, twice). Clippy: nothing in the changed lines.Checked for overlap
view_address_atinsync_heaps; this covers the shape lookups ofwords_forandwith_view_at)🤖 Generated with Claude Code
@mrDeShock on GitHub · 2026-11-30 00:38 UTC · original
<html>Thanks for this optimization! I independently tested your patch (
a6d8835) on a different hardware configuration as part of an extended VIctory-NVIDIA performance investigation.Test system:
Intel Core i7-11700KF (8C/16T)
RTX 4070 SUPER 12 GB
32 GB DDR4-2666
Windows 11, driver 610.88
Series S, DLSS Quality, native DLSS FG 2X
8 THIN translator threads
Base commit:
f889bb07Both runs used the same locally compiled executable and configuration, with
Metric | OFF | ON -- | -- | -- Average base FPS | 13.05 | 13.52 Median interval frame time | 73.10 ms | 73.15 ms Frames over 100 ms | 7.01% | 6.04% Maximum frame time | 535.5 ms | 508.9 ms Submission preparation | 69.95 ms | 69.70 ms Descriptor processing | 19.01 ms | 19.06 ms THIN time per call | 5.212 µs | 5.206 µs Analyzed frames | 1740 | 1722 New pipelines created | 7 | 7VICTORY_SHAPE_CACHE=0andVICTORY_SHAPE_CACHE=1requested respectively.Both sessions completed normally.
The results show a modest improvement in frame pacing, but no meaningful improvement in typical frame time or per-call THIN translation cost.
These were separate gameplay runs rather than alternating in-run A/B phases. Memory pressure and scene workload may have differed. Cache activation and hit rates were not independently instrumented, so the results should be considered preliminary.
Overall, my observations are consistent with your conclusion that the performance gain is not yet clearly distinguishable from measurement noise.
Additional cache hit/miss counters and measurements of time spent waiting for the ViewShapes lock could be useful for further investigation.
Thanks for your contribution!
</html>