GPU: mesh vertex blocks cut off at the end of a 4 MiB window (vehicle panels missing, matte paint, decals gone) #1197
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!1197
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1197"
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?
@CristianCiubancan on GitHub · 2026-11-28 15:23 UTC · original
CristianCiubancan:fix/root-view-reach→main· +117 −17 · 1 files · 2 commits · merged 2026-11-28 19:39 UTCWhat was wrong. Some vehicles are drawn with doors or panels missing or stretched across the body, with flat matte paint up close, or with a decal covering only part of the body. It comes and goes with distance and differs from vehicle to vehicle.
The title binds each mesh's vertex block as a root view. A root view has no length; the console reads from its address as far as the mesh program goes. Here, title memory outside buffer objects is copied in 4 MiB windows, and
root_viewgives such a view what is left of its window (shadow.left(address)). A block that begins near the end of a 4 MiB cell is cut off there, and reads past the view's end return zero.One case, from a recorded frame (RTX 5070 Ti, Series X profile): a van's body, one draw of 233 meshlets (
MSR_VS_TransformSkinD_NoDeform).In that frame's main pass, 3,613 views had no length; for 4 of them a stream began past the window's end. That count is a lower bound: it does not include streams that begin inside and run past.
The change. A window asked for without a length is its 4 MiB cell plus a reach into the next:
VICTORY_WINDOW_REACH_KB, 2048 by default, a multiple of 64 up to 4096, 0 for the old behaviour. An ask with a length whose window is that cell names the same window, so a cell's memory is held once. Tails (VICTORY_WINDOW_TAILS=1) reach as far.in_place_let_golooks back by the longer window.What it costs. Every whole-cell window grows by the reach. In a diagnostics session six minutes into play there were 965 windows, so at most about +1.9 GB at 2 MiB and about +1 GB at 1 MiB (computed from the window count). Measured by another user on the first commit, same scene with the reach at 0 and at 2048: +0.3 GB on the card and +1.3 GB shared, 17.8 against 17.4 fps (see the comments).
What it does not cover. A block longer than the reach that begins nearer than its own length to the line is still cut. The largest stream offset in the frame was 2.4 MB, so 2 MiB leaves a small remainder and 4 MiB would not. I chose 2 MiB for the memory; say if you would rather have another default.
Tested.
an_unsized_ask_reads_past_its_cells_end, with the van's numbers: cut off at reach 0, whole at the default.cargo test -p victory-gpu --lib: 455 passed, 0 failed, 36 ignored.Not replayed offline: the fix changes which windows are made, which a recorded frame cannot show.
🤖 Generated with Claude Code
@cxy0072019-sketch on GitHub · 2026-11-28 16:10 UTC · original
Series S follow-up on an RTX 5070 Ti 16 GB and i5-14600KF under Windows. I used one diagnostics release build of
906f656plus #996 (216bca9) and varied onlyVICTORY_WINDOW_REACH_KB. Both runs used the same cloned Gear Up parking save, initially identical emulator caches, separate fresh driver caches, 1920×1080 output, internal Series S 720p, and DLSS and frame generation off.Each side used nine complete five-second samples from the same parked camera. The tested pickup already showed its panels and decals at 0 KiB, and both runs completed the same parking-lot inputs. The reported broken van remains unverified in this scene.
an_unsized_ask_reads_past_its_cells_endpassed locally. This one restart pair provides a measurement of memory and frame time for a Series S scene. Test automation and analysis were AI-assisted.@CristianCiubancan on GitHub · 2026-11-28 16:18 UTC · original
A correction to my own PR, found while tracing something else in a recorded frame.
As first pushed, an ask without a length named a 6 MiB window while asks with a length in the same cell kept naming the 4 MiB one. The recorded frame shows both alive for the same memory (
title memory 0xc57c00000+0x400000beside+0x600000). So the cost I gave, about +1.4 GB, was too low: cells with both kinds of ask were held twice.The second commit makes every ask inside a cell name the cell's one long window, on the 4 MiB grid. The memory is held once again and the choice does not depend on which ask came first.
The cost, restated. Every whole-cell window grows by the reach. From the same diagnostics session (965 windows six minutes in), that is at most about +1.9 GB at the default of 2 MiB and about +1 GB at 1 MiB. These are computed from the window count, not measured on the corrected build.
Tests:
cargo test -p victory-gpu --lib, 455 passed, 0 failed; the unit test now also covers asks with a length.The description above is updated to match.
Thanks for the measurement. It was taken on the first commit, which held some cells twice; the second commit removes that, so the split between card and shared memory may differ on it.
On reproducing the picture: whether a mesh is cut depends on where its block lies relative to a 4 MiB line, so a given vehicle may be whole in one session and cut in another. The van in the description is from a recorded frame, and
an_unsized_ask_reads_past_its_cells_enduses its numbers.@CristianCiubancan on GitHub · 2026-11-28 16:25 UTC · original
The second commit (
bfb3749) has now been run in the game too, on a build of this branch's two commits plus #996: the van whose panels, paint and decals were broken before still shows them right, as it did on the first commit.@Mumogg on GitHub · 2026-11-28 21:28 UTC · original
Tested on Linux, and it fixes the missing car doors for us.
Setup: RTX 5070 Ti, Ryzen 5 9600X, Nobara (Wine 11.22 staging + vkd3d-proton), 4K output, Series X profile.
Before this PR, car doors and panels came and went up close, from run to run and car to car. After cherry-picking both commits (
906f6565andbfb37497) onto our branch with the defaultVICTORY_WINDOW_REACH_KB=2048, the doors were present on every car the player walked up to. That was over a whole play session and several cars. Fps was unchanged within noise.AI-assisted: this test and report were made with Claude Code; the person playing confirmed the result in game.
🤖 Generated with Claude Code
@Rafa7046 on GitHub · 2026-11-28 23:10 UTC · original
A memory cost of this one, found by bisecting
main(32ecacf..923e38c, first-parent) on the process's private memory. Setup: RTX 5080 16 GB, 9950X3D, 64 GB, Series X, 1440p, DLSS Performance, RT off. A scripted run (prologue cutscenes, then the boat); memory read about 130 s into the scene, where it has settled.VICTORY_WINDOW_REACH_KBon today'smain(d4b5d51), same scene:That is about 1.5 GB of RAM and 1.3 GB of GPU-visible system memory per MiB of reach. No fps change on this machine, and 64 GB hides it. On a 16 or 32 GB PC, about 3–3.5 GB of each could matter (out-of-memory, paging).
Every unsized window grows by the reach, while only views that begin within the reach of their cell's end need it. Giving the reach only to cells where such a view is asked would keep the vehicle fix for a fraction of this. I'm trying that locally and will open a PR if it holds up.
Measurements prepared with an AI assistant (Claude Code); the runs were played on my machine.