Run a queue's held work before testing its next wait in the checkpoint #7

Manually merged
github merged 1 commit from gh-pr/7/head into gh-pr/7/base 2026-11-27 00:49:36 +00:00
Owner

@⁠Kolkka on GitHub · 2026-11-26 21:24 UTC · original
Kolkka:runtime/queue-wait-order → main · +47 −2 · 4 files · 1 commits · merged 2026-11-27 00:41 UTC

Changes

Adds checkpoint patch 0006-queue-wait-order.patch, imported from pragyaangaur/VIctory-macOS#434 (also proposed to Marvisak/VIctory#3381).

The queue pump gathers a queue's ready segments into one piece and runs the piece only when it reaches a segment that cannot run yet. A segment with memory waits was therefore tested against title memory before the segments ahead of it in the same queue had run. Its wait could pass on a value one of those segments overwrites with its bottom-of-pipe write, or hold on one it writes. The patch runs the gathered piece first, as the pump already does before a signal, and adds a regression test.

This is the Prestream stall that #6 lists as the next problem. In GTA VI's Series S intro, the title stopped submitting work about two minutes into fbk_stry000_FBK_STRY000_INTRO_min. The render thread sat in an infinite wait in the function that reports "Unsignaled CrossQueueBarrier". About 28 s later the title's hang checker ended the run (+0x23cf683 in older builds, +0x2215c35 here). With the patch, the same run went past that point into the world and the opening cinematic.

The patch is numbered 0006 so it does not collide with #6's 0005. It applies with or without 0005. runtime-preview/SOURCE-NOTICES.md credits the upstream PR, and runtime-preview/BUILD.md describes the change.

Verification

  • ./build.sh --checkpoint --prepare NEW_SOURCE_DIR applies 0001–0004 and 0006 onto c84e42a. Applying it on top of 0001–0005 from #6 also succeeds.
  • In that prepared tree: WINEDLLOVERRIDES="d3d12,d3d12core,dxgi=b" tools/macos/test-wine.sh -p victory-gpu --lib: 330 passed, 0 failed, 10 ignored. All 11 hold tests pass, including the new a_wait_reads_what_earlier_segments_of_its_queue_wrote.
  • In the game, on the same fix against current VIctory-macOS main: Apple M5 MacBook Air with 16 GB, macOS 27.2, CrossOver-derived Wine with D3DMetal 4.0 beta 3, Series S profile. The intro no longer stalls in Prestream. The run reached the world and the opening cinematic. Runs now end after about nine minutes on GPU memory, which is a separate problem.
**@⁠Kolkka** on GitHub · 2026-11-26 21:24 UTC · [original](https://github.com/paveledits/ScarlettMac/pull/7) `Kolkka:runtime/queue-wait-order` → `main` · +47 −2 · 4 files · 1 commits · merged 2026-11-27 00:41 UTC ## Changes Adds checkpoint patch `0006-queue-wait-order.patch`, imported from pragyaangaur/VIctory-macOS#434 (also proposed to Marvisak/VIctory#3381). The queue pump gathers a queue's ready segments into one piece and runs the piece only when it reaches a segment that cannot run yet. A segment with memory waits was therefore tested against title memory before the segments ahead of it in the same queue had run. Its wait could pass on a value one of those segments overwrites with its bottom-of-pipe write, or hold on one it writes. The patch runs the gathered piece first, as the pump already does before a signal, and adds a regression test. This is the `Prestream` stall that #6 lists as the next problem. In GTA VI's Series S intro, the title stopped submitting work about two minutes into `fbk_stry000_FBK_STRY000_INTRO_min`. The render thread sat in an infinite wait in the function that reports "Unsignaled CrossQueueBarrier". About 28 s later the title's hang checker ended the run (`+0x23cf683` in older builds, `+0x2215c35` here). With the patch, the same run went past that point into the world and the opening cinematic. The patch is numbered 0006 so it does not collide with #6's 0005. It applies with or without 0005. `runtime-preview/SOURCE-NOTICES.md` credits the upstream PR, and `runtime-preview/BUILD.md` describes the change. ## Verification - `./build.sh --checkpoint --prepare NEW_SOURCE_DIR` applies 0001–0004 and 0006 onto c84e42a. Applying it on top of 0001–0005 from #6 also succeeds. - In that prepared tree: `WINEDLLOVERRIDES="d3d12,d3d12core,dxgi=b" tools/macos/test-wine.sh -p victory-gpu --lib`: 330 passed, 0 failed, 10 ignored. All 11 `hold` tests pass, including the new `a_wait_reads_what_earlier_segments_of_its_queue_wrote`. - In the game, on the same fix against current VIctory-macOS main: Apple M5 MacBook Air with 16 GB, macOS 27.2, CrossOver-derived Wine with D3DMetal 4.0 beta 3, Series S profile. The intro no longer stalls in `Prestream`. The run reached the world and the opening cinematic. Runs now end after about nine minutes on GPU memory, which is a separate problem.
Adds checkpoint patch 0006, imported from pragyaangaur/VIctory-macOS#434.
The queue pump tested a segment's memory waits before the segments ahead
of it in the same queue had run, so a wait could pass or hold on a value
that earlier work overwrites. In the Series S intro this stalled
Prestream until the title's hang check ended the run. Numbered 0006 so
it does not collide with #6's 0005; it applies with or without it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017tiHubszVmvo5uoUAc34Br
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 00:49:35 +00:00
github manually merged commit f3d6e6e1b8 into gh-pr/7/base 2026-11-27 00:49:36 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.