Skip to content

Tests: skip predication_e2e when the host runs predicated copies - #1327

Closed
vakaobr wants to merge 1 commit into
xcl-dev:mainfrom
vakaobr:tests/predication-copy-skip
Closed

vakaobr wants to merge 1 commit into
xcl-dev:mainfrom
vakaobr:tests/predication-copy-skip

Conversation

@vakaobr

@vakaobr vakaobr commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

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, Tests: skip predication_e2e when the host runs predicated copies #1327 (comment)).

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.

D3DMetal 3.0 applies SetPredication for draws, dispatches and
ExecuteIndirect but not for copies: a predicated CopyBufferRegion runs
unconditionally. The UMA shadow path (next commit) makes UMA available
on this host, so the predication test would run and fail.

A one-copy probe detects whether a predicated copy is skipped (Windows,
any real D3D12) or run (D3DMetal). When run, the test skips with
"host ignores SetPredication for copies" instead of failing.

Based on us3r40456's bisect and measurement in xcl-dev#258.

Co-authored-by: Ahmet Dedeler <105894172+Ahmet-Dedeler@users.noreply.github.com>
Assisted-by: Claude Code (Claude Opus 4.6 ported it; Claude Opus 5.5 reviewed it)
@futurepro62

futurepro62 commented Nov 24, 2026 •

Copy link
Copy Markdown

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

Copy link
Copy Markdown

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

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

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor

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

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

Copy link
Copy Markdown
Contributor

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!

@ivall ivall added the off-goal Does not bear on the current goal (world loading); waits until it is reached label Nov 24, 2026
@github-actions

Copy link
Copy Markdown

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.

@github-actions github-actions Bot added the stale No activity for 3 days; closed 4 days later unless something happens label Nov 28, 2026
@crastinator

Copy link
Copy Markdown

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

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

vakaobr commented Nov 30, 2026

Copy link
Copy Markdown
Contributor Author

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

@vakaobr vakaobr closed this Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

off-goal Does not bear on the current goal (world loading); waits until it is reached stale No activity for 3 days; closed 4 days later unless something happens

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants