8 GB RTX 5060: heavy mesh shaders wait on windows in host memory; windows read only through the heap never count as used (card time 57-60 -> 32 ms) #4036
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#4036
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@plapha on GitHub · 2026-11-30 15:02 UTC · original
RTX 5060 8 GB, i5-14600KF, 32 GB RAM, Windows 11, driver 621.01. Series S/X profiles, heavy open-world spot (~10,000 draws per frame), frame generation off for every run below. This is a measurement for #2640, #2735 and #2098 (same shape: card "busy", SMs mostly waiting), not a PR.
Summary
createHandleFromHeap→rawBufferLoad).The data is from an older base (VIctory-NVIDIA
63b902fplus PRs ported on Nov 29) with a local hot-window zone that is not upstream. The upstream part is in "On main" below: it comes from reading the code and is not measured on main.1. Where the card's time goes
Nsight Graphics 2026.4 GPU Trace, one frame, real-time shader profiler:
The 8 heaviest mesh shaders, matched to the Xbox originals by instruction sequence (similarity ≥ 0.995):
MSNC_VS_CascadeShadows_drawskinnedTexture,Transform_PositionOnly/CascadeShadows_draw,TransformSkinD,TransformD,LinearDepthSkin,PropFoliageSkinDeferred,TransformSkinD_DetailMapsOff_NoDeform,Cable.Transform_PositionOnlyhas only 48 registers and ~40 warps, and still spends 98 % on long scoreboard. Occupancy is enough; the reads are slow.rawBufferLoad.A D3D12 microbenchmark on the same card, a 64 MB dependent random chain:
Splitting reads into 4-byte loads versus 16-byte loads made less than 1 % difference, and per-command overheads (ExecuteIndirect, pipeline/table changes) add up to about 1 ms per frame. So it is neither split loads nor command count. It is serial reads over the bus.
2. The windows that look cold
The census counts the copies shaders can reach by heap index, at the same spot (
heap censusline, diagnostics build):Placement counts a window as used when a draw names it (root views and so on). The heap buffer pass refreshes the windows that heap slots show without counting them. A window that the mesh shaders reach only through the heap therefore never qualifies, however often it is read.
Moving the root-SRV windows alone confirms this. In three heavy mesh shaders, the share of samples waiting on root SRVs fell from 13 / 13 / 52 % to 5 / 5 / 21 %. The heap-index share barely moved: 34 / 41 / 29 % → 31 / 29 / 27 %.
3. What changed it
All three changes were tested together, so their separate effects are not known:
VICTORY_WINDOW_KB=256+VICTORY_WINDOW_TAILS=1: cells went from ~2,780 to ~1,640 MB for these windows.Results:
VICTORY_GPU_TIMES=1, same analysis):On main (
c71899d): code reading, not measuredCARD_WINDOWS_LATE(#1756/#3574) moves windows byShadow::frames. That counter is bumped inshadow::loose(), i.e. when a window is looked up.heap_buffer_passkeeps each slot's copy from pass to pass. It looks slots up again only when they are written, and all of them once everyHEAP_ROUND(16) passes. Every other pass it callsrefreshon the kept copy, which does not touchframes.LATEand lose to idle draw-named windows underCARD_WINDOWS_IDLE_MS.Limits
VICTORY_TEXTURE_BUDGET_MB=1024, which removed about 0.8 GB of textures). Without the cap, windows and textures fight for the last ~0.7 GB of an 8 GB card, and there is no rule for who wins.Side note: NVIDIA overlay
During these runs,
NVIDIA Overlay.exe(the NVIDIA app's in-game overlay) held 3,176 MB of dedicated VRAM. After a restart it went back up to 1,136 MB within a few minutes of play. It lowered the budget Windows gave the game from 7,127 to 5,905 MB (the system changed the budget of the card's memory). This was seen on this one PC, once. It may be worth checking before reading any 8 GB measurement.@github-actions[bot] on GitHub · 2026-11-30 15:02 UTC · original
Please attach both logs from the run that went wrong. Without them we can only guess. Paste
%LOCALAPPDATA%into the address bar of File Explorer to get there.%LOCALAPPDATA%\victory\logs\: the newestvictory-nvidia-play-<date>-<time>-<number>.log(fromvictory.exe) orvictory-nvidia-<date>-<time>.log(from the script launcher). The window shows its path at the start, on the lineLog: ....%LOCALAPPDATA%\VIctory\data\7952987A\crashes.log, and, if there is one from that run, the newestvictory-<date>-<time>-<number>.crash.login%LOCALAPPDATA%\VIctory\data\7952987A\temp\.Also say which GPU, Windows version (10 or 11)