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

Open
stasadance wants to merge 1 commit from upstream-pr/3699 into main
stasadance commented 2026-11-30 04:21:07 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by stasadance on 2026-11-30T04:21:07Z.


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.
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5558928670 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3699). Originally posted by [stasadance](https://github.com/stasadance) on 2026-11-30T04:21:07Z. --- ## 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.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/3699:upstream-pr/3699'
git switch 'upstream-pr/3699'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/3699'
git switch 'upstream-pr/3699'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3699'
git switch 'upstream-pr/3699'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3699'
git switch 'main'
git merge --squash 'upstream-pr/3699'
git switch 'main'
git merge --ff-only 'upstream-pr/3699'
git switch 'main'
git merge 'upstream-pr/3699'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
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.

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