Bound the submit thread's waits on lists in the air and on new memory being mapped (load freezes) #3699

Open
github-bot wants to merge 1 commit from github-bot/gh-3699 into main AGit
Owner

@⁠stasadance on GitHub · 2026-11-30 04:21 UTC · original
stasadance:fix/submit-wait-caps → main · +81 −6 · 1 files · 1 commits · open

What it changes

Two waits on the submitting thread could wait for ever on a fence that only a later title submission signals, which froze the game (mostly while loading). Stall stacks showed the submit thread in relay_wait or mapped(), and the relay in its fence wait.

  • When the most lists are in the air and they don't land, the submission is sent anyway after VICTORY_LATE_MOST_WAIT_MS (250 ms; 0 restores the old wait).
  • The wait for new card memory to be mapped gives up after VICTORY_WAIT_RESIDENT_MS (2000 ms; 0 waits without end), and the aside list isn't sent again while one is still on the card.
  • The aside queue still runs the caller's work while an earlier copy is on the card; only the aside list itself is held back (otherwise alias_rt took UpdateTileMappings as done).

How it was tested

  • GPU and profile: RTX 4090 on Linux (NVIDIA 620.73.04, kron4ek Wine 11.23, vkd3d-proton GE cae8353ed), Series S profile, DLSS + frame generation
  • Before: freezes while loading, with the stall stacks above.
  • After: no freezes across the following sessions.
  • cargo test passed for the crates it touches: native cargo test cannot build victory-gpu on a Linux host (same on main), so no; cargo xwin clippy for the Windows target adds no warning over current main (main already fails -D warnings in victory-shader, victory-loader and victory-gpu).

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related: #1591, #846, #3103.
**@⁠stasadance** on GitHub · 2026-11-30 04:21 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3699) `stasadance:fix/submit-wait-caps` → `main` · +81 −6 · 1 files · 1 commits · open ## What it changes Two waits on the submitting thread could wait for ever on a fence that only a later title submission signals, which froze the game (mostly while loading). Stall stacks showed the submit thread in `relay_wait` or `mapped()`, and the relay in its fence wait. - When the most lists are in the air and they don't land, the submission is sent anyway after `VICTORY_LATE_MOST_WAIT_MS` (250 ms; 0 restores the old wait). - The wait for new card memory to be mapped gives up after `VICTORY_WAIT_RESIDENT_MS` (2000 ms; 0 waits without end), and the aside list isn't sent again while one is still on the card. - The aside queue still runs the caller's work while an earlier copy is on the card; only the aside list itself is held back (otherwise `alias_rt` took `UpdateTileMappings` as done). ## How it was tested - GPU and profile: RTX 4090 on Linux (NVIDIA 620.73.04, kron4ek Wine 11.23, vkd3d-proton GE cae8353ed), Series S profile, DLSS + frame generation - Before: freezes while loading, with the stall stacks above. - After: no freezes across the following sessions. - `cargo test` passed for the crates it touches: native `cargo test` cannot build `victory-gpu` on a Linux host (same on main), so no; `cargo xwin clippy` for the Windows target adds no warning over current main (main already fails `-D warnings` in victory-shader, victory-loader and victory-gpu). ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: #1591, #846, #3103.
A list in the air can wait on the card for a fence that a later title
submission signals. Waiting without end at the most lists in the air
then froze the game while loading: the submitting thread in relay_wait,
the relay in the fence wait. Bound that wait (VICTORY_LATE_MOST_WAIT_MS,
250; 0 restores the old wait).
The aside copy that tells new memory is mapped can sit on the card behind
a title queue's wait for a fence a later submission signals. The
submitting thread then waited in mapped() for ever and sent nothing more
(stall stacks: the submit thread there, the relay in its fence wait).
Wait at most VICTORY_WAIT_RESIDENT_MS (2000; 0: without end), and do not
send the aside list again while one is still on the card.
c56480f6 returned from with_copy_queue_sync without running f when an
earlier aside copy was still pending, and the caller (alias_rt) then took
UpdateTileMappings as done. Only the aside list itself is held back.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 04:22:15 +00:00
github-bot force-pushed github-bot/gh-3699 from 4d4dd13e85 to 054b29ca96 2026-12-01 02:58:41 +00:00 Compare
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/3699/head:github-bot/gh-3699'
git switch 'github-bot/gh-3699'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-3699'
git switch 'github-bot/gh-3699'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-3699'
git switch 'github-bot/gh-3699'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-3699'
git switch 'main'
git merge --squash 'github-bot/gh-3699'
git switch 'main'
git merge --ff-only 'github-bot/gh-3699'
git switch 'main'
git merge 'github-bot/gh-3699'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!3699
No description provided.