D3D12.X: run sparse::readback_after_execute asynchronously per queue #1722

Closed
gustavsi wants to merge 4 commits from upstream-pr/1732 into main
gustavsi commented 2026-11-24 20:01:23 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by gustavsi on 2026-11-24T20:01:23Z.


Move sparse::readback_after_execute off sparse::State::queue and out from under STATE.lock() into per-queue FIFO background workers, completing asynchronously when the queue has an unsatisfied title/wait-before-signal GPU queue.Wait (avoiding CPU/GPU deadlocks on wait-before-signal Wait64BitValueX) and synchronously otherwise (preserving immediate CPU visibility after a GPU fence wait). Part of #1452.

Stacked on #877 (3b76b082); only the top commit (73d6598e) belongs here.

Previously, sparse::readback_after_execute locked STATE, called s.queue.Wait(&s.rb_fence, v), and synchronously executed s.readback_ranges(&merged) (s.wait_for(s.value) with a 5,000 ms timeout) inside ExecuteCommandLists. When an async compute queue carried both a sparse memory write and a wait-before-signal Wait64BitValueX whose producer direct queue had not yet been submitted on the same thread, this deadlocked both the submitter thread (preventing submission of the producer queue) and sparse::State::queue for 5,000 ms per submit, triggering repeated xcl-sync-watchdog timeouts and causing a retail title's stall watchdog to abort after 5–6 consecutive submits.

With per-queue FIFO workers waiting on a raw per-queue fence outside STATE.lock() before invoking readback_ranges, sparse::State::queue is never stalled behind a blocked title queue. Active unsatisfied title queue.Wait calls and unsubmitted wait-before-signal Wait64BitValueX bridges are tracked via sparse::note_queue_wait (ignoring XCL's own internal fences such as sparse::before_execute's s.fence so an in-flight internal upload under XCL_D3D12_DEBUG=1 never causes readback_after_execute to return before CopyBufferRegion completes, fixing the Write32BitValueBottomOfPipeX zero-read reported by @razormontana).

If a fence wait times out after 5,000 ms (while the device is still alive), the worker wakes any synchronous caller with RbStatus::Deferred (never falsely claiming RbStatus::Completed) and retains the job in a per-worker FIFO deferred: VecDeque<RbJob> queue, polling and draining it in order once the fence completes so CPU coherence is never silently lost (fixing @bmjask's P1).

To prevent an asynchronous or deferred readback from overwriting a newer CPU write made after the submit (flagged by @GreemSC), readback_after_execute snapshots the per-64-byte-segment CPU hashes of the committed target ranges when recording the job. At copy-back time, readback_ranges skips any segment whose current CPU bytes differ from the snapshot (unless they match an intervening readback recorded while multiple jobs are in flight, so consecutive deferred readbacks on the same range still land) and leaves sent dirty for any skipped 64-byte chunk so the next before_execute uploads the CPU's newer bytes.

What is in it

  • crates/xcl/src/hle/d3d12x/sparse.rs:
    • Add per-queue RB_QUEUES map (RbQueueState holding a raw ID3D12Fence via super::real::create_raw_fence, monotonic fence value, and channel sender to a dedicated xcl-sparse-rb-<queue> FIFO worker thread) and QUEUE_WAITS tracking (note_queue_wait, queue_has_unsatisfied_wait, forget_queue).
    • Have readback_after_execute filter/merge sparse ranges using uma::get(), signal the queue's fence, register new queues with s.note_queue(queue) (preserving #2345's parked-tile quarantine tracking), snapshot committed 64-byte-bounded segment hashes (State::snapshot_ranges) under STATE.lock(), and enqueue an RbJob without holding STATE across GPU waits — returning immediately if queue_has_unsatisfied_wait is true, or waiting on the job's RbStatus condvar outside STATE.lock() otherwise (logging when a synchronous wait is deferred instead of completed).
    • Have State::readback_ranges check the recorded RbSnapshot (and a bounded last_rb map active only while multiple readback jobs are in flight) before copying each 64-byte-bounded segment, skipping CPU-modified segments without marking their 64-byte chunk clean in sent, and flushing staging with at least one tile of headroom so staging flushes never split a 64-byte segment.
    • Have each worker (spawn_rb_worker_with) wait on its fence outside STATE.lock() (5,000 ms timeout). On completion, drain any earlier deferred jobs first in FIFO order, run readback_ranges, and report RbStatus::Completed; on timeout (while GetCompletedValue() != u64::MAX), report RbStatus::Deferred and retain the job in deferred: VecDeque<RbJob> so it retries every 20 ms (and on subsequent jobs / bounded teardown drain) until the fence completes.
    • Add unit tests:
      • readback_after_execute_does_not_block_on_stalled_queue
      • internal_fence_wait_keeps_readback_synchronous
      • timeout_then_completes_still_reads_back_cpu_memory
      • deferred_readback_preserves_newer_cpu_writes
  • crates/xcl/src/hle/d3d12x/real.rs & crates/xcl/src/hle/d3d12x/list_x.rs:
    • Record active unsatisfied title queue.Wait calls (is_fence in q_wait_pc and queue_dispatch) and unsubmitted Wait64BitValueX GPU bridges (unsubmitted in try_gpu_wait) via sparse::note_queue_wait, and clean up per-queue state in q_release via sparse::forget_queue.

Tested

  • Hardware / OS: AMD Radeon RX 9060 XT (16 GiB VRAM, RADV Mesa 26.2.7), Linux, GE-Proton11-14-x86_64, vkd3d-proton (-Db_ndebug=true), DXC 1.9.2609.5, cross-compiled x86_64-pc-windows-msvc (clang-cl + lld-link).
  • Restacked onto updated #877 (3b76b082, on main f9a0cb80 + #867 021b2c33 + #871 cb3902a4) at 73d6598e (no conflicts, commit diff unchanged) under GE-Proton11-14 (XCL_DXC_DIR set):
    • hle::d3d12x::sparse:: --test-threads=1: 22 passed, 0 failed, 1 ignored (including deferred_readback_preserves_newer_cpu_writes, timeout_then_completes_still_reads_back_cpu_memory, readback_after_execute_does_not_block_on_stalled_queue, and internal_fence_wait_keeps_readback_synchronous)
    • hle::d3d12x::list_x:: --test-threads=1: 40 passed, 0 failed, 0 ignored
    • hle::d3d12x::real:: --test-threads=1: 67 passed, 0 failed, 0 ignored
    • hle::d3d12x::alloc_pool:: --test-threads=4: 4 passed, 0 failed, 0 ignored
  • Retail title 60 s smoke run via unmodified pwsh ./scripts/smoke.ps1 (with GE-Proton11-14 wrapper, XCL_PREPARE=0): 649 frames shown (PresentX 649, 0 0 8/2 s), exit: 0x0, 0 crashes, 0 device removals.

Regression run
Produced under Wine (GE-Proton11-14, AMD Radeon RX 9060 XT, XCL_PREPARE=0 XCL_NETWORK=0 XCL_PSO_PRELOAD=0 XCL_RUN_SECONDS=60 XCL_ACTIVITY=1, VKD3D_CONFIG=""). The PR run used unmodified pwsh ./scripts/smoke.ps1 via a thin Wine wrapper; main (e0d93c84) crashed before writing report.json, so its block was extracted from the same xcl.log (peak commit: 0 MB is what Wine reports in xcl.log).

main (e0d93c84):

xcl-smoke v1
commit: e0d93c84ad8253f6e17738d14741c1bab7061127
gpu: AMD Radeon RX 9060 XT
title: retail-title
seconds: 60
exit: 0x3
frames shown: 0 (did not reach end)
presents per 2 s (last 3): 0 0
device removals: 0
crashes: 2
peak commit: 0 MB

This PR (73d6598e, stacked on #877):

xcl-smoke v1
commit: 73d6598e87a1b2599732da691b78204a03cb8366
gpu: AMD Radeon RX 9060 XT
title: retail-title
seconds: 60
exit: 0x0
frames shown: 649 (PresentX 649)
presents per 2 s (last 3): 0 0 8
device removals: 0
crashes: 0
peak commit: 0 MB

Not tested

  • Native Windows locally (independently verified on Windows 11 / RTX 4060 by @Decodere at f14d6976 and RTX 3060 Ti by @DavidM1911 before the timeout-retry and snapshot-guard updates).
  • NVIDIA Linux GPUs.

AI use

  • T3 Code, Antigravity (Gemini 4 Neon) restacked cleanly onto updated #877 (3b76b082, on main f9a0cb80), ran the Proton tests and 60 s smoke run at 73d6598e, and updated this description (as well as the earlier RbSnapshot / last_rb CPU-write protection and deferred_readback_preserves_newer_cpu_writes regression test).
  • Claude Code (Claude Opus 5.5) ran the earlier c7fac707 restack verification.
<!-- greyfinch-sync:ivall/xcl:issue:5479392183 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1732). Originally posted by [gustavsi](https://github.com/gustavsi) on 2026-11-24T20:01:23Z. --- Move `sparse::readback_after_execute` off `sparse::State::queue` and out from under `STATE.lock()` into per-queue FIFO background workers, completing asynchronously when the queue has an unsatisfied title/wait-before-signal GPU `queue.Wait` (avoiding CPU/GPU deadlocks on wait-before-signal `Wait64BitValueX`) and synchronously otherwise (preserving immediate CPU visibility after a GPU fence wait). Part of #1452. Stacked on #877 (`3b76b082`); only the top commit (`73d6598e`) belongs here. Previously, `sparse::readback_after_execute` locked `STATE`, called `s.queue.Wait(&s.rb_fence, v)`, and synchronously executed `s.readback_ranges(&merged)` (`s.wait_for(s.value)` with a 5,000 ms timeout) inside `ExecuteCommandLists`. When an async compute queue carried both a sparse memory write and a wait-before-signal `Wait64BitValueX` whose producer direct queue had not yet been submitted on the same thread, this deadlocked both the submitter thread (preventing submission of the producer queue) and `sparse::State::queue` for 5,000 ms per submit, triggering repeated `xcl-sync-watchdog` timeouts and causing a retail title's stall watchdog to abort after 5–6 consecutive submits. With per-queue FIFO workers waiting on a raw per-queue fence outside `STATE.lock()` before invoking `readback_ranges`, `sparse::State::queue` is never stalled behind a blocked title queue. Active unsatisfied title `queue.Wait` calls and unsubmitted wait-before-signal `Wait64BitValueX` bridges are tracked via `sparse::note_queue_wait` (ignoring XCL's own internal fences such as `sparse::before_execute`'s `s.fence` so an in-flight internal upload under `XCL_D3D12_DEBUG=1` never causes `readback_after_execute` to return before `CopyBufferRegion` completes, fixing the `Write32BitValueBottomOfPipeX` zero-read reported by @razormontana). If a fence wait times out after 5,000 ms (while the device is still alive), the worker wakes any synchronous caller with `RbStatus::Deferred` (never falsely claiming `RbStatus::Completed`) and retains the job in a per-worker FIFO `deferred: VecDeque<RbJob>` queue, polling and draining it in order once the fence completes so CPU coherence is never silently lost (fixing @bmjask's P1). To prevent an asynchronous or deferred readback from overwriting a newer CPU write made after the submit (flagged by @GreemSC), `readback_after_execute` snapshots the per-64-byte-segment CPU hashes of the committed target ranges when recording the job. At copy-back time, `readback_ranges` skips any segment whose current CPU bytes differ from the snapshot (unless they match an intervening readback recorded while multiple jobs are in flight, so consecutive deferred readbacks on the same range still land) and leaves `sent` dirty for any skipped 64-byte chunk so the next `before_execute` uploads the CPU's newer bytes. **What is in it** - `crates/xcl/src/hle/d3d12x/sparse.rs`: - Add per-queue `RB_QUEUES` map (`RbQueueState` holding a raw `ID3D12Fence` via `super::real::create_raw_fence`, monotonic fence value, and channel sender to a dedicated `xcl-sparse-rb-<queue>` FIFO worker thread) and `QUEUE_WAITS` tracking (`note_queue_wait`, `queue_has_unsatisfied_wait`, `forget_queue`). - Have `readback_after_execute` filter/merge sparse ranges using `uma::get()`, signal the queue's fence, register new queues with `s.note_queue(queue)` (preserving #2345's parked-tile quarantine tracking), snapshot committed 64-byte-bounded segment hashes (`State::snapshot_ranges`) under `STATE.lock()`, and enqueue an `RbJob` without holding `STATE` across GPU waits — returning immediately if `queue_has_unsatisfied_wait` is true, or waiting on the job's `RbStatus` condvar outside `STATE.lock()` otherwise (logging when a synchronous wait is deferred instead of completed). - Have `State::readback_ranges` check the recorded `RbSnapshot` (and a bounded `last_rb` map active only while multiple readback jobs are in flight) before copying each 64-byte-bounded segment, skipping CPU-modified segments without marking their 64-byte chunk clean in `sent`, and flushing staging with at least one tile of headroom so staging flushes never split a 64-byte segment. - Have each worker (`spawn_rb_worker_with`) wait on its fence outside `STATE.lock()` (5,000 ms timeout). On completion, drain any earlier deferred jobs first in FIFO order, run `readback_ranges`, and report `RbStatus::Completed`; on timeout (while `GetCompletedValue() != u64::MAX`), report `RbStatus::Deferred` and retain the job in `deferred: VecDeque<RbJob>` so it retries every 20 ms (and on subsequent jobs / bounded teardown drain) until the fence completes. - Add unit tests: - `readback_after_execute_does_not_block_on_stalled_queue` - `internal_fence_wait_keeps_readback_synchronous` - `timeout_then_completes_still_reads_back_cpu_memory` - `deferred_readback_preserves_newer_cpu_writes` - `crates/xcl/src/hle/d3d12x/real.rs` & `crates/xcl/src/hle/d3d12x/list_x.rs`: - Record active unsatisfied title `queue.Wait` calls (`is_fence` in `q_wait_pc` and `queue_dispatch`) and unsubmitted `Wait64BitValueX` GPU bridges (`unsubmitted` in `try_gpu_wait`) via `sparse::note_queue_wait`, and clean up per-queue state in `q_release` via `sparse::forget_queue`. **Tested** - Hardware / OS: AMD Radeon RX 9060 XT (16 GiB VRAM, RADV Mesa 26.2.7), Linux, `GE-Proton11-14-x86_64`, `vkd3d-proton` (`-Db_ndebug=true`), DXC 1.9.2609.5, cross-compiled `x86_64-pc-windows-msvc` (`clang-cl` + `lld-link`). - Restacked onto updated #877 (`3b76b082`, on `main` `f9a0cb80` + #867 `021b2c33` + #871 `cb3902a4`) at `73d6598e` (no conflicts, commit diff unchanged) under `GE-Proton11-14` (`XCL_DXC_DIR` set): - `hle::d3d12x::sparse:: --test-threads=1`: **22 passed, 0 failed, 1 ignored** (including `deferred_readback_preserves_newer_cpu_writes`, `timeout_then_completes_still_reads_back_cpu_memory`, `readback_after_execute_does_not_block_on_stalled_queue`, and `internal_fence_wait_keeps_readback_synchronous`) - `hle::d3d12x::list_x:: --test-threads=1`: **40 passed, 0 failed, 0 ignored** - `hle::d3d12x::real:: --test-threads=1`: **67 passed, 0 failed, 0 ignored** - `hle::d3d12x::alloc_pool:: --test-threads=4`: **4 passed, 0 failed, 0 ignored** - Retail title 60 s smoke run via unmodified `pwsh ./scripts/smoke.ps1` (with `GE-Proton11-14` wrapper, `XCL_PREPARE=0`): **`649` frames shown (`PresentX 649`, `0 0 8`/2 s)**, `exit: 0x0`, `0` crashes, `0` device removals. **Regression run** Produced under Wine (`GE-Proton11-14`, AMD Radeon RX 9060 XT, `XCL_PREPARE=0 XCL_NETWORK=0 XCL_PSO_PRELOAD=0 XCL_RUN_SECONDS=60 XCL_ACTIVITY=1`, `VKD3D_CONFIG=""`). The PR run used unmodified `pwsh ./scripts/smoke.ps1` via a thin Wine wrapper; `main` (`e0d93c84`) crashed before writing `report.json`, so its block was extracted from the same `xcl.log` (`peak commit: 0 MB` is what Wine reports in `xcl.log`). `main` (`e0d93c84`): ``` xcl-smoke v1 commit: e0d93c84ad8253f6e17738d14741c1bab7061127 gpu: AMD Radeon RX 9060 XT title: retail-title seconds: 60 exit: 0x3 frames shown: 0 (did not reach end) presents per 2 s (last 3): 0 0 device removals: 0 crashes: 2 peak commit: 0 MB ``` This PR (`73d6598e`, stacked on #877): ``` xcl-smoke v1 commit: 73d6598e87a1b2599732da691b78204a03cb8366 gpu: AMD Radeon RX 9060 XT title: retail-title seconds: 60 exit: 0x0 frames shown: 649 (PresentX 649) presents per 2 s (last 3): 0 0 8 device removals: 0 crashes: 0 peak commit: 0 MB ``` **Not tested** - Native Windows locally (independently verified on Windows 11 / RTX 4060 by @Decodere at `f14d6976` and RTX 3060 Ti by @DavidM1911 before the timeout-retry and snapshot-guard updates). - NVIDIA Linux GPUs. **AI use** - T3 Code, Antigravity (`Gemini 4 Neon`) restacked cleanly onto updated #877 (`3b76b082`, on `main` `f9a0cb80`), ran the Proton tests and 60 s smoke run at `73d6598e`, and updated this description (as well as the earlier `RbSnapshot` / `last_rb` CPU-write protection and `deferred_readback_preserves_newer_cpu_writes` regression test). - Claude Code (Claude Opus 5.5) ran the earlier `c7fac707` restack verification.
LocranKing commented 2026-11-24 21:09:35 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by LocranKing on 2026-11-24T20:37:33Z.


Independent Windows release GPU check on NVIDIA RTX 3060 Ti (00eec16bbc2b41bc4f56d0f8486dfbcbe8073169, merge-base b7aa9f3bd212088e0d927439284dc5ed325ce3c7): test_title_runs_and_game_folder_is_untouched fails on Write32BitValueBottomOfPipeX: 0x0 (the 60 s retail smoke passes).

Setup

  • GPU: NVIDIA GeForce RTX 3060 Ti (8024 MiB VRAM, wave32), driver 32.0.16.2101
  • CPU / RAM: AMD Ryzen 5 5500 (6C/12T), 31.8 GB RAM
  • OS: Windows 11 Home Single Language, build 26200
  • Toolchain: rustc 1.100.0, DXC 1.9.2602.17, --release

Workspace tests (cargo test --workspace --release --no-fail-fast -- --test-threads=4)

  • Exit 101: 773 passed, 1 failed, 41 ignored across 20 result blocks (SKIPPED: 2 no wave64, 2 no D3D12 debug layer).
  • Failure in crates\xcl\tests\e2e.rs:132:5 (test_title_runs_and_game_folder_is_untouched):
    thread 'test_title_runs_and_game_folder_is_untouched' panicked at crates\xcl\tests\e2e.rs:132:5:
    failed checks in the test title:
    [FAIL] D3D12.X: console command list memory methods (writes, timestamp, fill, copy, KickoffX, Wait32/64): 
    Write32BitValueBottomOfPipeX: 0x0
    
    This looks directly related to moving sparse::readback_after_execute onto an asynchronous per-queue worker: after the title's GPU fence wait completes, the CPU reads 0x0 before the async readback copies the GPU write back to CPU memory.
  • Also note the PR branch currently includes two earlier Wine commits (b66a150, fbf1440) on top of b7aa9f3.

Regression run (scripts/smoke.ps1, 60 s, XCL_NETWORK=0, title folder name redacted)

  • PR head vs base b7aa9f3: 1585 / 1508 frames (105.1%), 15209 / 14730 MB peak commit (103.3%), 0 device removals, 0 crashes.

Base (main b7aa9f3):

xcl-smoke v1
commit: b7aa9f3bd212088e0d927439284dc5ed325ce3c7
gpu: NVIDIA GeForce RTX 3060 Ti
title: retail-1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1508 (PresentX 1508)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14730 MB

PR head (00eec16):

xcl-smoke v1
commit: 00eec16bbc2b41bc4f56d0f8486dfbcbe8073169
gpu: NVIDIA GeForce RTX 3060 Ti
title: retail-1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1585 (PresentX 1585)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15209 MB

Not tested: Linux / Wine, repeating e2e to measure flake rate vs deterministic failure, AMD / wave64 hardware.

AI use: Antigravity (Gemini 4 Neon) built and ran the workspace test suite and smoke pair on this hardware and drafted this report from the captured outputs; reviewed before posting. No game files attached.

<!-- greyfinch-sync:ivall/xcl:comment:7143835097 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1732#issuecomment-7143835097). Originally posted by [LocranKing](https://github.com/LocranKing) on 2026-11-24T20:37:33Z. --- Independent Windows release GPU check on NVIDIA RTX 3060 Ti (`00eec16bbc2b41bc4f56d0f8486dfbcbe8073169`, merge-base `b7aa9f3bd212088e0d927439284dc5ed325ce3c7`): **`test_title_runs_and_game_folder_is_untouched` fails on `Write32BitValueBottomOfPipeX: 0x0`** (the 60 s retail smoke passes). **Setup** - GPU: NVIDIA GeForce RTX 3060 Ti (`8024 MiB VRAM`, wave32), driver `32.0.16.2101` - CPU / RAM: AMD Ryzen 5 5500 (6C/12T), `31.8 GB` RAM - OS: Windows 11 Home Single Language, build `26200` - Toolchain: `rustc 1.100.0`, DXC `1.9.2602.17`, `--release` **Workspace tests (`cargo test --workspace --release --no-fail-fast -- --test-threads=4`)** - Exit `101`: **773 passed, 1 failed, 41 ignored** across 20 result blocks (`SKIPPED`: 2 `no wave64`, 2 `no D3D12 debug layer`). - Failure in `crates\xcl\tests\e2e.rs:132:5` (`test_title_runs_and_game_folder_is_untouched`): ``` thread 'test_title_runs_and_game_folder_is_untouched' panicked at crates\xcl\tests\e2e.rs:132:5: failed checks in the test title: [FAIL] D3D12.X: console command list memory methods (writes, timestamp, fill, copy, KickoffX, Wait32/64): Write32BitValueBottomOfPipeX: 0x0 ``` This looks directly related to moving `sparse::readback_after_execute` onto an asynchronous per-queue worker: after the title's GPU fence wait completes, the CPU reads `0x0` before the async readback copies the GPU write back to CPU memory. - Also note the PR branch currently includes two earlier Wine commits (`b66a150`, `fbf1440`) on top of `b7aa9f3`. **Regression run (`scripts/smoke.ps1`, 60 s, `XCL_NETWORK=0`, title folder name redacted)** - PR head vs base `b7aa9f3`: `1585 / 1508` frames (**105.1%**), `15209 / 14730 MB` peak commit (**103.3%**), `0` device removals, `0` crashes. Base (`main` `b7aa9f3`): ``` xcl-smoke v1 commit: b7aa9f3bd212088e0d927439284dc5ed325ce3c7 gpu: NVIDIA GeForce RTX 3060 Ti title: retail-1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1508 (PresentX 1508) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14730 MB ``` PR head (`00eec16`): ``` xcl-smoke v1 commit: 00eec16bbc2b41bc4f56d0f8486dfbcbe8073169 gpu: NVIDIA GeForce RTX 3060 Ti title: retail-1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1585 (PresentX 1585) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15209 MB ``` **Not tested:** Linux / Wine, repeating `e2e` to measure flake rate vs deterministic failure, AMD / wave64 hardware. **AI use:** Antigravity (`Gemini 4 Neon`) built and ran the workspace test suite and smoke pair on this hardware and drafted this report from the captured outputs; reviewed before posting. No game files attached.
gustavsi commented 2026-11-24 21:29:55 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by gustavsi on 2026-11-24T21:13:59Z.


Thanks @LocranKing for catching that on Windows!

Your diagnosis was spot on: when an unstalled queue (like testtitle's Write32BitValueBottomOfPipeX + wait(&queue, &fence, 1)) completes, the title's own GPU fence completed before the background worker finished readback_ranges.

Updated 64cb447 to track active unsatisfied queue.Wait calls (sparse::note_queue_wait in q_wait_pc and list_x::try_gpu_wait, cleaned up in q_release via sparse::forget_queue):

  • When queue has an unsatisfied queue.Wait (wait-before-signal Wait64BitValueX whose producer is not yet submitted), readback_after_execute returns immediately while the per-queue FIFO worker finishes asynchronously (never deadlocking the submitter thread or stalling sparse::State::queue).
  • When queue has no unsatisfied queue.Wait, readback_after_execute still waits on the queue's fence outside STATE.lock() and off sparse::State::queue, but waits for the FIFO worker's completion condvar before returning so CPU reads right after a GPU fence wait always observe the updated bytes.

(The two earlier commits b66a150 / fbf1440 are there because this PR is stacked on #877 for Wine smoke testing; only the top commit 64cb447 belongs to this PR.)

<!-- greyfinch-sync:ivall/xcl:comment:7144655616 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1732#issuecomment-7144655616). Originally posted by [gustavsi](https://github.com/gustavsi) on 2026-11-24T21:13:59Z. --- Thanks @LocranKing for catching that on Windows! Your diagnosis was spot on: when an unstalled queue (like `testtitle`'s `Write32BitValueBottomOfPipeX` + `wait(&queue, &fence, 1)`) completes, the title's own GPU fence completed before the background worker finished `readback_ranges`. Updated `64cb447` to track active unsatisfied `queue.Wait` calls (`sparse::note_queue_wait` in `q_wait_pc` and `list_x::try_gpu_wait`, cleaned up in `q_release` via `sparse::forget_queue`): - When `queue` has an unsatisfied `queue.Wait` (wait-before-signal `Wait64BitValueX` whose producer is not yet submitted), `readback_after_execute` returns immediately while the per-queue FIFO worker finishes asynchronously (never deadlocking the submitter thread or stalling `sparse::State::queue`). - When `queue` has no unsatisfied `queue.Wait`, `readback_after_execute` still waits on the queue's fence outside `STATE.lock()` and off `sparse::State::queue`, but waits for the FIFO worker's completion condvar before returning so CPU reads right after a GPU fence wait always observe the updated bytes. (The two earlier commits `b66a150` / `fbf1440` are there because this PR is stacked on #877 for Wine smoke testing; only the top commit `64cb447` belongs to this PR.)
DavidM1911 commented 2026-11-24 23:08:24 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T22:37:39Z.


Verification on RTX 3060 Ti (Windows 11): merge conflict with current main in crates/xcl/src/hle/d3d12x/vram.rs — needs a rebase before it can be tested.

<!-- greyfinch-sync:ivall/xcl:comment:7146455858 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1732#issuecomment-7146455858). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T22:37:39Z. --- Verification on RTX 3060 Ti (Windows 11): **merge conflict with current `main`** in `crates/xcl/src/hle/d3d12x/vram.rs` — needs a rebase before it can be tested.
gustavsi commented 2026-11-24 23:08:30 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by gustavsi on 2026-11-24T22:44:48Z.


Thanks @DavidM1911! Rebased the stack (#867 -> #871 -> #877 -> #1732) onto main 689f2db (HEAD e4d8229, resolving the vram.rs conflict) and re-verified unit/GPU tests and the 60 s smoke run under Wine — ready for Windows testing.

<!-- greyfinch-sync:ivall/xcl:comment:7146595622 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1732#issuecomment-7146595622). Originally posted by [gustavsi](https://github.com/gustavsi) on 2026-11-24T22:44:48Z. --- Thanks @DavidM1911! Rebased the stack (#867 -> #871 -> #877 -> #1732) onto `main` `689f2db` (HEAD `e4d8229`, resolving the `vram.rs` conflict) and re-verified unit/GPU tests and the 60 s smoke run under Wine — ready for Windows testing.
JJAutoCompare commented 2026-11-25 04:10:48 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T04:09:24Z.


XCL PR #1732 verification on Intel Arc A770

Head e4d8229650344e003513bd3775eb90502854c96b, detached and clean. STOR-WINLAB ran Windows x64 build 26200.9974 on an AMD x64 CPU and Intel Arc A770 (driver 32.0.101.9175). DXC 1.9.2609.5 and rustc 1.100.0 (0ef1bc386, x86_64-pc-windows-msvc). Debug profiles, with debug info and incremental compilation disabled.

Tested

  • cargo build --workspace and cargo test --workspace --no-run succeeded outside the Arc mutex. Cargo listed 19 test binaries.
  • Each focused run used cargo test -p xcl --lib hle::d3d12x::sparse::tests::<name> -- --exact. Each reported 1 passed, 0 failed, 0 ignored and 0 skip markers.
    • readback_after_execute_does_not_block_on_stalled_queue exercised sparse UMA on the A770. It asserted return in under one second with an unsignaled compute-queue fence, availability of STATE, and queue drain after the fence was signaled. It then exercised the unstalled call.
    • ensure_mapped_with_query_holes_skips_uncommitted_pages_on_readback checked that readback across sparse holes did not fault and that a write to a newly committed page was detected. Both D3D12 filters ran under the Arc mutex with XCL_ADAPTER=A770. The holes test selects the default D3D12 device with a WARP fallback internally.
    • lazy_range_helpers_track_tile_overlap_holes_and_nonzero_pages checked overlap, hole masks and nonzero-page detection with XCL_ADAPTER=NONE_CPU_ONLY outside the mutex.
  • cargo test --workspace --no-fail-fast -- --test-threads=4 ran once under Invoke-ArcTest.ps1 with XCL_ADAPTER=A770 and RUST_TEST_NOCAPTURE=1. Exit 101. All 20 result lines (19 binaries and one doctest suite) sum to 954 passed, 25 failed and 45 ignored. All three focused tests also passed in this run.

Workspace failures and skips

24 DXIL/recompiler tests failed (20 compute PSO rejections with 0x80070057 and four output mismatches). The title e2e failed its dynamic depth-bias check (blue pixel, expected green). The log contains 25 exact SKIPPED lines, excluded from coverage.

Not tested

Matched main run, retail-title smoke, sample-data coverage, Wine or other GPUs.

AI use

T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr1732-suite.log and published.

<!-- greyfinch-sync:ivall/xcl:comment:7152580740 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1732#issuecomment-7152580740). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T04:09:24Z. --- # XCL PR #1732 verification on Intel Arc A770 Head `e4d8229650344e003513bd3775eb90502854c96b`, detached and clean. STOR-WINLAB ran Windows x64 build 26200.9974 on an AMD x64 CPU and Intel Arc A770 (driver 32.0.101.9175). DXC 1.9.2609.5 and rustc 1.100.0 (0ef1bc386, x86_64-pc-windows-msvc). Debug profiles, with debug info and incremental compilation disabled. **Tested** - `cargo build --workspace` and `cargo test --workspace --no-run` succeeded outside the Arc mutex. Cargo listed 19 test binaries. - Each focused run used `cargo test -p xcl --lib hle::d3d12x::sparse::tests::<name> -- --exact`. Each reported 1 passed, 0 failed, 0 ignored and 0 skip markers. - `readback_after_execute_does_not_block_on_stalled_queue` exercised sparse UMA on the A770. It asserted return in under one second with an unsignaled compute-queue fence, availability of `STATE`, and queue drain after the fence was signaled. It then exercised the unstalled call. - `ensure_mapped_with_query_holes_skips_uncommitted_pages_on_readback` checked that readback across sparse holes did not fault and that a write to a newly committed page was detected. Both D3D12 filters ran under the Arc mutex with `XCL_ADAPTER=A770`. The holes test selects the default D3D12 device with a WARP fallback internally. - `lazy_range_helpers_track_tile_overlap_holes_and_nonzero_pages` checked overlap, hole masks and nonzero-page detection with `XCL_ADAPTER=NONE_CPU_ONLY` outside the mutex. - `cargo test --workspace --no-fail-fast -- --test-threads=4` ran once under `Invoke-ArcTest.ps1` with `XCL_ADAPTER=A770` and `RUST_TEST_NOCAPTURE=1`. Exit 101. All 20 result lines (19 binaries and one doctest suite) sum to 954 passed, 25 failed and 45 ignored. All three focused tests also passed in this run. **Workspace failures and skips** 24 DXIL/recompiler tests failed (20 compute PSO rejections with 0x80070057 and four output mismatches). The title e2e failed its dynamic depth-bias check (blue pixel, expected green). The log contains 25 exact `SKIPPED ` lines, excluded from coverage. **Not tested** Matched main run, retail-title smoke, sample-data coverage, Wine or other GPUs. **AI use** T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against `pr1732-suite.log` and published.
gustavsi commented 2026-11-25 16:12:09 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by gustavsi on 2026-11-25T15:20:56Z.


Thanks @JJAutoCompare for verifying all three focused sparse::tests on Intel Arc A770!

Rebased onto main (06c9f55) + updated #877 (aec41e2) at 2fb4601, verified sparse:: 17/0/1, list_x:: 34/0, alloc_pool:: --test-threads=4 4/0 × 3, and a fresh 60 s smoke run (exit: 0x0, 1066 frames, 0 crashes, 0 removals).

<!-- greyfinch-sync:ivall/xcl:comment:7166700775 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1732#issuecomment-7166700775). Originally posted by [gustavsi](https://github.com/gustavsi) on 2026-11-25T15:20:56Z. --- Thanks @JJAutoCompare for verifying all three focused `sparse::tests` on Intel Arc A770! Rebased onto `main` (`06c9f55`) + updated #877 (`aec41e2`) at `2fb4601`, verified `sparse::` 17/0/1, `list_x::` 34/0, `alloc_pool:: --test-threads=4` 4/0 × 3, and a fresh 60 s smoke run (`exit: 0x0`, `1066` frames, `0` crashes, `0` removals).
razormontana commented 2026-11-25 16:12:22 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by razormontana on 2026-11-25T16:00:48Z.


Independent native Windows release test for #1732 on NVIDIA RTX 3070.

The synthetic title's D3D12 debug-layer run read 0x0 after Write32BitValueBottomOfPipeX, which expects 0x12345678 in tests/testtitle/src/gpu.rs. The assertion surfaced at crates/xcl/tests/e2e.rs:293. The parent stack passed all five isolated debug-layer trials. The PR head and its local merge each reproduced the zero read in all five trials.

Tested

  • NVIDIA GeForce RTX 3070 (8 GiB, driver 617.42), Intel Core i7-10700K, Windows 11 Pro 23H2 (22631.5335), Rust 1.100.0 x86_64-pc-windows-msvc, DXC 1.9.2602.17. Release builds ran in a standard user session with XCL_ADAPTER=3070 and XCL_NETWORK=0.
  • Parent stack aec41e2cd15e0dd81ec4c28d82ff4a26929e892a, PR head 2fb46019a11a3641453d7c2eef97e72fe894be20, and a cleanly applied local merge of that PR head into main snapshot 082944135cd2b96288470a595861fa608eee08dc (tree 52387c8562305f6f1dd1f58689f337e0a536109f). Each revision had its own Cargo target directory.
Test runs passing Parent stack PR head Local merge
test_title_runs_and_game_folder_is_untouched 3/3 5/5 3/3
readback_after_execute_does_not_block_on_stalled_queue Added by the PR 5/5 2/2
test_title_draws_with_a_root_signature_under_the_debug_layer, isolated 5/5 0/5 0/5
Entire e2e test binary, four test threads 3/3 1/3 0/3
  • The same zero read accounted for every failing E2E run in the table. The focused runs had zero GPU skips.
  • The PR-head workspace suite reported 1,268 passed, 1 failed, and 46 ignored across 23 test binaries. The sole failure was the same debug-layer E2E assertion. The pass count includes 26 runtime skip markers (21 lacking wave64, three unsupported per-lane shader forms, one reserved-cube-mips capability, and one lacking heap windows). External-sample variables were unset.

Commands used for the build, isolated tests, grouped E2E, and full suite:

cargo build --release --offline --locked --workspace
cargo test --release --offline --locked -p xcl --test e2e test_title_runs_and_game_folder_is_untouched -- --exact --test-threads=1 --show-output
cargo test --release --offline --locked -p xcl --lib hle::d3d12x::sparse::tests::readback_after_execute_does_not_block_on_stalled_queue -- --exact --test-threads=1 --show-output
cargo test --release --offline --locked -p xcl --test e2e test_title_draws_with_a_root_signature_under_the_debug_layer -- --exact --test-threads=1 --show-output
cargo test --release --offline --locked -p xcl --test e2e -- --test-threads=4 --show-output
cargo test --release --offline --locked --workspace --no-fail-fast -- --test-threads=4 --show-output

Not tested

  • Retail-title smoke tests, Wine or Proton, and other GPU adapters.

AI use

  • Codex (GPT-6.2) ran the test matrix and drafted this report.
<!-- greyfinch-sync:ivall/xcl:comment:7167514210 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1732#issuecomment-7167514210). Originally posted by [razormontana](https://github.com/razormontana) on 2026-11-25T16:00:48Z. --- Independent native Windows release test for #1732 on NVIDIA RTX 3070. The synthetic title's D3D12 debug-layer run read `0x0` after `Write32BitValueBottomOfPipeX`, which expects `0x12345678` in `tests/testtitle/src/gpu.rs`. The assertion surfaced at `crates/xcl/tests/e2e.rs:293`. The parent stack passed all five isolated debug-layer trials. The PR head and its local merge each reproduced the zero read in all five trials. **Tested** - NVIDIA GeForce RTX 3070 (8 GiB, driver 617.42), Intel Core i7-10700K, Windows 11 Pro 23H2 (22631.5335), Rust 1.100.0 `x86_64-pc-windows-msvc`, DXC 1.9.2602.17. Release builds ran in a standard user session with `XCL_ADAPTER=3070` and `XCL_NETWORK=0`. - Parent stack `aec41e2cd15e0dd81ec4c28d82ff4a26929e892a`, PR head `2fb46019a11a3641453d7c2eef97e72fe894be20`, and a cleanly applied local merge of that PR head into `main` snapshot `082944135cd2b96288470a595861fa608eee08dc` (tree `52387c8562305f6f1dd1f58689f337e0a536109f`). Each revision had its own Cargo target directory. | Test runs passing | Parent stack | PR head | Local merge | | --- | ---: | ---: | ---: | | `test_title_runs_and_game_folder_is_untouched` | 3/3 | 5/5 | 3/3 | | `readback_after_execute_does_not_block_on_stalled_queue` | Added by the PR | 5/5 | 2/2 | | `test_title_draws_with_a_root_signature_under_the_debug_layer`, isolated | 5/5 | 0/5 | 0/5 | | Entire `e2e` test binary, four test threads | 3/3 | 1/3 | 0/3 | - The same zero read accounted for every failing E2E run in the table. The focused runs had zero GPU skips. - The PR-head workspace suite reported 1,268 passed, 1 failed, and 46 ignored across 23 test binaries. The sole failure was the same debug-layer E2E assertion. The pass count includes 26 runtime skip markers (21 lacking wave64, three unsupported per-lane shader forms, one reserved-cube-mips capability, and one lacking heap windows). External-sample variables were unset. Commands used for the build, isolated tests, grouped E2E, and full suite: ```powershell cargo build --release --offline --locked --workspace cargo test --release --offline --locked -p xcl --test e2e test_title_runs_and_game_folder_is_untouched -- --exact --test-threads=1 --show-output cargo test --release --offline --locked -p xcl --lib hle::d3d12x::sparse::tests::readback_after_execute_does_not_block_on_stalled_queue -- --exact --test-threads=1 --show-output cargo test --release --offline --locked -p xcl --test e2e test_title_draws_with_a_root_signature_under_the_debug_layer -- --exact --test-threads=1 --show-output cargo test --release --offline --locked -p xcl --test e2e -- --test-threads=4 --show-output cargo test --release --offline --locked --workspace --no-fail-fast -- --test-threads=4 --show-output ``` **Not tested** - Retail-title smoke tests, Wine or Proton, and other GPU adapters. **AI use** - Codex (GPT-6.2) ran the test matrix and drafted this report.
gustavsi commented 2026-11-25 20:08:43 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by gustavsi on 2026-11-25T19:43:42Z.


Thanks @razormontana for catching and isolating the 5/5 XCL_D3D12_DEBUG=1 zero-read on Windows!

Root cause: sparse::before_execute calls queue.Wait(&s.fence, s.value) on the adopted title queue, which goes through real::q_wait_pc. Under XCL_D3D12_DEBUG=1, s.queue's upload was still in flight when readback_after_execute ran, so q_wait_pc had recorded XCL's own internal s.fence in QUEUE_WAITS, causing readback_after_execute to treat the queue as stalled and return before the readback worker finished CopyBufferRegion.

Rebased onto main (2898511, preserving #2345's s.note_queue(queue)) + updated #877 (2da0233) at 6fa3a01:

  • q_wait_pc now only records title fences (is_fence(fence)), never XCL's internal create_raw_fence waits; queue_dispatch tracks console title waits; try_gpu_wait only records unsubmitted wait-before-signal bridges.
  • Added regression test sparse::tests::internal_fence_wait_keeps_readback_synchronous verifying that an in-flight internal raw-fence queue.Wait does not mark the queue stalled and keeps readback_after_execute synchronous.
  • Verified under Proton (sparse:: 20/0/1, list_x:: 36/0, alloc_pool:: --test-threads=4 4/0 × 3) and a fresh 60 s pwsh ./scripts/smoke.ps1 run (exit: 0x0, 983 frames, 57 57 56/2 s, 0 crashes, 0 removals). Ready for a Windows debug-layer re-check!
<!-- greyfinch-sync:ivall/xcl:comment:7172687461 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1732#issuecomment-7172687461). Originally posted by [gustavsi](https://github.com/gustavsi) on 2026-11-25T19:43:42Z. --- Thanks @razormontana for catching and isolating the 5/5 `XCL_D3D12_DEBUG=1` zero-read on Windows! Root cause: `sparse::before_execute` calls `queue.Wait(&s.fence, s.value)` on the adopted title queue, which goes through `real::q_wait_pc`. Under `XCL_D3D12_DEBUG=1`, `s.queue`'s upload was still in flight when `readback_after_execute` ran, so `q_wait_pc` had recorded XCL's own internal `s.fence` in `QUEUE_WAITS`, causing `readback_after_execute` to treat the queue as stalled and return before the readback worker finished `CopyBufferRegion`. Rebased onto `main` (`2898511`, preserving #2345's `s.note_queue(queue)`) + updated #877 (`2da0233`) at `6fa3a01`: - `q_wait_pc` now only records title fences (`is_fence(fence)`), never XCL's internal `create_raw_fence` waits; `queue_dispatch` tracks console title waits; `try_gpu_wait` only records `unsubmitted` wait-before-signal bridges. - Added regression test `sparse::tests::internal_fence_wait_keeps_readback_synchronous` verifying that an in-flight internal raw-fence `queue.Wait` does not mark the queue stalled and keeps `readback_after_execute` synchronous. - Verified under Proton (`sparse::` 20/0/1, `list_x::` 36/0, `alloc_pool:: --test-threads=4` 4/0 × 3) and a fresh 60 s `pwsh ./scripts/smoke.ps1` run (`exit: 0x0`, `983` frames, `57 57 56`/2 s, `0` crashes, `0` removals). Ready for a Windows debug-layer re-check!
gustavsi commented 2026-11-25 21:05:17 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by gustavsi on 2026-11-25T20:32:40Z.


Rebased onto main (e0d93c84) + updated #867–#877 (08abaa07, picking up the UnadoptGuard/orig_fn race fix and #2118 guards) at 1be3831a, verified Proton tests (sparse:: 20/0/1, list_x:: 40/0, alloc_pool:: --test-threads=4 4/0 × 3) and a fresh 60 s pwsh ./scripts/smoke.ps1 run (exit: 0x0, 985 frames, 54 56 55/2 s, 0 crashes, 0 removals).

<!-- greyfinch-sync:ivall/xcl:comment:7173829171 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1732#issuecomment-7173829171). Originally posted by [gustavsi](https://github.com/gustavsi) on 2026-11-25T20:32:40Z. --- Rebased onto `main` (`e0d93c84`) + updated #867–#877 (`08abaa07`, picking up the `UnadoptGuard`/`orig_fn` race fix and #2118 guards) at `1be3831a`, verified Proton tests (`sparse::` 20/0/1, `list_x::` 40/0, `alloc_pool:: --test-threads=4` 4/0 × 3) and a fresh 60 s `pwsh ./scripts/smoke.ps1` run (`exit: 0x0`, `985` frames, `54 56 55`/2 s, `0` crashes, `0` removals).
bmjask commented 2026-11-25 21:16:54 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-11-25T21:16:54Z.

Review: COMMENTED


P1: a fence timeout can silently lose CPU coherence. The worker waits 5s, logs timeout and skips readback_ranges, but still marks job.done=true; readback_after_execute then returns after its synchronous wait believing immediate visibility is preserved. Timed-out jobs are never retried even if fence later completes. Retain/retry until fence completion or report/defer without claiming sync, with timeout-then-completes regression. The async visibility path also depends on #1993/#2009, whose fence-hook try-lock race remains unresolved.

<!-- greyfinch-sync:ivall/xcl:review:6065103148 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1732#pullrequestreview-6065103148). Originally posted by [bmjask](https://github.com/bmjask) on 2026-11-25T21:16:54Z. **Review:** COMMENTED --- P1: a fence timeout can silently lose CPU coherence. The worker waits 5s, logs timeout and skips readback_ranges, but still marks job.done=true; readback_after_execute then returns after its synchronous wait believing immediate visibility is preserved. Timed-out jobs are never retried even if fence later completes. Retain/retry until fence completion or report/defer without claiming sync, with timeout-then-completes regression. The async visibility path also depends on #1993/#2009, whose fence-hook try-lock race remains unresolved.
DavidM1911 commented 2026-11-26 01:05:39 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T00:29:01Z.


Re-verification on RTX 3060 Ti (Windows 11), new head merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.

Thanks!

— Devin

<!-- greyfinch-sync:ivall/xcl:comment:7178803857 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1732#issuecomment-7178803857). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T00:29:01Z. --- Re-verification on RTX 3060 Ti (Windows 11), new head merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved. Thanks! — Devin
gustavsi commented 2026-11-26 03:06:31 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by gustavsi on 2026-11-26T02:22:01Z.


Thanks @bmjask for catching the timeout coherence bug and @DavidM1911 for the Windows 11 re-verification!

Addressed the P1 timeout coherence issue and rebased onto main (08db8020) + updated #867–#877 (a553a224) at 87287c44:

  • Explicit RbStatus::{Pending, Completed, Deferred}: RbJob::done now carries RbStatus instead of bool. When wait_fence_ms times out (or sees device removal u64::MAX), the worker notifies RbStatus::Deferred rather than claiming synchronous completion, and readback_after_execute logs that synchronous visibility was deferred instead of silently returning as completed.
  • Retain & retry until fence completion: timed-out jobs (while the device is alive) are pushed onto a per-worker FIFO deferred: VecDeque<RbJob> queue. The worker polls rx.recv_timeout(20 ms) while deferred is non-empty, drains ready jobs in FIFO order once fence.GetCompletedValue() >= value (and before any later job on the same monotonic fence, plus a bounded drain on queue teardown), so CPU coherence catches up once the fence completes.
  • Regression test: added sparse::tests::timeout_then_completes_still_reads_back_cpu_memory (factors spawn_rb_worker_with with a 50 ms timeout on a real raw D3D12 fence): verifies the timed-out job reports RbStatus::Deferred, does not run readback early, automatically runs once fence.Signal(1) fires after timeout, and preserves FIFO ordering for subsequent RbStatus::Completed jobs.
  • Verified under GE-Proton11-14 (RX 9060 XT): sparse:: 21/0/1, list_x:: 40/0, real:: 62/0, alloc_pool:: --test-threads=4 4/0 (× 3), plus a fresh 60 s pwsh ./scripts/smoke.ps1 run (exit: 0x0, 646 frames shown, 0 crashes, 0 device removals; block updated in PR description).

AI use: Antigravity (Gemini 4 Neon) implemented the RbStatus + deferred retry fix and regression test, rebased onto main + updated #877, ran the Proton tests and smoke run, and drafted this comment.

<!-- greyfinch-sync:ivall/xcl:comment:7180736620 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1732#issuecomment-7180736620). Originally posted by [gustavsi](https://github.com/gustavsi) on 2026-11-26T02:22:01Z. --- Thanks @bmjask for catching the timeout coherence bug and @DavidM1911 for the Windows 11 re-verification! Addressed the P1 timeout coherence issue and rebased onto `main` (`08db8020`) + updated #867–#877 (`a553a224`) at `87287c44`: - **Explicit `RbStatus::{Pending, Completed, Deferred}`:** `RbJob::done` now carries `RbStatus` instead of `bool`. When `wait_fence_ms` times out (or sees device removal `u64::MAX`), the worker notifies `RbStatus::Deferred` rather than claiming synchronous completion, and `readback_after_execute` logs that synchronous visibility was deferred instead of silently returning as completed. - **Retain & retry until fence completion:** timed-out jobs (while the device is alive) are pushed onto a per-worker FIFO `deferred: VecDeque<RbJob>` queue. The worker polls `rx.recv_timeout(20 ms)` while `deferred` is non-empty, drains ready jobs in FIFO order once `fence.GetCompletedValue() >= value` (and before any later job on the same monotonic fence, plus a bounded drain on queue teardown), so CPU coherence catches up once the fence completes. - **Regression test:** added `sparse::tests::timeout_then_completes_still_reads_back_cpu_memory` (factors `spawn_rb_worker_with` with a 50 ms timeout on a real raw D3D12 fence): verifies the timed-out job reports `RbStatus::Deferred`, does not run readback early, automatically runs once `fence.Signal(1)` fires after timeout, and preserves FIFO ordering for subsequent `RbStatus::Completed` jobs. - **Verified under `GE-Proton11-14` (RX 9060 XT):** `sparse::` **21/0/1**, `list_x::` **40/0**, `real::` **62/0**, `alloc_pool:: --test-threads=4` **4/0** (× 3), plus a fresh 60 s `pwsh ./scripts/smoke.ps1` run (`exit: 0x0`, `646` frames shown, `0` crashes, `0` device removals; block updated in PR description). **AI use:** Antigravity (Gemini 4 Neon) implemented the `RbStatus` + `deferred` retry fix and regression test, rebased onto `main` + updated #877, ran the Proton tests and smoke run, and drafted this comment.
GreemSC commented 2026-11-26 17:50:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by GreemSC on 2026-11-26T17:50:41Z.


A data point for this PR's idea, from amd-dev under Wine (RX 7900 XT, RADV), where rb_queue (253108c2) replaced the per-queue readback but kept its problem.

What we saw on amd-dev c32c91a3 + the Wine stack (not this PR):

  • readback_after_execute waits for its readback, and when the submitting queue has an armed bridged Wait64 whose producer is not submitted yet, that readback can only finish after the title goes on. Here that was a 2 s Wait64BitValueX timeout on nearly every frame entering the world (40 in one run), the CPU waiting for a value the deferred readback would have delivered.
  • readback_now (Map) ordered behind every title queue (wait_title_queues_for_readback) waits for such a queue too: 6 real 5 s waits in a row, then the title's GPU watchdog (+0x23cf683).

What fixed it there, along this PR's lines (local tree, not a PR):

  • note_queue_wait / queue_has_unsatisfied_wait as here, recorded only under Wine;
  • when the submitting queue has such a wait: no wait for the readback; the queue signals a raw fence of its own (one per queue: a single fence signalled by several queues lets a fast queue complete a stalled one's value) and a worker reads the ranges back once it passes;
  • readback_now not ordered behind title queues under Wine;
  • after that: 0 Wait64 timeouts, 0 readback timeouts, 600 s into the playable part.

One thing to check in this PR's design and ours, found in review and not shown by a run: a readback done later snapshots the host chunk hashes when it is recorded, so a CPU write between the title's submit and the late readback could be overwritten.

Not tested: this PR itself on amd-dev; Windows.

AI use: Claude Code (Claude Opus 5.5) ran the runs and wrote this comment; a second pass (Claude Fable 5.2) reviewed the change.

<!-- greyfinch-sync:ivall/xcl:comment:7199754036 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1732#issuecomment-7199754036). Originally posted by [GreemSC](https://github.com/GreemSC) on 2026-11-26T17:50:41Z. --- A data point for this PR's idea, from `amd-dev` under Wine (RX 7900 XT, RADV), where `rb_queue` (253108c2) replaced the per-queue readback but kept its problem. **What we saw on `amd-dev` `c32c91a3` + the Wine stack** (not this PR): - `readback_after_execute` waits for its readback, and when the submitting queue has an armed bridged `Wait64` whose producer is not submitted yet, that readback can only finish after the title goes on. Here that was a 2 s `Wait64BitValueX` timeout on nearly every frame entering the world (40 in one run), the CPU waiting for a value the deferred readback would have delivered. - `readback_now` (`Map`) ordered behind every title queue (`wait_title_queues_for_readback`) waits for such a queue too: 6 real 5 s waits in a row, then the title's GPU watchdog (`+0x23cf683`). **What fixed it there, along this PR's lines** (local tree, not a PR): - `note_queue_wait` / `queue_has_unsatisfied_wait` as here, recorded only under Wine; - when the submitting queue has such a wait: no wait for the readback; the queue signals a raw fence of its own (one per queue: a single fence signalled by several queues lets a fast queue complete a stalled one's value) and a worker reads the ranges back once it passes; - `readback_now` not ordered behind title queues under Wine; - after that: 0 `Wait64` timeouts, 0 readback timeouts, 600 s into the playable part. One thing to check in this PR's design and ours, found in review and not shown by a run: a readback done later snapshots the host chunk hashes when it is recorded, so a CPU write between the title's submit and the late readback could be overwritten. Not tested: this PR itself on `amd-dev`; Windows. AI use: Claude Code (Claude Opus 5.5) ran the runs and wrote this comment; a second pass (Claude Fable 5.2) reviewed the change.
gustavsi commented 2026-11-26 19:04:55 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by gustavsi on 2026-11-26T19:04:55Z.


Thanks @GreemSC for the amd-dev data point and for catching the late-readback overwrite race!

Fixed in f14d6976:

  • Snapshot at record time (State::snapshot_ranges): when readback_after_execute records a job, it hashes each committed 64-byte-bounded segment in the target ranges under STATE.lock() (skipping uncommitted pages/holes) and records rb_seq while bumping IN_FLIGHT_RB.
  • Guarded copy-back (State::readback_ranges): when the worker later copies bytes back, it checks each segment's current CPU hash against its snapshot. If the CPU modified those bytes in the interim, the segment is skipped (preserving the CPU's newer write) and that 64-byte chunk's sent hash is left dirty so the next before_execute uploads the CPU write to VRAM.
  • Consecutive deferred readbacks: while multiple readback jobs are concurrently in flight (IN_FLIGHT_RB > 1), copied segments are recorded in a bounded State::last_rb map (cleared as soon as no other job is in flight) keyed with rb_seq > snapshot.seq, so an earlier deferred readback's copy-back does not cause a subsequent deferred readback on the same range to mistake it for a CPU write.
  • Regression test: added sparse::tests::deferred_readback_preserves_newer_cpu_writes covering both CPU-write preservation (verifying the skipped chunk keeps the CPU's bytes and stays dirty in sent, while the untouched chunk receives VRAM data and syncs sent) and two consecutive deferred readbacks on the same range without an intervening CPU write.

Verified at f14d6976 under GE-Proton11-14 (AMD Radeon RX 9060 XT, RADV Mesa 26.2.7, XCL_DXC_DIR set):

  • hle::d3d12x::sparse:: --test-threads=1: 22 passed, 0 failed, 1 ignored
  • hle::d3d12x::list_x:: --test-threads=1: 40 passed, 0 failed, 0 ignored
  • hle::d3d12x::real:: --test-threads=1: 62 passed, 0 failed, 0 ignored
  • hle::d3d12x::vram:: --test-threads=1: 19 passed, 0 failed, 1 ignored
  • gpu::uma:: --test-threads=1: 12 passed, 0 failed, 0 ignored
  • hle::d3d12x::alloc_pool:: --test-threads=4 (× 3): 4 passed, 0 failed, 0 ignored each
  • --exact gpu_sparse_vram_descriptors_buffers_and_xmem gpu_valu_float_and_int: 2 passed, 0 failed, 0 SKIPPED
  • 60 s pwsh ./scripts/smoke.ps1 release run: exit: 0x0, 1063 frames shown (PresentX 1064, 60 59 60/2 s), 0 crashes, 0 device removals (PR description updated).

Not tested: native Windows locally; NVIDIA Linux GPUs.

AI use: Antigravity (Gemini 4 Neon) implemented the snapshot guard and regression test, ran the Proton tests and 60 s smoke run, and drafted this comment.

<!-- greyfinch-sync:ivall/xcl:comment:7201174761 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1732#issuecomment-7201174761). Originally posted by [gustavsi](https://github.com/gustavsi) on 2026-11-26T19:04:55Z. --- Thanks @GreemSC for the `amd-dev` data point and for catching the late-readback overwrite race! Fixed in `f14d6976`: - **Snapshot at record time (`State::snapshot_ranges`):** when `readback_after_execute` records a job, it hashes each committed 64-byte-bounded segment in the target ranges under `STATE.lock()` (skipping uncommitted pages/holes) and records `rb_seq` while bumping `IN_FLIGHT_RB`. - **Guarded copy-back (`State::readback_ranges`):** when the worker later copies bytes back, it checks each segment's current CPU hash against its snapshot. If the CPU modified those bytes in the interim, the segment is skipped (preserving the CPU's newer write) and that 64-byte chunk's `sent` hash is left dirty so the next `before_execute` uploads the CPU write to VRAM. - **Consecutive deferred readbacks:** while multiple readback jobs are concurrently in flight (`IN_FLIGHT_RB > 1`), copied segments are recorded in a bounded `State::last_rb` map (cleared as soon as no other job is in flight) keyed with `rb_seq > snapshot.seq`, so an earlier deferred readback's copy-back does not cause a subsequent deferred readback on the same range to mistake it for a CPU write. - **Regression test:** added `sparse::tests::deferred_readback_preserves_newer_cpu_writes` covering both CPU-write preservation (verifying the skipped chunk keeps the CPU's bytes and stays dirty in `sent`, while the untouched chunk receives VRAM data and syncs `sent`) and two consecutive deferred readbacks on the same range without an intervening CPU write. **Verified at `f14d6976` under `GE-Proton11-14` (AMD Radeon RX 9060 XT, RADV Mesa 26.2.7, `XCL_DXC_DIR` set):** - `hle::d3d12x::sparse:: --test-threads=1`: **22 passed, 0 failed, 1 ignored** - `hle::d3d12x::list_x:: --test-threads=1`: **40 passed, 0 failed, 0 ignored** - `hle::d3d12x::real:: --test-threads=1`: **62 passed, 0 failed, 0 ignored** - `hle::d3d12x::vram:: --test-threads=1`: **19 passed, 0 failed, 1 ignored** - `gpu::uma:: --test-threads=1`: **12 passed, 0 failed, 0 ignored** - `hle::d3d12x::alloc_pool:: --test-threads=4` (× 3): **4 passed, 0 failed, 0 ignored** each - `--exact gpu_sparse_vram_descriptors_buffers_and_xmem gpu_valu_float_and_int`: **2 passed, 0 failed**, 0 `SKIPPED` - 60 s `pwsh ./scripts/smoke.ps1` release run: `exit: 0x0`, **1063 frames shown (`PresentX 1064`, `60 59 60`/2 s)**, `0` crashes, `0` device removals (PR description updated). **Not tested:** native Windows locally; NVIDIA Linux GPUs. **AI use:** Antigravity (Gemini 4 Neon) implemented the snapshot guard and regression test, ran the Proton tests and 60 s smoke run, and drafted this comment.
Decodere commented 2026-11-26 20:09:05 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Decodere on 2026-11-26T20:09:05Z.


Independent RTX 4060 (8 GB) / Windows 11 release verification of PR #1732 updated head f14d6976dcbe99dba07a34cbc2295b1d8690bc61 (4 commits on merge-base 08db8020d323bf478964fcc586152cce54959cfc; parent da893f3a68333efa1f7c39c0e91e896fb48f6178). Measurements and targeted GPU/unit test results only; not a full source review.

Setup

  • GPU: NVIDIA GeForce RTX 4060 (8 GB / 7956 MiB reported by D3D12), driver 32.0.16.2114 (NVIDIA 621.14, WDDM 3.2)
  • CPU / RAM / OS: Intel Core i5-11400F (6 cores / 12 threads), 32 GB RAM (31.9 GiB usable), Windows 11 Home 26200
  • Toolchain / caches: rustc 1.100.0 (0ef1bc386 2026-11-09), DXC 1.9.2609.5, release builds, warm DXIL/pipeline caches, quiet machine (zero concurrent builds/tests during timed runs)
  • Workload: Retail workload title: 29640639 via scripts/smoke.ps1 -Seconds 60 (XCL_NETWORK=0, default flags, no input)

Targeted RTX 4060 release unit & GPU tests (f14d6976)

  • cargo test --release -p xcl --lib readback_after_execute_does_not_block_on_stalled_queue -- --nocapture: 1 passed, 0 failed, 0 ignored (0.36 s, 0 SKIPPED).
  • cargo test --release -p xcl --lib internal_fence_wait_keeps_readback_synchronous -- --nocapture: 1 passed, 0 failed, 0 ignored (0.39 s, 0 SKIPPED).
  • cargo test --release -p xcl --lib timeout_then_completes_still_reads_back_cpu_memory -- --nocapture: 1 passed, 0 failed, 0 ignored (0.40 s, 0 SKIPPED).
  • cargo test --release -p xcl --lib deferred_readback_preserves_newer_cpu_writes -- --nocapture: 1 passed, 0 failed, 0 ignored (0.36 s, 0 SKIPPED).
  • cargo test --release -p xcl --lib hle::d3d12x::sparse:: (3 consecutive parallel passes): 22 passed, 0 failed, 1 ignored (early_commit_timing ignored) on all 3 passes (0.61 s / 0.62 s / 0.58 s, 0 SKIPPED).
  • cargo test --release -p xcl --lib hle::d3d12x::list_x::: 40 passed, 0 failed, 0 ignored (0.71 s, 0 SKIPPED).
  • cargo test --release -p xcl --lib hle::d3d12x::real::: 62 passed, 0 failed, 0 ignored (0.37 s, 0 SKIPPED).

Paired 60 s RTX 4060 smoke (merge-base 08db8020 vs f14d6976)

Both runs completed cleanly at steady 60/2 s pacing with 0 device removals and 0 crashes (f14d6976 xcl.log: 6,176 / 6,116 MB peak/end local VRAM, 4,650 MB end non-local VRAM, 19,567 translated draws / 1,024 dispatches with 0 skipped, sparse windows: 4096 submits, 1388 MB of CPU writes uploaded, 240 ms spent, lock wait 1 ms, 0 watchdog timeouts).

Merge-base (08db8020):

xcl-smoke v1
commit: 08db8020d323bf478964fcc586152cce54959cfc
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1588 (PresentX 1588)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14000 MB

PR #1732 head (f14d6976):

xcl-smoke v1
commit: f14d6976dcbe99dba07a34cbc2295b1d8690bc61
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1608 (PresentX 1609)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 13983 MB

Limits of coverage

  • Full workspace test suite was not run on f14d6976 (only the 4 new readback tests individually, 3 parallel passes of sparse::, list_x::, real::, release build, and paired 60 s smokes).
  • Tested on native Windows 11 / NVIDIA RTX 4060 only; the Wine / vkd3d-proton / amdgpu commits earlier in this 4-commit branch (e57cb659, 1a7f146b, da893f3a) were not exercised under Wine/Linux on this host, and live async compute wait-before-signal stalls were covered by the 4 targeted release tests above rather than live stalls in the 60 s smoke.

AI use

Ran the targeted release GPU/unit tests, release build, and paired quiet 60 s smoke runs with assistance from Google Antigravity (Gemini 4 Neon); all test counts, timings, memory/sparse metrics, and smoke blocks were extracted directly from cargo test, xcl.log, and scripts/smoke.ps1 outputs.

<!-- greyfinch-sync:ivall/xcl:comment:7202355607 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1732#issuecomment-7202355607). Originally posted by [Decodere](https://github.com/Decodere) on 2026-11-26T20:09:05Z. --- **Independent RTX 4060 (8 GB) / Windows 11 release verification of PR #1732 updated head `f14d6976dcbe99dba07a34cbc2295b1d8690bc61`** (4 commits on merge-base `08db8020d323bf478964fcc586152cce54959cfc`; parent `da893f3a68333efa1f7c39c0e91e896fb48f6178`). Measurements and targeted GPU/unit test results only; not a full source review. ### Setup - **GPU:** NVIDIA GeForce RTX 4060 (8 GB / `7956 MiB` reported by D3D12), driver `32.0.16.2114` (NVIDIA `621.14`, WDDM 3.2) - **CPU / RAM / OS:** Intel Core i5-11400F (6 cores / 12 threads), 32 GB RAM (`31.9 GiB` usable), Windows 11 Home `26200` - **Toolchain / caches:** `rustc 1.100.0 (0ef1bc386 2026-11-09)`, DXC `1.9.2609.5`, release builds, warm DXIL/pipeline caches, quiet machine (zero concurrent builds/tests during timed runs) - **Workload:** Retail workload `title: 29640639` via `scripts/smoke.ps1 -Seconds 60` (`XCL_NETWORK=0`, default flags, no input) ### Targeted RTX 4060 release unit & GPU tests (`f14d6976`) - `cargo test --release -p xcl --lib readback_after_execute_does_not_block_on_stalled_queue -- --nocapture`: **1 passed, 0 failed, 0 ignored** (`0.36 s`, `0` `SKIPPED`). - `cargo test --release -p xcl --lib internal_fence_wait_keeps_readback_synchronous -- --nocapture`: **1 passed, 0 failed, 0 ignored** (`0.39 s`, `0` `SKIPPED`). - `cargo test --release -p xcl --lib timeout_then_completes_still_reads_back_cpu_memory -- --nocapture`: **1 passed, 0 failed, 0 ignored** (`0.40 s`, `0` `SKIPPED`). - `cargo test --release -p xcl --lib deferred_readback_preserves_newer_cpu_writes -- --nocapture`: **1 passed, 0 failed, 0 ignored** (`0.36 s`, `0` `SKIPPED`). - `cargo test --release -p xcl --lib hle::d3d12x::sparse::` (3 consecutive parallel passes): **22 passed, 0 failed, 1 ignored** (`early_commit_timing` ignored) on all 3 passes (`0.61 s` / `0.62 s` / `0.58 s`, `0` `SKIPPED`). - `cargo test --release -p xcl --lib hle::d3d12x::list_x::`: **40 passed, 0 failed, 0 ignored** (`0.71 s`, `0` `SKIPPED`). - `cargo test --release -p xcl --lib hle::d3d12x::real::`: **62 passed, 0 failed, 0 ignored** (`0.37 s`, `0` `SKIPPED`). ### Paired 60 s RTX 4060 smoke (merge-base `08db8020` vs `f14d6976`) Both runs completed cleanly at steady 60/2 s pacing with `0` device removals and `0` crashes (`f14d6976` `xcl.log`: `6,176` / `6,116 MB` peak/end local VRAM, `4,650 MB` end non-local VRAM, `19,567` translated draws / `1,024` dispatches with `0` skipped, `sparse windows: 4096 submits, 1388 MB of CPU writes uploaded, 240 ms spent, lock wait 1 ms`, `0` watchdog timeouts). Merge-base (`08db8020`): ``` xcl-smoke v1 commit: 08db8020d323bf478964fcc586152cce54959cfc gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1588 (PresentX 1588) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14000 MB ``` PR #1732 head (`f14d6976`): ``` xcl-smoke v1 commit: f14d6976dcbe99dba07a34cbc2295b1d8690bc61 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1608 (PresentX 1609) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 13983 MB ``` ### Limits of coverage - Full workspace test suite was not run on `f14d6976` (only the 4 new readback tests individually, 3 parallel passes of `sparse::`, `list_x::`, `real::`, release build, and paired 60 s smokes). - Tested on native Windows 11 / NVIDIA RTX 4060 only; the Wine / vkd3d-proton / `amdgpu` commits earlier in this 4-commit branch (`e57cb659`, `1a7f146b`, `da893f3a`) were not exercised under Wine/Linux on this host, and live async compute wait-before-signal stalls were covered by the 4 targeted release tests above rather than live stalls in the 60 s smoke. ### AI use Ran the targeted release GPU/unit tests, release build, and paired quiet 60 s smoke runs with assistance from Google Antigravity (Gemini 4 Neon); all test counts, timings, memory/sparse metrics, and smoke blocks were extracted directly from `cargo test`, `xcl.log`, and `scripts/smoke.ps1` outputs.
GreemSC commented 2026-11-26 20:13:47 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by GreemSC on 2026-11-26T20:13:47Z.


@gustavsi thanks for the fix and the test. A note so you don't wait on me for it: our current Linux tree is on amd-dev, which has its own per-queue readback (rb_queue), so it doesn't carry #1732 any more; the amd-dev tree, with the deferred readbacks of a queue waiting on an unsubmitted producer, is on #846. I'll rerun f14d6976 on the main tree when that one runs again (it is stuck in #2555's shader preparation under Wine for now).

AI use: Claude Code (Claude Opus 5.5) wrote this reply.

<!-- greyfinch-sync:ivall/xcl:comment:7202437477 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1732#issuecomment-7202437477). Originally posted by [GreemSC](https://github.com/GreemSC) on 2026-11-26T20:13:47Z. --- @gustavsi thanks for the fix and the test. A note so you don't wait on me for it: our current Linux tree is on `amd-dev`, which has its own per-queue readback (`rb_queue`), so it doesn't carry #1732 any more; the `amd-dev` tree, with the deferred readbacks of a queue waiting on an unsubmitted producer, is on #846. I'll rerun `f14d6976` on the `main` tree when that one runs again (it is stuck in #2555's shader preparation under Wine for now). AI use: Claude Code (Claude Opus 5.5) wrote this reply.
gustavsi commented 2026-11-29 03:53:11 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by gustavsi on 2026-11-29T03:53:11Z.


Closing as I'm stepping away from the project, but anyone is welcome to rebase and reuse these commits.

<!-- greyfinch-sync:ivall/xcl:comment:7250318841 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1732#issuecomment-7250318841). Originally posted by [gustavsi](https://github.com/gustavsi) on 2026-11-29T03:53:11Z. --- Closing as I'm stepping away from the project, but anyone is welcome to rebase and reuse these commits.

Pull request closed

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
xcl-dev/xcl!1722
No description provided.