GPU: limit repeated waits for pending pipelines #3607

Open
pablogonz12 wants to merge 1 commit from upstream-pr/3607 into main
pablogonz12 commented 2026-11-27 20:38:29 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by pablogonz12 on 2026-11-27T20:38:29Z.


Summary

I limit the total time spent waiting for a pending pipeline to one 500 ms budget from its first wait. Once overdue, it is still made by its worker, but later frames no longer wait another 500 ms for it.

Evidence

  • I added a regression test that fails before the fix and passes after it under Wine.
  • I ran the full GPU unit suite under Wine: 230/233 passed. The three failures also fail individually on clean main.
  • Windows-target clippy passed with -D warnings.
  • I measured 1.3 to 2.0 fps in one run of our build; this is a single run, not an isolated comparison of this patch.
  • Tested on RX 9070 XT / RADV under Proton; not tested on NVIDIA hardware.

Merge Danger

Door: Two-way.

Blast Radius: Rendering. A pipeline still compiling after its deadline may cause draws, including one-shot passes, to be skipped until it is ready.

<!-- greyfinch-sync:Marvisak/VIctory:issue:5532799356 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3607). Originally posted by [pablogonz12](https://github.com/pablogonz12) on 2026-11-27T20:38:29Z. --- ## Summary I limit the total time spent waiting for a pending pipeline to one 500 ms budget from its first wait. Once overdue, it is still made by its worker, but later frames no longer wait another 500 ms for it. ## Evidence - I added a regression test that fails before the fix and passes after it under Wine. - I ran the full GPU unit suite under Wine: 230/233 passed. The three failures also fail individually on clean main. - Windows-target clippy passed with `-D warnings`. - I measured 1.3 to 2.0 fps in one run of our build; this is a single run, not an isolated comparison of this patch. - Tested on RX 9070 XT / RADV under Proton; not tested on NVIDIA hardware. ## Merge Danger **Door:** Two-way. **Blast Radius:** Rendering. A pipeline still compiling after its deadline may cause draws, including one-shot passes, to be skipped until it is ready.
upipibi commented 2026-11-28 02:31:41 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by upipibi on 2026-11-28T02:31:41Z.


A measured case for the one-shot passes named in the merge danger here (read from other trees' threads; not run here):

TaynanGT/Vice-Tay#372 traced missing facial geometry to one. The first dispatch that builds the head blend-shape map can arrive while its compute pipeline is still compiling. On an RTX 4090 (Series S), they measured 29.83 s between the first bind and the pipeline being made, in a run where faces were missing. Their fix queues that pipeline at creation with priority, and lets its dispatch wait up to 2 s. With the pipeline ready first, a 4K capture showed complete faces. Related: avatarmanz/VIctory-7900XTX#166, and crossducking/RAZDA4A-XEN's notes credit a 5,000 ms compute wait budget with "fixing missing character faces".

That pass loses on main as well as here: its one dispatch gets at most the frame's 500 ms, and it doesn't come back. So it isn't an argument against this change, which is about dispatches that recur. The fix for passes like it is the part this PR doesn't cover: early, prioritised making of the pipelines one-shot passes use (the head map's in Vice-Tay's case), so their first dispatch finds them ready.

AI-assisted (Claude Code, Claude Opus 5.5 read those threads and this diff).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7232422225 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3607#issuecomment-7232422225). Originally posted by [upipibi](https://github.com/upipibi) on 2026-11-28T02:31:41Z. --- A measured case for the one-shot passes named in the merge danger here (read from other trees' threads; not run here): TaynanGT/Vice-Tay#372 traced missing facial geometry to one. The first dispatch that builds the head blend-shape map can arrive while its compute pipeline is still compiling. On an RTX 4090 (Series S), they measured 29.83 s between the first bind and the pipeline being made, in a run where faces were missing. Their fix queues that pipeline at creation with priority, and lets its dispatch wait up to 2 s. With the pipeline ready first, a 4K capture showed complete faces. Related: avatarmanz/VIctory-7900XTX#166, and crossducking/RAZDA4A-XEN's notes credit a 5,000 ms compute wait budget with "fixing missing character faces". That pass loses on main as well as here: its one dispatch gets at most the frame's 500 ms, and it doesn't come back. So it isn't an argument against this change, which is about dispatches that recur. The fix for passes like it is the part this PR doesn't cover: early, prioritised making of the pipelines one-shot passes use (the head map's in Vice-Tay's case), so their first dispatch finds them ready. AI-assisted (Claude Code, Claude Opus 5.5 read those threads and this diff).
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/3607:upstream-pr/3607'
git switch 'upstream-pr/3607'

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/3607'
git switch 'upstream-pr/3607'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3607'
git switch 'upstream-pr/3607'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3607'
git switch 'main'
git merge --squash 'upstream-pr/3607'
git switch 'main'
git merge --ff-only 'upstream-pr/3607'
git switch 'main'
git merge 'upstream-pr/3607'
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
Marvisak/VIctory!3607
No description provided.