D3D12.X: count skipped draws and dispatches by cause #2615

Open
grahamster2 wants to merge 2 commits from upstream-pr/2625 into main
grahamster2 commented 2026-11-26 02:58:06 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by grahamster2 on 2026-11-26T02:58:06Z.


World runs of the retail title on one machine logged 5,347 and 6,803 skipped dispatches (aggregate counts from two runs), but nothing says which path skipped them, which blocks diagnosing a world-load stall. This keeps the two totals (DRAWS_SKIPPED, DISPATCHES_SKIPPED) and adds a counter per cause. The non-zero ones are appended to the existing periodic "console code so far" log line, e.g. ...; skipped by cause: building: no wrapper 4, released before submit 1, build failed 56, dropped at submit 1; coherent ... (the format, as printed by a unit test run). That line is printed when a total reaches a power of two (64, 128, ...), and the counters are plain relaxed atomics read without a lock, so a printed line is a snapshot that may be a count or two behind. No behaviour change except the replayed ExecuteIndirect case described below: every other skip site still skips exactly as before.

What is in it

  • crates/xcl/src/hle/d3d12x/bind.rs: a Cause enum with a counter each; skip(total, cause) replaces count(..._SKIPPED) at every skip site, including the ExecuteIndirect ones counted as DRAWS_SKIPPED (so the causes add up to the two totals); dispatch_dropped counts "dropped at submit". Causes: pipeline still building at record time and the call was not put off, split by why (bundle, predicated, no segments left, no wrapper, segment could not be made; plain "building" when nothing refused it, e.g. a late pipeline), put off but the stand-in was released before the submit, build failed, no translation (nothing builds the pipeline), dropped at submit (no allocator / Reset failed), two-pass pipeline, translated draw or dispatch whose arguments could not be bound. When a call could not be put off, that reason is kept through the wait for the build and is what gets reported, whatever the build did in the meantime (with XCL_PSO_WAIT_MS unset the call blocks until the build is done, so the state read after the wait says nothing about the refusal).
  • crates/xcl/src/hle/d3d12x/list_x.rs: defer returns Result<(), Cause> (the reason is worked out from the same checks split makes, after it said no); record_deferred marks the thread as recording at the submit (restored by a drop guard), which is how "released before submit" is told apart from "no translation".
  • crates/xcl/src/hle/d3d12x/bind.rs, execute_indirect: the one line that is not a counter. A put-off ExecuteIndirect dispatch is replayed at the submit; if the title released its stand-in by then, the release has forgotten the console-compute marker, the check for "this was a console dispatch" failed and the call fell through to the PC ExecuteIndirect. The replay now counts as one (AT_SUBMIT, which is only set for calls that were put off because they were console compute), so it is skipped and counted as released before submit, like the direct Dispatch. That is a behaviour change for that one case.
  • crates/xcl/src/hle/d3d12x/pso_async.rs: build_state(pso) (untracked, building, failed, built).
  • Tests: skipped_calls_are_counted_by_cause (failed build, still building with no wrapper for a Dispatch and an ExecuteIndirect dispatch, a refusal that wins over the failed build the wait ended with (checked on the state after the build, with no timing in it), no translation, released at the submit for a Dispatch and for an ExecuteIndirect dispatch whose stand-in was released before the replay, dropped, the guard after a panic), a_dispatch_that_cannot_be_put_off_is_counted_by_why (a bundle list and a predicated list through defer, on a real or WARP device), the_log_line_names_only_the_causes_that_happened, and cause assertions in the two-pass test and the deferred-dispatch test. They check each skip moves exactly one cause and that the causes add up to the totals, with per-thread mirrors of the counters (test builds only) so tests running in parallel do not see each other's skips.

Tested

  • AMD Ryzen 5 7600X, NVIDIA GeForce RTX 3080 (driver 32.0.16.1088), Windows 11 10.0.26200, rustc 1.94.0, debug (tests) and release (smoke)
  • cargo test -p xcl --lib on the head 428750f (rebased on main b49be183): 1312 passed, 0 failed, 27 ignored in two of three runs; 24 SKIPPED lines (wave64 and f16 GPU tests that this adapter cannot run). The third run failed two tests in hle::d3d12x::sparse::tests (a_tile_decommitted_and_committed_again_keeps_its_video_memory, flush_parked_does_not_free_or_reuse_tiles_while_unmap_is_in_flight); sparse:: alone passed 17 of 17, and main passed three of three full runs. I did not look into it; no file of this PR is in sparse.
  • skipped_calls_are_counted_by_cause, the cause filter, three runs in a row: pass. With the one-line fix in execute_indirect removed, the new released-ExecuteIndirect case fails.
  • a_dispatch_with_a_pipeline_still_building_waits_at_the_submit (an existing timing test) failed now and then when run together with other tests, on main too (4 of 20 runs of cargo test -p xcl --lib -- d3d12x::bind d3d12x::list_x on main 08db8020); it did not fail in the runs above.

Regression run

main:

xcl-smoke v1
commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7
gpu: NVIDIA GeForce RTX 3080
title: 5d6132ca
seconds: 60
exit: 0x0
frames shown: 1642 (PresentX 1642)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14891 MB

PR:

xcl-smoke v1
commit: 428750f718f1ab9f9ca30a1be59b63eef268035d
gpu: NVIDIA GeForce RTX 3080
title: 5d6132ca
seconds: 60
exit: 0x0
frames shown: 1647 (PresentX 1647)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14695 MB

Frames 1647 vs 1642 on main, peak commit 14695 MB vs 14891 MB, one 60 s run each, default settings.

Not tested

  • cargo test --workspace (only -p xcl --lib was run); the e2e tests.
  • AMD GPUs, and the wave64 paths.
  • The new log line in a world run: I did not check whether the 60 s smoke run printed it.
  • A real title that releases a stand-in between recording and submit an ExecuteIndirect dispatch: the new case is covered by a fake list, not by a retail run.
  • The "no segments left" cause has no test (it needs a wrapper with its segments used up).

AI use

  • Claude Code, Claude Sonnet 5.5: wrote the code, the tests and this description; I ran the tests and smoke runs above.
    AI-assisted (Claude Code).
<!-- greyfinch-sync:ivall/xcl:issue:5503169024 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2625). Originally posted by [grahamster2](https://github.com/grahamster2) on 2026-11-26T02:58:06Z. --- World runs of the retail title on one machine logged 5,347 and 6,803 skipped dispatches (aggregate counts from two runs), but nothing says which path skipped them, which blocks diagnosing a world-load stall. This keeps the two totals (`DRAWS_SKIPPED`, `DISPATCHES_SKIPPED`) and adds a counter per cause. The non-zero ones are appended to the existing periodic "console code so far" log line, e.g. `...; skipped by cause: building: no wrapper 4, released before submit 1, build failed 56, dropped at submit 1; coherent ...` (the format, as printed by a unit test run). That line is printed when a total reaches a power of two (64, 128, ...), and the counters are plain relaxed atomics read without a lock, so a printed line is a snapshot that may be a count or two behind. No behaviour change except the replayed ExecuteIndirect case described below: every other skip site still skips exactly as before. **What is in it** - `crates/xcl/src/hle/d3d12x/bind.rs`: a `Cause` enum with a counter each; `skip(total, cause)` replaces `count(..._SKIPPED)` at every skip site, including the ExecuteIndirect ones counted as `DRAWS_SKIPPED` (so the causes add up to the two totals); `dispatch_dropped` counts "dropped at submit". Causes: pipeline still building at record time and the call was not put off, split by why (bundle, predicated, no segments left, no wrapper, segment could not be made; plain "building" when nothing refused it, e.g. a late pipeline), put off but the stand-in was released before the submit, build failed, no translation (nothing builds the pipeline), dropped at submit (no allocator / Reset failed), two-pass pipeline, translated draw or dispatch whose arguments could not be bound. When a call could not be put off, that reason is kept through the wait for the build and is what gets reported, whatever the build did in the meantime (with `XCL_PSO_WAIT_MS` unset the call blocks until the build is done, so the state read after the wait says nothing about the refusal). - `crates/xcl/src/hle/d3d12x/list_x.rs`: `defer` returns `Result<(), Cause>` (the reason is worked out from the same checks `split` makes, after it said no); `record_deferred` marks the thread as recording at the submit (restored by a drop guard), which is how "released before submit" is told apart from "no translation". - `crates/xcl/src/hle/d3d12x/bind.rs`, `execute_indirect`: the one line that is not a counter. A put-off ExecuteIndirect dispatch is replayed at the submit; if the title released its stand-in by then, the release has forgotten the console-compute marker, the check for "this was a console dispatch" failed and the call fell through to the PC ExecuteIndirect. The replay now counts as one (`AT_SUBMIT`, which is only set for calls that were put off because they were console compute), so it is skipped and counted as released before submit, like the direct Dispatch. That is a behaviour change for that one case. - `crates/xcl/src/hle/d3d12x/pso_async.rs`: `build_state(pso)` (untracked, building, failed, built). - Tests: `skipped_calls_are_counted_by_cause` (failed build, still building with no wrapper for a Dispatch and an ExecuteIndirect dispatch, a refusal that wins over the failed build the wait ended with (checked on the state after the build, with no timing in it), no translation, released at the submit for a Dispatch and for an ExecuteIndirect dispatch whose stand-in was released before the replay, dropped, the guard after a panic), `a_dispatch_that_cannot_be_put_off_is_counted_by_why` (a bundle list and a predicated list through `defer`, on a real or WARP device), `the_log_line_names_only_the_causes_that_happened`, and cause assertions in the two-pass test and the deferred-dispatch test. They check each skip moves exactly one cause and that the causes add up to the totals, with per-thread mirrors of the counters (test builds only) so tests running in parallel do not see each other's skips. **Tested** - AMD Ryzen 5 7600X, NVIDIA GeForce RTX 3080 (driver 32.0.16.1088), Windows 11 10.0.26200, rustc 1.94.0, debug (tests) and release (smoke) - `cargo test -p xcl --lib` on the head `428750f` (rebased on `main` b49be183): 1312 passed, 0 failed, 27 ignored in two of three runs; 24 SKIPPED lines (wave64 and f16 GPU tests that this adapter cannot run). The third run failed two tests in `hle::d3d12x::sparse::tests` (`a_tile_decommitted_and_committed_again_keeps_its_video_memory`, `flush_parked_does_not_free_or_reuse_tiles_while_unmap_is_in_flight`); `sparse::` alone passed 17 of 17, and `main` passed three of three full runs. I did not look into it; no file of this PR is in `sparse`. - `skipped_calls_are_counted_by_cause`, the `cause` filter, three runs in a row: pass. With the one-line fix in `execute_indirect` removed, the new released-ExecuteIndirect case fails. - `a_dispatch_with_a_pipeline_still_building_waits_at_the_submit` (an existing timing test) failed now and then when run together with other tests, on `main` too (4 of 20 runs of `cargo test -p xcl --lib -- d3d12x::bind d3d12x::list_x` on `main` 08db8020); it did not fail in the runs above. **Regression run** main: ``` xcl-smoke v1 commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 gpu: NVIDIA GeForce RTX 3080 title: 5d6132ca seconds: 60 exit: 0x0 frames shown: 1642 (PresentX 1642) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14891 MB ``` PR: ``` xcl-smoke v1 commit: 428750f718f1ab9f9ca30a1be59b63eef268035d gpu: NVIDIA GeForce RTX 3080 title: 5d6132ca seconds: 60 exit: 0x0 frames shown: 1647 (PresentX 1647) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14695 MB ``` Frames 1647 vs 1642 on main, peak commit 14695 MB vs 14891 MB, one 60 s run each, default settings. **Not tested** - `cargo test --workspace` (only `-p xcl --lib` was run); the e2e tests. - AMD GPUs, and the wave64 paths. - The new log line in a world run: I did not check whether the 60 s smoke run printed it. - A real title that releases a stand-in between recording and submit an ExecuteIndirect dispatch: the new case is covered by a fake list, not by a retail run. - The "no segments left" cause has no test (it needs a wrapper with its segments used up). **AI use** - Claude Code, Claude Sonnet 5.5: wrote the code, the tests and this description; I ran the tests and smoke runs above. _AI-assisted (Claude Code)._
DarkPanda69 commented 2026-11-26 03:06:39 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DarkPanda69 on 2026-11-26T03:06:08Z.


Update for head 428750f: rerun on main b49be18, same cards and --nocapture. The cause filter gives 2 passed on both the RX 9070 XT and the RTX 3060. d3d12x:: gives 257 passed, 0 failed, 2 ignored, no SKIPPED, on both.

AMD run (listed as untested) on an RX 9070 XT, plus an RTX 3060: the new tests pass, and the d3d12x:: tests pass on both cards.

Head f8c774a applied on main b49be18, debug, Windows 11 Pro 26200, card chosen with XCL_ADAPTER, run with --nocapture:

  • cause filter (skipped_calls_are_counted_by_cause, the_log_line_names_only_the_causes_that_happened): 2 passed on the RX 9070 XT (RDNA4, driver 32.0.32029.2010). The panicked at bind.rs:1876: a panic in a put-off call line in the output is the test's own catch_unwind case.
  • cargo test -p xcl --lib -- d3d12x::: 257 passed, 0 failed, 2 ignored, no SKIPPED, on both the RX 9070 XT and the RTX 3060 (driver 32.0.16.1088). a_dispatch_that_cannot_be_put_off_is_counted_by_why is among them.

Not tested: the wave64 gpu:: paths (this change is in bind.rs / list_x.rs / pso_async.rs), the e2e tests, the new log line in a world run, Intel.
AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7181396394 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2625#issuecomment-7181396394). Originally posted by [DarkPanda69](https://github.com/DarkPanda69) on 2026-11-26T03:06:08Z. --- **Update for head `428750f`:** rerun on `main` `b49be18`, same cards and `--nocapture`. The `cause` filter gives 2 passed on both the RX 9070 XT and the RTX 3060. `d3d12x::` gives 257 passed, 0 failed, 2 ignored, no SKIPPED, on both. AMD run (listed as untested) on an RX 9070 XT, plus an RTX 3060: the new tests pass, and the `d3d12x::` tests pass on both cards. Head `f8c774a` applied on `main` `b49be18`, debug, Windows 11 Pro 26200, card chosen with `XCL_ADAPTER`, run with `--nocapture`: - `cause` filter (`skipped_calls_are_counted_by_cause`, `the_log_line_names_only_the_causes_that_happened`): 2 passed on the **RX 9070 XT** (RDNA4, driver 32.0.32029.2010). The `panicked at bind.rs:1876: a panic in a put-off call` line in the output is the test's own `catch_unwind` case. - `cargo test -p xcl --lib -- d3d12x::`: 257 passed, 0 failed, 2 ignored, no SKIPPED, on both the RX 9070 XT and the **RTX 3060** (driver 32.0.16.1088). `a_dispatch_that_cannot_be_put_off_is_counted_by_why` is among them. Not tested: the wave64 `gpu::` paths (this change is in `bind.rs` / `list_x.rs` / `pso_async.rs`), the e2e tests, the new log line in a world run, Intel. AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.
luckyteagirl commented 2026-11-26 05:00:57 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-26T05:00:57Z.

Review: COMMENTED


In skipped_calls_are_counted_by_cause, the waited worker sleeps for 50 ms and then fails, but the test relies on dispatch reaching is_pending before that timer expires. If this test thread is descheduled for more than 50 ms under the parallel suite, the worker can finish first; refused stays None and the skip is counted as BuildFailed instead of the asserted BuildingNoWrapper.

Could the worker wait on an explicit release signal until after the refusal path is entered, or could the precedence be asserted directly with unbuilt_cause(waited, Some(Cause::BuildingNoWrapper)) after a completed failure? This is a source review at head f8c774a3; I did not run the test.

<!-- greyfinch-sync:ivall/xcl:review:6068785853 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2625#pullrequestreview-6068785853). Originally posted by [luckyteagirl](https://github.com/luckyteagirl) on 2026-11-26T05:00:57Z. **Review:** COMMENTED --- In `skipped_calls_are_counted_by_cause`, the `waited` worker sleeps for 50 ms and then fails, but the test relies on `dispatch` reaching `is_pending` before that timer expires. If this test thread is descheduled for more than 50 ms under the parallel suite, the worker can finish first; `refused` stays `None` and the skip is counted as `BuildFailed` instead of the asserted `BuildingNoWrapper`. Could the worker wait on an explicit release signal until after the refusal path is entered, or could the precedence be asserted directly with `unbuilt_cause(waited, Some(Cause::BuildingNoWrapper))` after a completed failure? This is a source review at head `f8c774a3`; I did not run the test.
luckyteagirl commented 2026-11-26 05:50:59 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-26T05:50:59Z.

Review: COMMENTED


Could deferred compute ExecuteIndirect retain its console identity when it is put off? A final stand-in release removes both its async record and CONSOLE_COMPUTE marker. On replay, resolve_wait returns the original value, both marker checks fail, and this falls into PC ExecuteIndirect without the new released before submit count. Direct deferred Dispatch reaches the classifier in the same situation. A regression that releases a deferred indirect stand-in before replay would cover this; the existing Released fixture keeps the console marker and invokes direct dispatch. Exact-head source review at f8c774a3b81cef5a21899af803760ecf7e021927; no runtime release/submit test was run. AI-assisted review with Codex.

<!-- greyfinch-sync:ivall/xcl:review:6069166047 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2625#pullrequestreview-6069166047). Originally posted by [luckyteagirl](https://github.com/luckyteagirl) on 2026-11-26T05:50:59Z. **Review:** COMMENTED --- Could deferred compute `ExecuteIndirect` retain its console identity when it is put off? A final stand-in release removes both its async record and `CONSOLE_COMPUTE` marker. On replay, `resolve_wait` returns the original value, both marker checks fail, and this falls into PC `ExecuteIndirect` without the new `released before submit` count. Direct deferred `Dispatch` reaches the classifier in the same situation. A regression that releases a deferred indirect stand-in before replay would cover this; the existing `Released` fixture keeps the console marker and invokes direct dispatch. Exact-head source review at `f8c774a3b81cef5a21899af803760ecf7e021927`; no runtime release/submit test was run. AI-assisted review with Codex.
grahamster2 commented 2026-11-26 07:03:36 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by grahamster2 on 2026-11-26T06:34:40Z.


Both points are fixed in 428750f.

Timing test: the 50 ms sleep is gone. The refusal-wins-over-build-failure case no longer races a build against the call. It now waits for the build to fail, checks build_state is Failed and that unbuilt_cause(waited, None) is BuildFailed, then checks that unbuilt_cause(waited, Some(BuildingNoWrapper)) is BuildingNoWrapper and counts as exactly one skip (bind.rs:1867). That is your second suggestion. I did not keep a variant that calls dispatch while a worker is held, because the call blocks in resolve_wait until the build ends, and any signal that opens the gate only after the refusal was decided would need a hook into the wait that does not exist. The one thing this no longer exercises is the dispatch call site passing refused through, which the "still building, not put off" case above it still covers for the not-waited path.

I ran the cause filter three times in a row and the full lib suite three times. One full run failed two hle::d3d12x::sparse tests that this PR does not touch; they pass alone and in the other runs (details in the description).

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

<!-- greyfinch-sync:ivall/xcl:comment:7184567804 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2625#issuecomment-7184567804). Originally posted by [grahamster2](https://github.com/grahamster2) on 2026-11-26T06:34:40Z. --- Both points are fixed in 428750f. Timing test: the 50 ms sleep is gone. The refusal-wins-over-build-failure case no longer races a build against the call. It now waits for the build to fail, checks `build_state` is `Failed` and that `unbuilt_cause(waited, None)` is `BuildFailed`, then checks that `unbuilt_cause(waited, Some(BuildingNoWrapper))` is `BuildingNoWrapper` and counts as exactly one skip (bind.rs:1867). That is your second suggestion. I did not keep a variant that calls `dispatch` while a worker is held, because the call blocks in `resolve_wait` until the build ends, and any signal that opens the gate only after the refusal was decided would need a hook into the wait that does not exist. The one thing this no longer exercises is the `dispatch` call site passing `refused` through, which the "still building, not put off" case above it still covers for the not-waited path. I ran the `cause` filter three times in a row and the full lib suite three times. One full run failed two `hle::d3d12x::sparse` tests that this PR does not touch; they pass alone and in the other runs (details in the description). AI use: Claude Code (Claude Sonnet 5.5) wrote this reply.
grahamster2 commented 2026-11-26 07:03:36 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by grahamster2 on 2026-11-26T06:34:41Z.


Good catch, it did not keep its identity, and it is fixed in 428750f.

What happened: a put-off ExecuteIndirect is recorded only when signature_dispatches(sig) && is_pending(raw_pso) && is_console_compute(raw_pso) (bind.rs:380). At the submit it is replayed through at_submit (list_x.rs:2726). If the title released the stand-in in between, standin_released (real.rs:1711) calls forget_pso, which removes the CONSOLE_COMPUTE entry, and pso_async::released drops the pending entry. On the replay resolve_wait returns the address unchanged, is_console_compute is false for both raw_pso and pso, so the check at bind.rs:430 did not match and the call went on to the PC ExecuteIndirect, with no skip and no released before submit count. A deferred direct Dispatch was fine: its branch (!is_translated_compute) does not look at the marker and reaches unbuilt_cause, which reports Released through the AT_SUBMIT flag (bind.rs:153). The old Released fixture kept the marker, so it only covered that Dispatch path.

Fix: the check at bind.rs:430 now also matches when AT_SUBMIT is set, since only a console compute call is ever put off, so the marker is not needed to know what the replayed call was. It is skipped and counted under Released. This is a behaviour change for that one case: before, the call reached the PC ExecuteIndirect; now it is skipped, like the Dispatch.

Test: skipped_calls_are_counted_by_cause has a new case (bind.rs:1883): a console compute pipeline registered then forgotten (marker gone, no stand-in), an ExecuteIndirect with a dispatch signature replayed through at_submit. It expects one skip under Released and no PC ExecuteIndirect call on the fake list. With the one-line fix removed, the test fails. It runs on a fake list, not a real release and submit, so the retail path is not run.

The smoke pair is refreshed on the new head (1647 frames vs 1642 on main, no device removals, no crashes), and the description is updated.

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

<!-- greyfinch-sync:ivall/xcl:comment:7184568174 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2625#issuecomment-7184568174). Originally posted by [grahamster2](https://github.com/grahamster2) on 2026-11-26T06:34:41Z. --- Good catch, it did not keep its identity, and it is fixed in 428750f. What happened: a put-off ExecuteIndirect is recorded only when `signature_dispatches(sig) && is_pending(raw_pso) && is_console_compute(raw_pso)` (bind.rs:380). At the submit it is replayed through `at_submit` (list_x.rs:2726). If the title released the stand-in in between, `standin_released` (real.rs:1711) calls `forget_pso`, which removes the `CONSOLE_COMPUTE` entry, and `pso_async::released` drops the pending entry. On the replay `resolve_wait` returns the address unchanged, `is_console_compute` is false for both `raw_pso` and `pso`, so the check at bind.rs:430 did not match and the call went on to the PC `ExecuteIndirect`, with no skip and no `released before submit` count. A deferred direct `Dispatch` was fine: its branch (`!is_translated_compute`) does not look at the marker and reaches `unbuilt_cause`, which reports `Released` through the `AT_SUBMIT` flag (bind.rs:153). The old `Released` fixture kept the marker, so it only covered that Dispatch path. Fix: the check at bind.rs:430 now also matches when `AT_SUBMIT` is set, since only a console compute call is ever put off, so the marker is not needed to know what the replayed call was. It is skipped and counted under `Released`. This is a behaviour change for that one case: before, the call reached the PC `ExecuteIndirect`; now it is skipped, like the Dispatch. Test: `skipped_calls_are_counted_by_cause` has a new case (bind.rs:1883): a console compute pipeline registered then forgotten (marker gone, no stand-in), an ExecuteIndirect with a dispatch signature replayed through `at_submit`. It expects one skip under `Released` and no PC `ExecuteIndirect` call on the fake list. With the one-line fix removed, the test fails. It runs on a fake list, not a real release and submit, so the retail path is not run. The smoke pair is refreshed on the new head (1647 frames vs 1642 on `main`, no device removals, no crashes), and the description is updated. AI use: Claude Code (Claude Sonnet 5.5) wrote this reply.
DavidM1911 commented 2026-11-26 09:07:42 +00:00 (Migrated from github.com)

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


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:7186657921 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2625#issuecomment-7186657921). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T08:29:30Z. --- 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
Foniass commented 2026-12-01 06:08:21 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T06:08:21Z.


Review (head 428750f7, diff read, not a merge-check; it conflicts with main, so not built or run):

  • Main has moved too far for a rebase. bind.rs went from about 1.8k to 10k lines with about 25 skip sites, and put-off calls now go through defer_retained / PipelineResolution / execute_indirect_retained. Main already counts what happens to put-off calls (pso_async::PutOff: deferred / refused / recorded / skipped / dropped, from #3203), and frame dumps carry a per-call capture::Outcome. Record-time skips aren't broken down by cause on main yet.
  • The AT_SUBMIT.get() || change in execute_indirect (~430) is a behaviour fix inside a counters PR, and on main it no longer applies: the replay uses the kept resolution (is_compute(), failing closed on Unavailable), not the CONSOLE_COMPUTE marker.
  • refusal() (list_x.rs ~2666) works out why the split failed by repeating its checks afterwards; main's defer_with refuses for more reasons (poisoned recording, alloc_pool off, bounded waits), which would all be counted as "put-off failed".
  • The BuildingNoWrapper case (~1867) passes its cause straight to skip(), so it tests nothing, and the 13 names / counters are kept in step with the enum by hand (a new variant without a name panics inside a D3D12 hook).

Fine: relaxed counters, the test-only per-thread copies, the log format and build_state. Recommendation: close, and if record-time causes are still wanted, a new PR counting them at main's skip sites without the ExecuteIndirect change.

AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7302525024 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2625#issuecomment-7302525024). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T06:08:21Z. --- Review (head 428750f7, diff read, not a merge-check; it conflicts with main, so not built or run): - **Main has moved too far for a rebase.** `bind.rs` went from about 1.8k to 10k lines with about 25 skip sites, and put-off calls now go through `defer_retained` / `PipelineResolution` / `execute_indirect_retained`. Main already counts what happens to put-off calls (`pso_async::PutOff`: deferred / refused / recorded / skipped / dropped, from #3203), and frame dumps carry a per-call `capture::Outcome`. Record-time skips aren't broken down by cause on main yet. - The `AT_SUBMIT.get() ||` change in `execute_indirect` (~430) is a behaviour fix inside a counters PR, and on main it no longer applies: the replay uses the kept resolution (`is_compute()`, failing closed on `Unavailable`), not the `CONSOLE_COMPUTE` marker. - `refusal()` (`list_x.rs` ~2666) works out why the split failed by repeating its checks afterwards; main's `defer_with` refuses for more reasons (poisoned recording, `alloc_pool` off, bounded waits), which would all be counted as "put-off failed". - The `BuildingNoWrapper` case (~1867) passes its cause straight to `skip()`, so it tests nothing, and the 13 names / counters are kept in step with the enum by hand (a new variant without a name panics inside a D3D12 hook). Fine: relaxed counters, the test-only per-thread copies, the log format and `build_state`. Recommendation: close, and if record-time causes are still wanted, a new PR counting them at main's skip sites without the ExecuteIndirect change. AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/2625:upstream-pr/2625'
git switch 'upstream-pr/2625'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/2625'
git switch 'upstream-pr/2625'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2625'
git switch 'upstream-pr/2625'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2625'
git switch 'main'
git merge --squash 'upstream-pr/2625'
git switch 'main'
git merge --ff-only 'upstream-pr/2625'
git switch 'main'
git merge 'upstream-pr/2625'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!2615
No description provided.