Tests: skip predication_e2e when the host runs predicated copies #1317

Closed
vakaobr wants to merge 1 commit from upstream-pr/1327 into main
vakaobr commented 2026-11-24 14:48:37 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by vakaobr on 2026-11-24T14:48:37Z.


Part of #258. D3DMetal 3.0 skips predicated draws, dispatches and ExecuteIndirect, but runs predicated copies and clears (measured with a plain D3D12 program, and first reported in #258 by @us3r40456). On main the Mac never reaches set_predication_buffer_state_and_kickoff (it skips with "no GPU UMA"). Once the unified memory copy path lands, it runs and fails. This PR adds a one-copy probe and skips the test with "host ignores SetPredication for copies" on such a host. It is meant to merge before the copy path, so no test regresses on the Mac.

What is in it

  • crates/xcl/tests/predication_e2e.rs: host_runs_predicated_copies(): a predicate of 0 with EQUAL_ZERO, one predicated 4-byte copy and one unpredicated control into a readback buffer; the test skips only when the predicated copy ran and the control did.

Tested

  • MacBook Pro M5 Pro (20-core GPU), 48 GB, macOS 27.2.1, CrossOver 26.3.0.39832 with D3DMetal 3.0 ("AMD Compatibility Mode"), Rosetta 2. Rust 1.100.0, x86_64-pc-windows-gnu (mingw-w64 GCC 16.2.0), debug, DXC 1.9.2609. Each test in its own process (<test exe> --exact <test> --test-threads=1 --nocapture).
  • On main with this PR (head 39f2504): set_predication_buffer_state_and_kickoff still skips with "no GPU UMA", because the probe is not reached without unified memory on this host.
  • With the copy path on top (the stack's head 4a11de6): it skips with "host ignores SetPredication for copies".
  • Independent run at this head: NVIDIA RTX 5070 Ti and the AMD Radeon iGPU of a Ryzen 9800X3D (RDNA2), Windows 11, debug, cargo test --workspace -- --test-threads=4: 751 passed, 0 failed, 41 ignored on both; set_predication_buffer_state_and_kickoff ran and passed on both, the probe not skipping it on either native driver (@futurepro62, https://github.com/ivall/xcl/pull/1327#issuecomment-7135126721).

Regression run

Test-only change in crates/xcl/tests/: no xcl-smoke blocks.

Not tested

  • Windows by me; see the independent run above, where the probe did not skip the test.

AI use

  • Claude Code with Claude Opus 5.5 measured D3DMetal's predication on this machine, wrote the probe and the skip, ran the tests above and wrote this description.
<!-- greyfinch-sync:ivall/xcl:issue:5474443619 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1327). Originally posted by [vakaobr](https://github.com/vakaobr) on 2026-11-24T14:48:37Z. --- Part of #258. D3DMetal 3.0 skips predicated draws, dispatches and `ExecuteIndirect`, but runs predicated copies and clears (measured with a plain D3D12 program, and first reported in #258 by @us3r40456). On `main` the Mac never reaches `set_predication_buffer_state_and_kickoff` (it skips with "no GPU UMA"). Once the unified memory copy path lands, it runs and fails. This PR adds a one-copy probe and skips the test with "host ignores SetPredication for copies" on such a host. It is meant to merge before the copy path, so no test regresses on the Mac. **What is in it** - `crates/xcl/tests/predication_e2e.rs`: `host_runs_predicated_copies()`: a predicate of 0 with `EQUAL_ZERO`, one predicated 4-byte copy and one unpredicated control into a readback buffer; the test skips only when the predicated copy ran and the control did. **Tested** - MacBook Pro M5 Pro (20-core GPU), 48 GB, macOS 27.2.1, CrossOver 26.3.0.39832 with D3DMetal 3.0 ("AMD Compatibility Mode"), Rosetta 2. Rust 1.100.0, `x86_64-pc-windows-gnu` (mingw-w64 GCC 16.2.0), debug, DXC 1.9.2609. Each test in its own process (`<test exe> --exact <test> --test-threads=1 --nocapture`). - On `main` with this PR (head `39f2504`): `set_predication_buffer_state_and_kickoff` still skips with "no GPU UMA", because the probe is not reached without unified memory on this host. - With the copy path on top (the stack's head `4a11de6`): it skips with "host ignores SetPredication for copies". - Independent run at this head: NVIDIA RTX 5070 Ti and the AMD Radeon iGPU of a Ryzen 9800X3D (RDNA2), Windows 11, debug, `cargo test --workspace -- --test-threads=4`: 751 passed, 0 failed, 41 ignored on both; `set_predication_buffer_state_and_kickoff` ran and passed on both, the probe not skipping it on either native driver (@futurepro62, https://github.com/ivall/xcl/pull/1327#issuecomment-7135126721). **Regression run** Test-only change in `crates/xcl/tests/`: no `xcl-smoke` blocks. **Not tested** - Windows by me; see the independent run above, where the probe did not skip the test. **AI use** - Claude Code with Claude Opus 5.5 measured D3DMetal's predication on this machine, wrote the probe and the skip, ran the tests above and wrote this description.
futurepro62 commented 2026-11-24 15:06:09 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T14:53:51Z.


Full-suite run, since this PR has no test report yet. Tested exact head 39f2504 (on its base 930e8b4).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 751 passed, 0 failed, 41 ignored. SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.
  • No new #[test] functions in the diff.
  • Same head on the AMD Radeon iGPU of the 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace -- --test-threads=4: 751 passed, 0 failed, 41 ignored, no skips.
  • tests/predication_e2e.rs: set_predication_buffer_state_and_kickoff ran and passed on both GPUs. The new host_runs_predicated_copies probe did not skip it on either native D3D12 driver (NVIDIA, AMD), as expected.

Not tested

  • a release build, a game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
<!-- greyfinch-sync:ivall/xcl:comment:7135126721 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1327#issuecomment-7135126721). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-24T14:53:51Z. --- Full-suite run, since this PR has no test report yet. Tested exact head `39f2504` (on its base `930e8b4`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, debug, D3D12 debug layer installed. - `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4`: **751 passed, 0 failed, 41 ignored**. SKIPPED (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`. - No new `#[test]` functions in the diff. - Same head on the AMD Radeon iGPU of the 9800X3D (RDNA2, `XCL_ADAPTER=radeon`), `cargo test --workspace -- --test-threads=4`: **751 passed, 0 failed, 41 ignored**, no skips. - `tests/predication_e2e.rs`: `set_predication_buffer_state_and_kickoff` ran and passed on both GPUs. The new `host_runs_predicated_copies` probe did not skip it on either native D3D12 driver (NVIDIA, AMD), as expected. **Not tested** - a release build, a game (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
JoaoPauluu commented 2026-11-24 16:06:54 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JoaoPauluu on 2026-11-24T15:09:47Z.


A run where the host does ignore predication for copies: vkd3d-proton under Wine on Linux. The skip is taken here and the test no longer fails.

Tested

  • RTX 3060 12 GB (NVIDIA 620.70.06, 32-lane waves), i5-10400F, 16 GB, CachyOS (kernel 7.3.3), Proton Experimental 11.0-20261112 with the patched vkd3d-proton 3.1 from #257, DXC 1.9.2609.5. Release, cross-built for x86_64-pc-windows-gnu. 39f2504 as it is (based on 930e8b4) and main 930e8b4, no uncommitted changes. The test binary runs under Wine, one test per process (--exact).
  • predication_e2e::set_predication_buffer_state_and_kickoff:
    • main 930e8b4: fails, predication_e2e.rs:360, EQUAL_ZERO(0) must skip dst[0], left: 2863267840. This is the same failure @itsd-effex listed for Wine on #257.
    • this PR: ok, with SKIPPED set_predication_buffer_state_and_kickoff: host ignores SetPredication for copies.

Not tested

  • native Windows (where the skip must not fire); the rest of the suite on this head.

AI use

  • Claude Code (Claude Opus 5.5) built the commits, ran the tests and wrote this report. The account owner asked for test reports to be posted and has not reviewed this one.
<!-- greyfinch-sync:ivall/xcl:comment:7135561125 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1327#issuecomment-7135561125). Originally posted by [JoaoPauluu](https://github.com/JoaoPauluu) on 2026-11-24T15:09:47Z. --- A run where the host does ignore predication for copies: vkd3d-proton under Wine on Linux. The skip is taken here and the test no longer fails. **Tested** - RTX 3060 12 GB (NVIDIA 620.70.06, 32-lane waves), i5-10400F, 16 GB, CachyOS (kernel 7.3.3), Proton Experimental 11.0-20261112 with the patched vkd3d-proton 3.1 from #257, DXC 1.9.2609.5. Release, cross-built for `x86_64-pc-windows-gnu`. `39f2504` as it is (based on `930e8b4`) and `main` `930e8b4`, no uncommitted changes. The test binary runs under Wine, one test per process (`--exact`). - `predication_e2e::set_predication_buffer_state_and_kickoff`: - `main` `930e8b4`: **fails**, `predication_e2e.rs:360`, `EQUAL_ZERO(0) must skip dst[0]`, `left: 2863267840`. This is the same failure @itsd-effex listed for Wine on #257. - this PR: **ok**, with `SKIPPED set_predication_buffer_state_and_kickoff: host ignores SetPredication for copies`. **Not tested** - native Windows (where the skip must not fire); the rest of the suite on this head. **AI use** - Claude Code (Claude Opus 5.5) built the commits, ran the tests and wrote this report. The account owner asked for test reports to be posted and has not reviewed this one.
DavidM1911 commented 2026-11-24 16:06:57 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T15:14:35Z.


Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib -- --test-threads=1: 707 passed, 0 failed, 21 ignored. (The default parallel run aborted once with 0xc0000005 — same test-harness flake seen on unmodified main under load; single-threaded is clean.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7135693419 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1327#issuecomment-7135693419). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T15:14:35Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib -- --test-threads=1`: 707 passed, 0 failed, 21 ignored. (The default parallel run aborted once with 0xc0000005 — same test-harness flake seen on unmodified `main` under load; single-threaded is clean.) Thanks!
KOLESNiii commented 2026-11-24 16:07:23 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by KOLESNiii on 2026-11-24T15:58:24Z.


A run on AMD RDNA 3.5 under Wine + vkd3d-proton. Here the host ignores predication for copies: main fails as in #1272 and this PR takes the skip.

Tested

  • AMD Ryzen AI 7 350 with Radeon 860M (RDNA 3.5, RADV KRACKAN1, Mesa 26.0.3), Ubuntu 26.04 LTS (kernel 7.0.0-43).
  • Proton Experimental 11.0-20261112's Wine, vkd3d-proton v3.1 with #257's patch and -Db_ndebug=true (built with #257's build-vkd3d-proton.sh), DXVK v3.1.1-209 dxgi from Proton, VKD3D_CONFIG=ignore_shared_fence, DXC 1.9.2609.
  • Rust 1.100.0, cross-built for x86_64-pc-windows-gnu (mingw-w64 GCC 13-posix), debug. Each test binary from a clean checkout of its commit (no uncommitted changes), run under Wine one test per process: <exe> set_predication_buffer_state_and_kickoff --exact --test-threads=1 --nocapture, 3 runs each.
  • main 930e8b4: fails 3/3 at predication_e2e.rs:360, EQUAL_ZERO(0) must skip dst[0], left: 2863267840, right: 286331153 (the copy ran), the same failure as in #1272.
  • this PR 39f2504: ok 3/3, SKIPPED set_predication_buffer_state_and_kickoff: host ignores SetPredication for copies.
  • With Proton's stock vkd3d-proton, main does not get as far as the predication part: Assertion failed: iface->lpVtbl == &d3d12_resource_vtbl (#241).

Not tested

  • native Windows (where the probe must not skip); the rest of the suite on this head; a release build.

AI use

  • Claude Code (Claude Opus 5.5) set up the Wine lane, built and ran the tests and wrote this report; I checked it.
<!-- greyfinch-sync:ivall/xcl:comment:7136916165 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1327#issuecomment-7136916165). Originally posted by [KOLESNiii](https://github.com/KOLESNiii) on 2026-11-24T15:58:24Z. --- A run on AMD RDNA 3.5 under Wine + vkd3d-proton. Here the host ignores predication for copies: `main` fails as in #1272 and this PR takes the skip. **Tested** - AMD Ryzen AI 7 350 with Radeon 860M (RDNA 3.5, RADV KRACKAN1, Mesa 26.0.3), Ubuntu 26.04 LTS (kernel 7.0.0-43). - Proton Experimental 11.0-20261112's Wine, vkd3d-proton v3.1 with #257's patch and `-Db_ndebug=true` (built with #257's `build-vkd3d-proton.sh`), DXVK v3.1.1-209 `dxgi` from Proton, `VKD3D_CONFIG=ignore_shared_fence`, DXC 1.9.2609. - Rust 1.100.0, cross-built for `x86_64-pc-windows-gnu` (mingw-w64 GCC 13-posix), debug. Each test binary from a clean checkout of its commit (no uncommitted changes), run under Wine one test per process: `<exe> set_predication_buffer_state_and_kickoff --exact --test-threads=1 --nocapture`, 3 runs each. - `main` `930e8b4`: **fails** 3/3 at `predication_e2e.rs:360`, `EQUAL_ZERO(0) must skip dst[0]`, `left: 2863267840`, `right: 286331153` (the copy ran), the same failure as in #1272. - this PR `39f2504`: **ok** 3/3, `SKIPPED set_predication_buffer_state_and_kickoff: host ignores SetPredication for copies`. - With Proton's stock vkd3d-proton, `main` does not get as far as the predication part: `Assertion failed: iface->lpVtbl == &d3d12_resource_vtbl` (#241). **Not tested** - native Windows (where the probe must not skip); the rest of the suite on this head; a release build. **AI use** - Claude Code (Claude Opus 5.5) set up the Wine lane, built and ran the tests and wrote this report; I checked it.
DavidM1911 commented 2026-11-24 16:07:23 +00:00 (Migrated from github.com)

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


Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib -- --test-threads=1: all passed, 0 failed, 21 ignored. (Parallel runs intermittently abort with 0xc0000005 — same harness flake seen on unmodified main.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7136921800 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1327#issuecomment-7136921800). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T15:58:37Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib -- --test-threads=1`: all passed, 0 failed, 21 ignored. (Parallel runs intermittently abort with 0xc0000005 — same harness flake seen on unmodified `main`.) Thanks!
github-actions[bot] commented 2026-11-28 08:00:35 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-28T08:00:35Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7236301969 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1327#issuecomment-7236301969). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-28T08:00:35Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
crastinator commented 2026-11-28 16:59:30 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by crastinator on 2026-11-28T16:59:30Z.


One more vkd3d-proton run, on RDNA2: the probe takes the skip and the test passes.

  • AMD Radeon RX 6700 XT (RDNA2, RADV NAVI22, Mesa 26.3.1), Linux 7.3.5, Proton Experimental 11.0-20261112's Wine, vkd3d-proton v3.1 + #257's patch (with #775's dxil-spirv). Cross-built for x86_64-pc-windows-msvc, debug.
  • Head 39f2504, --exact set_predication_buffer_state_and_kickoff --test-threads=1, 3 runs: 3/3 SKIPPED ...: host ignores SetPredication for copies, result ok. On main this test fails on this machine every run (#1272).
  • The PR still merges cleanly into main db3921d, and main has no other skip for this.

Not tested: Windows (covered by the runs above), retail titles.

AI use: Claude Code (Claude Opus 5.5) ran the test and wrote this; I checked it.

<!-- greyfinch-sync:ivall/xcl:comment:7242668633 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1327#issuecomment-7242668633). Originally posted by [crastinator](https://github.com/crastinator) on 2026-11-28T16:59:30Z. --- One more vkd3d-proton run, on RDNA2: the probe takes the skip and the test passes. - AMD Radeon RX 6700 XT (RDNA2, RADV NAVI22, Mesa 26.3.1), Linux 7.3.5, Proton Experimental 11.0-20261112's Wine, vkd3d-proton v3.1 + #257's patch (with #775's dxil-spirv). Cross-built for `x86_64-pc-windows-msvc`, debug. - Head `39f2504`, `--exact set_predication_buffer_state_and_kickoff --test-threads=1`, 3 runs: 3/3 `SKIPPED ...: host ignores SetPredication for copies`, result `ok`. On `main` this test fails on this machine every run (#1272). - The PR still merges cleanly into `main` `db3921d`, and `main` has no other skip for this. Not tested: Windows (covered by the runs above), retail titles. AI use: Claude Code (Claude Opus 5.5) ran the test and wrote this; I checked it.
vakaobr commented 2026-11-30 13:21:36 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by vakaobr on 2026-11-30T13:21:36Z.


Closing: its commit is in main through #1329 (merged 28 Nov), patch for patch.

<!-- greyfinch-sync:ivall/xcl:comment:7279731273 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1327#issuecomment-7279731273). Originally posted by [vakaobr](https://github.com/vakaobr) on 2026-11-30T13:21:36Z. --- Closing: its commit is in `main` through #1329 (merged 28 Nov), patch for patch.

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!1317
No description provided.