GPU: heap pacing against stretched-triangle spikes (#90), opt-in for now #357
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/TaynanGT--Vice-Tay!357
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-357"
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?
@cafeoh on GitHub · 2026-11-27 19:39 UTC · original
cafeoh:pr/heap-sync-pace→main· +127 −0 · 4 files · 2 commits · openWhat it fixes
Fixes #90: the stretched-triangle spikes ("wedges"), seen on both Series S and Series X.
The title reuses its descriptor slots every frame. On the console that's safe: the card runs right behind the title.
Here, our preparing puts the card about a frame behind. So the title's records for frame F+1 reached the host heaps while the card still drew F, and F's draws read F+1's buffer addresses.
What it does
Our side prepares a submission only once the card has run the last frame we sent. The heaps' own 4 ms sync rounds stop too.
The title is not held. Only our side waits.
VICTORY_HEAP_SYNC_PACE=1turns it on. Off by default for now. The frame line counts submissions held and ms held.Proof (RTX 2080 Ti, Ryzen 7 7800X3D)
=1)Holding only the sync rounds was not enough: several writers land early (our translation threads, card steps, the title's view calls). Counter and every test: see #90.
Why some PCs see it and others don't
It needs the card to run behind the title: a fast CPU with a slower card, long preparing, busy scenes. A very fast card, or vsync/a frame cap, hides it. So it can look fine on one PC and broken on another.
Why opt-in for now
It costs about a quarter of the frame rate on our PC: the card idles while our side waits. Elsewhere it depends on how our preparing compares with the card's time: little when one is much faster than the other, up to about half when they are equal. Off by default while a narrower wait is checked (see #90).
The same race could plausibly cause other one-frame glitches (texture blinking, objects jumping). Not verified: see #90.
Real fix later
One host heap copy per frame in flight. Then the next frame's records never overwrite the ones the card still reads, and the cost goes away. That's a bigger change (lists bake heap addresses).
GPU: heap pacing against stretched-triangle spikes (#90), on by defaultto GPU: heap pacing against stretched-triangle spikes (#90), opt-in for now@hamdanpor-ctrl on GitHub · 2026-11-27 22:42 UTC · original
Build and test check on a laptop, no game run (default settings, so the opt-in pacing itself is not exercised):
6d20a25against its merge base) applied onmainat0148258--all-features: cleancargo test -p victory-gpu --locked, parallel: 9 of 10 runs passed (527 tests each). The one failure washost::refresh_tests::raw_title_copy_keeps_write_watch_and_resends_equal_bytes, which also fails now and then onmain(#354, addressed in #382), so not from this change.AI-assisted (Claude Code).
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.