GPU: release ready queues before forcing present waits #216

Open
github-bot wants to merge 2 commits from github-bot/gh-216 into main AGit
Owner

@⁠avt0m4t48 on GitHub · 2026-11-24 22:36 UTC · original
avt0m4t48:fix/present-ready-waits-first → main · +67 −14 · 1 files · 2 commits · open

Refs #143. Drain work whose waits are reached under the queue release lock before forcing any remaining waits at Present. The regression sets up a blocked consumer first, then makes its producer ready before the usual wake. The old forced drain runs the consumer first and leaves the shared sequence fence at 1. The patched drain runs the producer first and leaves it at 2.

The source-built Windows x64 regression fails before and passes after under Wine 10. VICTORY_WAIT_FORCE=0 passes the baseline control, and the patched exact test also passes with late-wait stage 3. The GPU library suite gave 111 passed and one ignored. With diagnostics it gave 118 passed and one ignored. GPU-dependent cases can skip on this environment. The regression itself exercises queue and fence order before DXGI presentation.

The in-game symptom in #143 still needs correlation. AI-assisted using Codex. Source-built inputs only.

**@⁠avt0m4t48** on GitHub · 2026-11-24 22:36 UTC · [original](https://github.com/fxceless/victory-fork/pull/216) `avt0m4t48:fix/present-ready-waits-first` → `main` · +67 −14 · 1 files · 2 commits · open Refs #143. Drain work whose waits are reached under the queue release lock before forcing any remaining waits at `Present`. The regression sets up a blocked consumer first, then makes its producer ready before the usual wake. The old forced drain runs the consumer first and leaves the shared sequence fence at 1. The patched drain runs the producer first and leaves it at 2. The source-built Windows x64 regression fails before and passes after under Wine 10. `VICTORY_WAIT_FORCE=0` passes the baseline control, and the patched exact test also passes with late-wait stage 3. The GPU library suite gave 111 passed and one ignored. With diagnostics it gave 118 passed and one ignored. GPU-dependent cases can skip on this environment. The regression itself exercises queue and fence order before DXGI presentation. The in-game symptom in #143 still needs correlation. AI-assisted using Codex. Source-built inputs only.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:38:35 +00:00
Author
Owner

@⁠Filip722 on GitHub · 2026-11-25 11:57 UTC · original

I reproduced the producer/consumer ordering test on Bazzite 44 with GE-Proton 11-14's Wine, using a Windows MSVC release build and Rust 1.98.1.

With the same fixture on parent 2119b0e, the forced-release control left the sequence at 1 instead of 2. The control reached 2 with forcing disabled. On exact PR head 421bf51, the fixture passed with forcing enabled. Both builds used VICTORY_QUEUE_WAIT=1 and VICTORY_LATE_WAIT=0.

This fixture uses zero present planes to exercise fence ordering. Prepared and run with OpenAI Codex assistance.

**@⁠Filip722** on GitHub · 2026-11-25 11:57 UTC · [original](https://github.com/fxceless/victory-fork/pull/216#issuecomment-7161736124) I reproduced the producer/consumer ordering test on Bazzite 44 with GE-Proton 11-14's Wine, using a Windows MSVC release build and Rust 1.98.1. With the same fixture on parent `2119b0e`, the forced-release control left the sequence at 1 instead of 2. The control reached 2 with forcing disabled. On exact PR head `421bf51`, the fixture passed with forcing enabled. Both builds used `VICTORY_QUEUE_WAIT=1` and `VICTORY_LATE_WAIT=0`. This fixture uses zero present planes to exercise fence ordering. Prepared and run with OpenAI Codex assistance.
Author
Owner

@⁠avt0m4t48 on GitHub · 2026-11-25 14:11 UTC · original

Merged 0b0074e into this branch at db3d91e. The ready-work pass and forced fallback still run under the same release lock. The async submit and present paths added on main remain available.

On Windows, all five queue tests passed on the updated branch. The exact regression also passed with late-wait stage 3 and async submission enabled. On main, with forcing enabled, the regression again ended at fence value 1 instead of 2. Turning forcing off passed the baseline control. These are synthetic queue-order checks before presentation.

Exact-head and baseline Windows run

AI-assisted using Codex.

**@⁠avt0m4t48** on GitHub · 2026-11-25 14:11 UTC · [original](https://github.com/fxceless/victory-fork/pull/216#issuecomment-7164890510) Merged `0b0074e` into this branch at `db3d91e`. The ready-work pass and forced fallback still run under the same release lock. The async submit and present paths added on main remain available. On Windows, all five queue tests passed on the updated branch. The exact regression also passed with late-wait stage 3 and async submission enabled. On main, with forcing enabled, the regression again ended at fence value 1 instead of 2. Turning forcing off passed the baseline control. These are synthetic queue-order checks before presentation. [Exact-head and baseline Windows run](https://github.com/avt0m4t48/victory-fork/actions/runs/45630282295) AI-assisted using Codex.
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/queue.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

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

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-216'
git switch 'github-bot/gh-216'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-216'
git switch 'github-bot/gh-216'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-216'
git switch 'main'
git merge --squash 'github-bot/gh-216'
git switch 'main'
git merge --ff-only 'github-bot/gh-216'
git switch 'main'
git merge 'github-bot/gh-216'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.