D3D12.X: prioritize graphics pipelines in the async PSO worker pool #628

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

@⁠Cattn on GitHub · 2026-11-24 02:41 UTC · original
Cattn:pso-async-graphics-priority → main · +143 −16 · 1 files · 1 commits · open

Replace the single FIFO mpsc::channel in pso_async with a two-lane WorkQueue so queued graphics pipelines dequeue ahead of queued compute pipelines on the xcl-pso-* worker pool.

When a retail title transitions into world rendering, it queues hundreds of large compute pipelines (100–490 KB DXIL) ahead of its graphics draw pipelines. With one shared FIFO channel, all xcl-pso-* workers spent tens of seconds compiling compute shaders while every queued graphics pipeline waited behind them (in a local world-loading stack run, 217 compute PSOs finished while 0 graphics PSOs finished over 28 s; with graphics prioritized first, 181 background pipelines built including ~147 graphics PSOs and the title began presenting post-loading world frames). Within each lane (graphics and compute), FIFO order is preserved.

What is in it

  • crates/xcl/src/hle/d3d12x/pso_async.rs: replace the mpsc channel in queue() with WorkQueue<T> (gfx and compute VecDeques, popping gfx before compute) + Pool / enqueue; add unit tests graphics_jobs_dequeue_ahead_of_queued_compute_jobs and worker_pool_prioritizes_graphics_pipeline_over_queued_compute.

Tested

  • Hardware / OS / toolchain: NVIDIA GeForce RTX 4070 12 GB (driver 32.0.16.1742, wave32), AMD Ryzen 7 7800X3D, 32 GB RAM, Windows 11 Pro 10.0.26200, DXC 1.9.2609.5, rustc 1.93.1 (01f6ddf75 2026-02-11), debug (tests) and release (smoke).
  • After the rebase (766b661), cargo build --workspace passed and cargo test -p xcl --lib pso_async -- --nocapture reported 4 passed, 0 failed, 0 ignored and 0 skipped.
  • Before the rebase (ac387a1), cargo build --workspace && cargo test --workspace -- --test-threads=4 reported 688 passed, 0 failed, 41 ignored.
  • SKIPPED GPU tests (2, no wave64 on this adapter): gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask, gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware.
  • World-loading stack test (local stack with bounded waits + this change): switched from 0 post-loading graphics PSOs / 0 post-loading presents to 181 background PSOs built (~147 graphics) and 3 presented post-loading world frames before hitting an unrelated Wait64BitValueX stall.

Regression run

xcl-smoke v1
commit: f4ce27ceb6d1b0576d0c659b713b674778bf1968
gpu: NVIDIA GeForce RTX 4070
title: 1832dcf3d13e7a13
seconds: 60
exit: 0x0
frames shown: 919 (PresentX 919)
presents per 2 s (last 3): 32 47 58
device removals: 0
crashes: 0
peak commit: 17460 MB
xcl-smoke v1
commit: 766b661235289f8c76b2a4169b046927fa3e8355
gpu: NVIDIA GeForce RTX 4070
title: 1832dcf3d13e7a13
seconds: 60
exit: 0x0
frames shown: 1397 (PresentX 1397)
presents per 2 s (last 3): 48 54 43
device removals: 0
crashes: 0
peak commit: 19705 MB

Not tested

  • AMD / Intel GPUs and native wave64 hardware.
  • Other retail titles (Minecraft Preview, Unicorn Overlord, Fortnite, XDefiant).
  • The 60 s smoke runs check for regressions. The prior world-loading stack run exercised the compute backlog, and the pso_async unit tests cover queue priority.

AI use

  • Antigravity with Gemini 4 Neon: diagnosed the graphics-PSO starvation from local world-loading logs, wrote the WorkQueue priority scheduling and unit tests in pso_async.rs, ran the test suite and smoke runs on the hardware listed above, and drafted this description.
  • Codex (gpt-6.2-sol) resolved the rebase conflict, ran the post-rebase build and focused tests, and refreshed the regression runs and PR description.
**@⁠Cattn** on GitHub · 2026-11-24 02:41 UTC · [original](https://github.com/xcl-dev/xcl/pull/628) `Cattn:pso-async-graphics-priority` → `main` · +143 −16 · 1 files · 1 commits · open Replace the single FIFO `mpsc::channel` in `pso_async` with a two-lane `WorkQueue` so queued graphics pipelines dequeue ahead of queued compute pipelines on the `xcl-pso-*` worker pool. When a retail title transitions into world rendering, it queues hundreds of large compute pipelines (100–490 KB DXIL) ahead of its graphics draw pipelines. With one shared FIFO channel, all `xcl-pso-*` workers spent tens of seconds compiling compute shaders while every queued graphics pipeline waited behind them (in a local world-loading stack run, 217 compute PSOs finished while 0 graphics PSOs finished over 28 s; with graphics prioritized first, 181 background pipelines built including ~147 graphics PSOs and the title began presenting post-loading world frames). Within each lane (graphics and compute), FIFO order is preserved. **What is in it** - `crates/xcl/src/hle/d3d12x/pso_async.rs`: replace the `mpsc` channel in `queue()` with `WorkQueue<T>` (`gfx` and `compute` `VecDeque`s, popping `gfx` before `compute`) + `Pool` / `enqueue`; add unit tests `graphics_jobs_dequeue_ahead_of_queued_compute_jobs` and `worker_pool_prioritizes_graphics_pipeline_over_queued_compute`. **Tested** - Hardware / OS / toolchain: NVIDIA GeForce RTX 4070 12 GB (driver `32.0.16.1742`, wave32), AMD Ryzen 7 7800X3D, 32 GB RAM, Windows 11 Pro 10.0.26200, DXC 1.9.2609.5, `rustc 1.93.1 (01f6ddf75 2026-02-11)`, debug (tests) and release (smoke). - After the rebase (`766b661`), `cargo build --workspace` passed and `cargo test -p xcl --lib pso_async -- --nocapture` reported 4 passed, 0 failed, 0 ignored and 0 skipped. - Before the rebase (`ac387a1`), `cargo build --workspace && cargo test --workspace -- --test-threads=4` reported **688 passed, 0 failed, 41 ignored**. - `SKIPPED` GPU tests (2, no wave64 on this adapter): `gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware`. - World-loading stack test (local stack with bounded waits + this change): switched from 0 post-loading graphics PSOs / 0 post-loading presents to 181 background PSOs built (~147 graphics) and 3 presented post-loading world frames before hitting an unrelated `Wait64BitValueX` stall. **Regression run** ``` xcl-smoke v1 commit: f4ce27ceb6d1b0576d0c659b713b674778bf1968 gpu: NVIDIA GeForce RTX 4070 title: 1832dcf3d13e7a13 seconds: 60 exit: 0x0 frames shown: 919 (PresentX 919) presents per 2 s (last 3): 32 47 58 device removals: 0 crashes: 0 peak commit: 17460 MB ``` ``` xcl-smoke v1 commit: 766b661235289f8c76b2a4169b046927fa3e8355 gpu: NVIDIA GeForce RTX 4070 title: 1832dcf3d13e7a13 seconds: 60 exit: 0x0 frames shown: 1397 (PresentX 1397) presents per 2 s (last 3): 48 54 43 device removals: 0 crashes: 0 peak commit: 19705 MB ``` **Not tested** - AMD / Intel GPUs and native wave64 hardware. - Other retail titles (Minecraft Preview, Unicorn Overlord, Fortnite, XDefiant). - The 60 s smoke runs check for regressions. The prior world-loading stack run exercised the compute backlog, and the `pso_async` unit tests cover queue priority. **AI use** - Antigravity with Gemini 4 Neon: diagnosed the graphics-PSO starvation from local world-loading logs, wrote the `WorkQueue` priority scheduling and unit tests in `pso_async.rs`, ran the test suite and smoke runs on the hardware listed above, and drafted this description. - Codex (`gpt-6.2-sol`) resolved the rebase conflict, ran the post-rebase build and focused tests, and refreshed the regression runs and PR description.
Replace the single FIFO channel in pso_async with a two-lane queue so queued graphics draw pipelines dequeue ahead of compute builds instead of starving behind large world-loading compute shaders.

Assisted-by: Antigravity (Gemini 4 Neon)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:27:45 +00:00
Author
Owner

@⁠MesshM on GitHub · 2026-11-24 02:55 UTC · original

Test run of ac387a1af03b187fe6ca7bf330ff7085549d0230 on AMD RDNA4; the PR was tested on NVIDIA only. I merged it onto current main 18c105a locally (clean merge) and tested that tree.

Tested

  • AMD Radeon RX 9060 XT 16 GB (RDNA4, native wave64), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200, Rust 1.100.0 stable-x86_64-pc-windows-msvc, debug
  • cargo build --workspace + cargo test --workspace -- --test-threads=4 on the merge: 691 passed, 0 failed, 41 ignored, exit code 0; xcl lib tests 651 passed, 0 failed, 21 ignored
  • 0 SKIPPED; graphics_jobs_dequeue_ahead_of_queued_compute_jobs and worker_pool_prioritizes_graphics_pipeline_over_queued_compute pass.

Review: The two-lane queue is strict priority: while graphics jobs keep arriving, queued compute jobs wait. That cannot hang, since a bind that needs a compute pipeline runs its job itself in resolve_wait when no worker has started it, but under a steady stream of graphics pipelines the compute ones are then built on the binding thread rather than in the background. Worth knowing; not a blocker.

Not tested: no retail title or regression run (I have no unpacked game), no XCL_SAMPLE_* tests, release build; the PR's head on its old base was not run, only its merge onto main.

Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.

**@⁠MesshM** on GitHub · 2026-11-24 02:55 UTC · [original](https://github.com/xcl-dev/xcl/pull/628#issuecomment-7120600748) Test run of `ac387a1af03b187fe6ca7bf330ff7085549d0230` on AMD RDNA4; the PR was tested on NVIDIA only. I merged it onto current `main` `18c105a` locally (clean merge) and tested that tree. **Tested** - AMD Radeon RX 9060 XT 16 GB (RDNA4, native wave64), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200, Rust 1.100.0 `stable-x86_64-pc-windows-msvc`, debug - `cargo build --workspace` + `cargo test --workspace -- --test-threads=4` on the merge: **691 passed, 0 failed, 41 ignored**, exit code 0; `xcl` lib tests 651 passed, 0 failed, 21 ignored - **0 `SKIPPED`**; `graphics_jobs_dequeue_ahead_of_queued_compute_jobs` and `worker_pool_prioritizes_graphics_pipeline_over_queued_compute` pass. **Review:** The two-lane queue is strict priority: while graphics jobs keep arriving, queued compute jobs wait. That cannot hang, since a bind that needs a compute pipeline runs its job itself in `resolve_wait` when no worker has started it, but under a steady stream of graphics pipelines the compute ones are then built on the binding thread rather than in the background. Worth knowing; not a blocker. **Not tested:** no retail title or regression run (I have no unpacked game), no `XCL_SAMPLE_*` tests, release build; the PR's head on its old base was not run, only its merge onto `main`. Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.
Author
Owner

@⁠thehollowedone on GitHub · 2026-11-24 03:07 UTC · original

Tested

I ran the same synthetic D3D12 fixture on main at dd2ae9a and that revision with only ac387a1 applied. A gate held the sole pipeline worker while the fixture queued a compute job first and a graphics job second. Each job built a native pipeline, submitted work, and read back the result.

  • Baseline completed compute → graphics.
  • With the patch, the same queue completed graphics → compute. Both runs matched all 256 RGBA32F pixels and the expected compute output word.

cargo test --offline --locked -p xcl --test gpu_queue_check -- --nocapture --test-threads=1 ran the scratch fixture with XCL_DXC_THREADS=1 and XCL_ADAPTER=3080 Ti. Each revision passed 1/1 with no skips. Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti / 621.35, DXC 1.8.2502.11, Rust 1.99.1 MSVC, debug.

Not tested

Sustained or multi-worker queue pressure, D3D12 debug-layer messages, and retail loading.

AI use

Codex with GPT-6.2 Sol wrote the scratch fixture, ran the tests, and drafted this report.

**@⁠thehollowedone** on GitHub · 2026-11-24 03:07 UTC · [original](https://github.com/xcl-dev/xcl/pull/628#issuecomment-7120786753) **Tested** I ran the same synthetic D3D12 fixture on [`main` at `dd2ae9a`](https://github.com/ivall/xcl/commit/dd2ae9a70af5eb5aad60f02d86e386b72abe1e95) and that revision with only [`ac387a1`](https://github.com/ivall/xcl/commit/ac387a1af03b187fe6ca7bf330ff7085549d0230) applied. A gate held the sole pipeline worker while the fixture queued a compute job first and a graphics job second. Each job built a native pipeline, submitted work, and read back the result. - Baseline completed **compute → graphics**. - With the patch, the same queue completed **graphics → compute**. Both runs matched all 256 RGBA32F pixels and the expected compute output word. `cargo test --offline --locked -p xcl --test gpu_queue_check -- --nocapture --test-threads=1` ran the scratch fixture with `XCL_DXC_THREADS=1` and `XCL_ADAPTER=3080 Ti`. Each revision passed 1/1 with no skips. Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti / 621.35, DXC 1.8.2502.11, Rust 1.99.1 MSVC, debug. **Not tested** Sustained or multi-worker queue pressure, D3D12 debug-layer messages, and retail loading. **AI use** Codex with GPT-6.2 Sol wrote the scratch fixture, ran the tests, and drafted this report.
Author
Owner

@⁠mastrr9 on GitHub · 2026-11-24 05:05 UTC · original

Independent NVIDIA RTX 5080 build/test run and code review at head 766b661235289f8c76b2a4169b046927fa3e8355.

Code Review

  • Clean two-deque WorkQueue split (gfx drained ahead of compute) under a single Mutex + Condvar, with deterministic unit tests covering both queue ordering and worker-pool prioritization. No issues found.

Tested

  • Environment: NVIDIA GeForce RTX 5080 (16 GB, driver 617.42 / 32.0.16.1742), Windows 11 Pro 25H2 (26200.9974), rustc 1.100.0 (0ef1bc386 2026-11-09), debug build.
  • Command: cargo build --workspace && cargo test --workspace -- --test-threads=4
  • Result: 703 passed, 0 failed, 41 ignored (0 new warnings).
  • PR-specific tests (all ok):
    • hle::d3d12x::pso_async::tests::graphics_jobs_dequeue_ahead_of_queued_compute_jobs
    • hle::d3d12x::pso_async::tests::worker_pool_prioritizes_graphics_pipeline_over_queued_compute
    • Plus 2/2 existing hle::d3d12x::pso_async::used_tests::* tests.
  • SKIPPED (4):
    • gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask (no wave64)
    • gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware (no wave64)
    • test_title_draws_with_a_root_signature_under_the_debug_layer (no d3d12SDKLayers.dll)
    • uploads_start_from_each_subresources_state (no D3D12 debug layer (0x887A002D))

Not tested

  • D3D12 debug layer, AMD/wave64 hardware, and retail titles.

AI use: Antigravity (Gemini 4 Neon) performed the code review, ran the RTX 5080 workspace tests, and drafted this comment.

**@⁠mastrr9** on GitHub · 2026-11-24 05:05 UTC · [original](https://github.com/xcl-dev/xcl/pull/628#issuecomment-7122620766) Independent NVIDIA RTX 5080 build/test run and code review at head `766b661235289f8c76b2a4169b046927fa3e8355`. ### Code Review - Clean two-deque `WorkQueue` split (`gfx` drained ahead of `compute`) under a single `Mutex` + `Condvar`, with deterministic unit tests covering both queue ordering and worker-pool prioritization. No issues found. ### Tested - **Environment:** NVIDIA GeForce RTX 5080 (16 GB, driver `617.42` / `32.0.16.1742`), Windows 11 Pro 25H2 (`26200.9974`), `rustc 1.100.0 (0ef1bc386 2026-11-09)`, debug build. - **Command:** `cargo build --workspace && cargo test --workspace -- --test-threads=4` - **Result:** **703 passed, 0 failed, 41 ignored** (0 new warnings). - **PR-specific tests (all `ok`):** - `hle::d3d12x::pso_async::tests::graphics_jobs_dequeue_ahead_of_queued_compute_jobs` - `hle::d3d12x::pso_async::tests::worker_pool_prioritizes_graphics_pipeline_over_queued_compute` - Plus 2/2 existing `hle::d3d12x::pso_async::used_tests::*` tests. - **SKIPPED (4):** - `gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask` (`no wave64`) - `gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware` (`no wave64`) - `test_title_draws_with_a_root_signature_under_the_debug_layer` (`no d3d12SDKLayers.dll`) - `uploads_start_from_each_subresources_state` (`no D3D12 debug layer (0x887A002D)`) ### Not tested - D3D12 debug layer, AMD/wave64 hardware, and retail titles. **AI use:** Antigravity (Gemini 4 Neon) performed the code review, ran the RTX 5080 workspace tests, and drafted this comment.
Author
Owner

@⁠raylitebull on GitHub · 2026-11-24 10:39 UTC · original

Code/CI review only (not independently runtime-tested by me): clean merge with both checks green (Build and test + PR description). The two-lane graphics-priority queue in pso_async cleanly prevents graphics builds from stalling behind compute backlog. Recommend merging, @⁠ivall (small heads-up: check #690's preload queue() call on current main — it will need updating to enqueue() on merge).

**@⁠raylitebull** on GitHub · 2026-11-24 10:39 UTC · [original](https://github.com/xcl-dev/xcl/pull/628#issuecomment-7129075423) Code/CI review only (not independently runtime-tested by me): clean merge with both checks green (`Build and test` + `PR description`). The two-lane graphics-priority queue in `pso_async` cleanly prevents graphics builds from stalling behind compute backlog. Recommend merging, @⁠ivall (small heads-up: check #690's preload `queue()` call on current `main` — it will need updating to `enqueue()` on merge).
Author
Owner

@⁠brainhay5 on GitHub · 2026-11-24 12:58 UTC · original

Does not build when merged onto current main 47efa2e (merge itself is clean, one file, pso_async.rs):

error[E0425]: cannot find function `queue` in this scope
error: could not compile `xcl` (lib) due to 1 previous error

Looks like a rebase is needed — the call this PR adds does not resolve against what pso_async.rs has on main now.

For context on why it matters to this title: on 47efa2e the async PSO pool never drains. XCL's overlay shows 0 running, 3 done, 57516 pipelines queued at 95 s with a black screen, and xcl-pso-5…xcl-pso-14 are all blocked in a wait. So anything that gets those workers moving is on the critical path for GTA VI.

AI use: OpenCode, DeepSeek V4.1 Flash 1017.

**@⁠brainhay5** on GitHub · 2026-11-24 12:58 UTC · [original](https://github.com/xcl-dev/xcl/pull/628#issuecomment-7132162820) Does not build when merged onto current `main` `47efa2e` (merge itself is clean, one file, `pso_async.rs`): ``` error[E0425]: cannot find function `queue` in this scope error: could not compile `xcl` (lib) due to 1 previous error ``` Looks like a rebase is needed — the call this PR adds does not resolve against what `pso_async.rs` has on main now. For context on why it matters to this title: on `47efa2e` the async PSO pool never drains. XCL's overlay shows `0 running, 3 done, 57516 pipelines queued` at 95 s with a black screen, and `xcl-pso-5`…`xcl-pso-14` are all blocked in a wait. So anything that gets those workers moving is on the critical path for GTA VI. AI use: OpenCode, DeepSeek V4.1 Flash 1017.
Author
Owner

@⁠thehollowedone on GitHub · 2026-11-24 13:01 UTC · original

I verified the caller update on a local, uncommitted merge of 766b661 onto 47efa2e. The unresolved call is in resolve_within, the bounded wait path. Replacing let _ = queue().lock().unwrap().send(p.clone()); with enqueue(p.clone()); changed cargo check --offline --locked -p xcl --lib from E0425 to pass.

With the fix, cargo test --offline --locked -p xcl --lib pso_async -- --test-threads=1 passed 6/6. That includes a scratch fixture that occupied the worker pool, called the bounded wait twice on a lazy compute pipeline, then queued a graphics job. Both waits returned the stand-in. When one worker was released, it ran graphics first, then compute, once each. The fixture also passed three isolated runs with the filter scratch_bounded_bind_enqueues_compute_behind_graphics.

Windows 11 build 26300, Ryzen 7 9800X3D, Rust 1.99.1 MSVC, debug. This check covers worker scheduling with synthetic jobs. Driver compile time and retail world loading remain untested here.

AI-assisted. Codex (GPT-6, exact variant unavailable) tested the caller change and drafted this follow-up.

**@⁠thehollowedone** on GitHub · 2026-11-24 13:01 UTC · [original](https://github.com/xcl-dev/xcl/pull/628#issuecomment-7132248567) I verified the caller update on a local, uncommitted merge of [`766b661`](https://github.com/ivall/xcl/commit/766b661235289f8c76b2a4169b046927fa3e8355) onto [`47efa2e`](https://github.com/ivall/xcl/commit/47efa2ecea0a12934719ae69b81930cf02a4b1c3). The unresolved call is in [`resolve_within`](https://github.com/ivall/xcl/blob/47efa2ecea0a12934719ae69b81930cf02a4b1c3/crates/xcl/src/hle/d3d12x/pso_async.rs#L408-L419), the bounded wait path. Replacing `let _ = queue().lock().unwrap().send(p.clone());` with `enqueue(p.clone());` changed `cargo check --offline --locked -p xcl --lib` from E0425 to pass. With the fix, `cargo test --offline --locked -p xcl --lib pso_async -- --test-threads=1` passed 6/6. That includes a scratch fixture that occupied the worker pool, called the bounded wait twice on a lazy compute pipeline, then queued a graphics job. Both waits returned the stand-in. When one worker was released, it ran graphics first, then compute, once each. The fixture also passed three isolated runs with the filter `scratch_bounded_bind_enqueues_compute_behind_graphics`. Windows 11 build 26300, Ryzen 7 9800X3D, Rust 1.99.1 MSVC, debug. This check covers worker scheduling with synthetic jobs. Driver compile time and retail world loading remain untested here. AI-assisted. Codex (GPT-6, exact variant unavailable) tested the caller change and drafted this follow-up.
Author
Owner

@⁠JJAutoCompare on GitHub · 2026-11-25 06:36 UTC · original

Empirical test report (766b6612)

Hardware / environment

  • Commit 766b661235, Windows x64 build 10.0.26200.9974, AMD Ryzen 7 3800X 8-Core Processor.
  • Rust 1.100.0 (0ef1bc386, 2026-11-09), x86_64-pc-windows-msvc, unoptimized test profile with debug info and incremental compilation disabled. Installed DXC 1.9.2609.5 (01b62ad47). The focused tests used no GPU adapter.

Commands and results

  • cargo test --workspace --no-run — exit 0. Built the workspace test executables in 53.63 s. Cargo emitted a deprecation warning for fetch_update in XGameRuntime. This command runs zero tests.
  • The focused commands below ran outside Invoke-ArcTest.ps1 with XCL_ADAPTER=NONE_CPU_ONLY. In the commands, $testExe is the prebuilt xcl library test executable.
& $testExe --exact --test-threads=1 --nocapture hle::d3d12x::pso_async::tests::graphics_jobs_dequeue_ahead_of_queued_compute_jobs
& $testExe --exact --test-threads=1 --nocapture hle::d3d12x::pso_async::tests::worker_pool_prioritizes_graphics_pipeline_over_queued_compute
  • Both commands exited 0. Each reported 1 passed, 0 failed, 0 ignored and 682 filtered out. Total: 2 passed, 0 failed, 0 ignored and 0 skipped (case-sensitive count of lines beginning with SKIPPED followed by a space).

Observed behavior

The queue test verified that graphics jobs dequeue ahead of earlier compute jobs and that jobs retain submission order within each class. The worker-pool test occupied every worker with a synthetic job, queued a compute job followed by a graphics job, and released one worker. The graphics job started first, and both jobs returned the expected synthetic pipeline handles. The PR adds two CPU-only tests.

Not tested

Full GPU workspace suite and game smoke runs omitted.

AI use

Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr628-focused.log and published.

**@⁠JJAutoCompare** on GitHub · 2026-11-25 06:36 UTC · [original](https://github.com/xcl-dev/xcl/pull/628#issuecomment-7154976493) ### Empirical test report (766b6612) **Hardware / environment** - Commit 766b661235289f8c76b2a4169b046927fa3e8355, Windows x64 build 10.0.26200.9974, AMD Ryzen 7 3800X 8-Core Processor. - Rust 1.100.0 (0ef1bc386, 2026-11-09), x86_64-pc-windows-msvc, unoptimized test profile with debug info and incremental compilation disabled. Installed DXC 1.9.2609.5 (01b62ad47). The focused tests used no GPU adapter. **Commands and results** - `cargo test --workspace --no-run` — exit 0. Built the workspace test executables in 53.63 s. Cargo emitted a deprecation warning for fetch_update in XGameRuntime. This command runs zero tests. - The focused commands below ran outside Invoke-ArcTest.ps1 with XCL_ADAPTER=NONE_CPU_ONLY. In the commands, $testExe is the prebuilt xcl library test executable. ```powershell & $testExe --exact --test-threads=1 --nocapture hle::d3d12x::pso_async::tests::graphics_jobs_dequeue_ahead_of_queued_compute_jobs & $testExe --exact --test-threads=1 --nocapture hle::d3d12x::pso_async::tests::worker_pool_prioritizes_graphics_pipeline_over_queued_compute ``` - Both commands exited 0. Each reported 1 passed, 0 failed, 0 ignored and 682 filtered out. Total: 2 passed, 0 failed, 0 ignored and 0 skipped (case-sensitive count of lines beginning with SKIPPED followed by a space). **Observed behavior** The queue test verified that graphics jobs dequeue ahead of earlier compute jobs and that jobs retain submission order within each class. The worker-pool test occupied every worker with a synthetic job, queued a compute job followed by a graphics job, and released one worker. The graphics job started first, and both jobs returned the expected synthetic pipeline handles. The PR adds two CPU-only tests. **Not tested** Full GPU workspace suite and game smoke runs omitted. **AI use** Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr628-focused.log and published.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 12:43 UTC · original

Verification on RTX 3060 Ti (Windows 11): merge conflict with current main — needs a rebase before it can be tested.

**@⁠DavidM1911** on GitHub · 2026-11-25 12:43 UTC · [original](https://github.com/xcl-dev/xcl/pull/628#issuecomment-7162775842) Verification on RTX 3060 Ti (Windows 11): **merge conflict with current `main`** — needs a rebase before it can be tested.
Author
Owner

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

Data point from a retail title (GTA VI 1.0.2.1, Series X profile, 12 GB NVIDIA) supporting this change, plus one case it leaves open.

Measured. Bind waits are bounded (XCL_PSO_WAIT_MS=50, XCL_GRAPHICS_PSO_WAIT_MS=300). In one session, 785 of 1,025 bind timeouts were for pipelines still queued for a worker, not still building. That is the head-of-line blocking this PR describes.

What #628 leaves open: compute behind compute. The title also queues about 160–240 giant compute programs (1.0–1.8 MB of DXIL, several seconds each in the driver). Within the compute lane, these still hold up ordinary compute pipelines queued behind them. Locally I gave slow compute builds their own set of workers (xcl-pso-slow-*), so other compute builds don't wait behind them. With that, skipped draws dropped to 8 of about 524k in a 600 s session.

The local version chose the slow lane from recorded build times, a journal that upstream does not have. A version for upstream main, selecting by console code size (effects::BIG_CODE, 16 KiB), builds and passes the pso_async tests, but I have not run it on a GPU. It probably fits best as a third lane on top of your WorkQueue, not as a separate PR. Happy to rebase it onto this branch if that is useful.

**@⁠jacksonslab** on GitHub · 2026-11-25 14:35 UTC · [original](https://github.com/xcl-dev/xcl/pull/628#issuecomment-7165512986) Data point from a retail title (GTA VI 1.0.2.1, Series X profile, 12 GB NVIDIA) supporting this change, plus one case it leaves open. **Measured.** Bind waits are bounded (`XCL_PSO_WAIT_MS=50`, `XCL_GRAPHICS_PSO_WAIT_MS=300`). In one session, 785 of 1,025 bind timeouts were for pipelines still queued for a worker, not still building. That is the head-of-line blocking this PR describes. **What #628 leaves open: compute behind compute.** The title also queues about 160–240 giant compute programs (1.0–1.8 MB of DXIL, several seconds each in the driver). Within the compute lane, these still hold up ordinary compute pipelines queued behind them. Locally I gave slow compute builds their own set of workers (`xcl-pso-slow-*`), so other compute builds don't wait behind them. With that, skipped draws dropped to 8 of about 524k in a 600 s session. The local version chose the slow lane from recorded build times, a journal that upstream does not have. A version for upstream main, selecting by console code size (`effects::BIG_CODE`, 16 KiB), builds and passes the `pso_async` tests, but I have not run it on a GPU. It probably fits best as a third lane on top of your `WorkQueue`, not as a separate PR. Happy to rebase it onto this branch if that is useful.
This pull request has changes conflicting with the target branch.
  • crates/xcl/src/hle/d3d12x/pso_async.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/628/head:github-bot/gh-628'
git switch 'github-bot/gh-628'

Merge

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