Tests: assert the refused depth-buffer UAV state on Windows only #1465

Merged
Tjabooo merged 1 commit from upstream-pr/1475 into main 2026-11-25 19:23:22 +00:00
Tjabooo commented 2026-11-24 16:40:06 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Tjabooo on 2026-11-24T16:40:06Z.


gpu_depth_buffer_created_for_unordered_access_is_placed (added in #1353) fails on every Linux run under Wine and vkd3d-proton. Its first check expects D3D12 to refuse placing a depth buffer without the UAV flag in UNORDERED_ACCESS. Microsoft's runtime refuses it; vkd3d-proton doesn't validate that and creates the resource. The rest of the test, which places the resource in the state XCL actually asks for (pc_initial_state → DEPTH_WRITE), passes there. So the refusal is now asserted only when not under Wine (util::under_wine(), as used elsewhere). On Windows the test is unchanged.

The same failure on NVIDIA under vkd3d-proton is listed in #1468's description (RTX 4060 Ti, vkd3d-proton v3.1-90), so it is not AMD-specific.

What is in it

  • crates/xcl/src/hle/d3d12x/device_x.rs (test only): the place(0x8 & PC_RESOURCE_STATES).is_err() assert runs under if !crate::util::under_wine(), with a comment saying why.

Tested

  • AMD Radeon RX 9070 XT (RDNA4), RADV / Mesa 26.2.6, Arch Linux, Wine 11.21; vkd3d-proton v3.1 with #257's patch and dxil-spirv master 7c048638 (see #1425); DXC 2026_09_29. Rust 1.100.0, cross-built for x86_64-pc-windows-gnu, debug. No Windows build.
  • The test alone: failed on main b7aa9f3 (UNORDERED_ACCESS without the UAV flag), passes with this change.
  • cargo test -p xcl --lib --locked --target x86_64-pc-windows-gnu -- --test-threads=4 on b7aa9f3 + this change: 719 passed, 3 failed, 21 ignored, 0 SKIPPED. The three are known and fail on main too: gpu_f64_roots and gpu_f64_math_random (#530), gpu_nonfused_mad_and_mac_prevent_fma_contraction (#676). Same run on main without this change: 718 passed, 4 failed (this test is the fourth).

Regression run

  • Test-only: the only change is inside device_x.rs's #[cfg(test)] module (it starts at line 1045; the edit is at 1116), and no runtime code changes. pr_check.py counts the file as runtime by its path, so this asks for the test-only label (CONTRIBUTING.md, item 3) instead of an xcl-smoke run.

Not tested

  • Windows. There the assert runs exactly as before, but I made no Windows run.
  • NVIDIA under Wine (see #1468 for that failure on main).

AI use

  • Claude Code with Claude Opus 5.5: traced the failure, wrote the change and this description. I read the diff.
<!-- greyfinch-sync:ivall/xcl:issue:6586731462 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1475). Originally posted by [Tjabooo](https://github.com/Tjabooo) on 2026-11-24T16:40:06Z. --- `gpu_depth_buffer_created_for_unordered_access_is_placed` (added in #1353) fails on every Linux run under Wine and vkd3d-proton. Its first check expects D3D12 to refuse placing a depth buffer without the UAV flag in `UNORDERED_ACCESS`. Microsoft's runtime refuses it; vkd3d-proton doesn't validate that and creates the resource. The rest of the test, which places the resource in the state XCL actually asks for (`pc_initial_state` → `DEPTH_WRITE`), passes there. So the refusal is now asserted only when not under Wine (`util::under_wine()`, as used elsewhere). On Windows the test is unchanged. The same failure on NVIDIA under vkd3d-proton is listed in #1468's description (RTX 4060 Ti, vkd3d-proton v3.1-90), so it is not AMD-specific. **What is in it** - `crates/xcl/src/hle/d3d12x/device_x.rs` (test only): the `place(0x8 & PC_RESOURCE_STATES).is_err()` assert runs under `if !crate::util::under_wine()`, with a comment saying why. **Tested** - AMD Radeon RX 9070 XT (RDNA4), RADV / Mesa 26.2.6, Arch Linux, Wine 11.21; vkd3d-proton v3.1 with #257's patch and dxil-spirv master `7c048638` (see #1425); DXC 2026_09_29. Rust 1.100.0, cross-built for `x86_64-pc-windows-gnu`, debug. No Windows build. - The test alone: failed on `main` `b7aa9f3` (`UNORDERED_ACCESS without the UAV flag`), passes with this change. - `cargo test -p xcl --lib --locked --target x86_64-pc-windows-gnu -- --test-threads=4` on `b7aa9f3` + this change: **719 passed, 3 failed**, 21 ignored, 0 `SKIPPED`. The three are known and fail on `main` too: `gpu_f64_roots` and `gpu_f64_math_random` (#530), `gpu_nonfused_mad_and_mac_prevent_fma_contraction` (#676). Same run on `main` without this change: 718 passed, 4 failed (this test is the fourth). **Regression run** - Test-only: the only change is inside `device_x.rs`'s `#[cfg(test)]` module (it starts at line 1045; the edit is at 1116), and no runtime code changes. `pr_check.py` counts the file as runtime by its path, so this asks for the `test-only` label (CONTRIBUTING.md, item 3) instead of an `xcl-smoke` run. **Not tested** - Windows. There the assert runs exactly as before, but I made no Windows run. - NVIDIA under Wine (see #1468 for that failure on `main`). **AI use** - Claude Code with Claude Opus 5.5: traced the failure, wrote the change and this description. I read the diff.
futurepro62 commented 2026-11-24 17:06:43 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T16:59:05Z.


Full-suite run, since this PR has no test report yet. Tested exact head 1aca319 (on its base b7aa9f3).

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: 770 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: 770 passed, 0 failed, 41 ignored, no skips.

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:7138507863 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1475#issuecomment-7138507863). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-24T16:59:05Z. --- Full-suite run, since this PR has no test report yet. Tested exact head `1aca319` (on its base `b7aa9f3`). **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`: **770 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`: **770 passed, 0 failed, 41 ignored**, no skips. **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.
pablogonz12 commented 2026-11-24 18:09:01 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by pablogonz12 on 2026-11-24T17:26:13Z.


Test report for head 1aca319 (based on b7aa9f3): it fixes the failure here.

Tested

  • AMD Radeon RX 9070 XT (RDNA4, RADV / Mesa 26.3.1), Ryzen 9 9900X, CachyOS (Linux 7.3), Wine (GE-Proton11-14), vkd3d-proton v3.1 + the #257 patch with dxil-spirv master 7c048638, DXC 1.9.2609.5, Rust stable, release, x86_64-pc-windows-gnu, --test-threads=4.
  • gpu_depth_buffer_created_for_unordered_access_is_placed: fails on main (UNORDERED_ACCESS without the UAV flag), passes on this head.
  • Whole xcl lib suite on this head: 717 passed, 5 failed, 21 ignored, 0 SKIPPED. The five fail on main too: gpu_f64_roots, gpu_f64_math_random, gpu_nonfused_mad_and_mac_prevent_fma_contraction, xma2_source_voice_decodes_and_manages_lifetime, pe::tests::parses_own_test_binary_tls.

Not tested

  • Windows (the unchanged path), NVIDIA.

AI use

  • Claude Code (Claude Sonnet 5.5) ran the builds and tests on my machine and wrote this report.
<!-- greyfinch-sync:ivall/xcl:comment:7139191921 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1475#issuecomment-7139191921). Originally posted by [pablogonz12](https://github.com/pablogonz12) on 2026-11-24T17:26:13Z. --- Test report for head `1aca319` (based on `b7aa9f3`): it fixes the failure here. **Tested** - AMD Radeon RX 9070 XT (RDNA4, RADV / Mesa 26.3.1), Ryzen 9 9900X, CachyOS (Linux 7.3), Wine (GE-Proton11-14), vkd3d-proton v3.1 + the #257 patch with dxil-spirv master `7c048638`, DXC 1.9.2609.5, Rust stable, release, `x86_64-pc-windows-gnu`, `--test-threads=4`. - `gpu_depth_buffer_created_for_unordered_access_is_placed`: fails on `main` (`UNORDERED_ACCESS without the UAV flag`), passes on this head. - Whole `xcl` lib suite on this head: 717 passed, 5 failed, 21 ignored, 0 `SKIPPED`. The five fail on `main` too: `gpu_f64_roots`, `gpu_f64_math_random`, `gpu_nonfused_mad_and_mac_prevent_fma_contraction`, `xma2_source_voice_decodes_and_manages_lifetime`, `pe::tests::parses_own_test_binary_tls`. **Not tested** - Windows (the unchanged path), NVIDIA. **AI use** - Claude Code (Claude Sonnet 5.5) ran the builds and tests on my machine and wrote this report.
DavidM1911 commented 2026-11-24 19:07:44 +00:00 (Migrated from github.com)

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


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

  • cargo test -p xcl --lib: all passed, 0 failed, ~21 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified main.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7141290652 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1475#issuecomment-7141290652). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T18:53:14Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~21 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified `main`.) Thanks!
Tjabooo commented 2026-11-24 21:08:59 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Tjabooo on 2026-11-24T19:39:38Z.


The red PR description check is the smoke-block requirement: pr_check.py treats device_x.rs as runtime by path, and the change sits entirely inside that file's #[cfg(test)] module. Per CONTRIBUTING item 3, this needs the test-only label rather than an xcl-smoke run, so it is waiting on a maintainer review of the diff.

Since opening, it has three independent test reports above: RTX 5070 Ti (Wine), RX 9070 XT on CachyOS (Wine), and RTX 3060 Ti on Windows 11 (where the assert still runs).

<!-- greyfinch-sync:ivall/xcl:comment:7142410621 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1475#issuecomment-7142410621). Originally posted by [Tjabooo](https://github.com/Tjabooo) on 2026-11-24T19:39:38Z. --- The red **PR description** check is the smoke-block requirement: `pr_check.py` treats `device_x.rs` as runtime by path, and the change sits entirely inside that file's `#[cfg(test)]` module. Per CONTRIBUTING item 3, this needs the `test-only` label rather than an `xcl-smoke` run, so it is waiting on a maintainer review of the diff. Since opening, it has three independent test reports above: RTX 5070 Ti (Wine), RX 9070 XT on CachyOS (Wine), and RTX 3060 Ti on Windows 11 (where the assert still runs).
Toons29 commented 2026-11-25 04:10:32 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Toons29 on 2026-11-25T03:32:20Z.


Regression run of 1aca319f on the retail title, for this PR's Regression run section. Both blocks are from scripts/smoke.ps1 as printed, not edited: main on 4178e888, this PR on its head commit with no uncommitted changes, same title and time.

xcl-smoke v1
commit: 4178e888c0b5be50a2887eda45cdb832763b68a4
gpu: AMD Radeon RX 9070
title: game.exe
seconds: 60
exit: 0x0
frames shown: 1618 (PresentX 1618)
presents per 2 s (last 3): 61 60 60
device removals: 0
crashes: 0
peak commit: 14831 MB
xcl-smoke v1
commit: 1aca319f0b61d4422caf3c653bc0bb49444fcf7e
gpu: AMD Radeon RX 9070
title: game.exe
seconds: 60
exit: 0x0
frames shown: 1633 (PresentX 1633)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14691 MB

Against the limits in CONTRIBUTING.md: 101 % of main's frames, 99 % of its peak commit, no crash, no device removal.

AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, cargo build --release -p xcl, 60 s, XCL_NETWORK=0. This is a regression check only: it does not show whether the run reaches the code this PR changes.

AI use: Claude Code (Claude Opus 5.5) built both trees and ran scripts/smoke.ps1; I checked the blocks before posting.

<!-- greyfinch-sync:ivall/xcl:comment:7152007953 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1475#issuecomment-7152007953). Originally posted by [Toons29](https://github.com/Toons29) on 2026-11-25T03:32:20Z. --- Regression run of `1aca319f` on the retail title, for this PR's **Regression run** section. Both blocks are from `scripts/smoke.ps1` as printed, not edited: `main` on `4178e888`, this PR on its head commit with no uncommitted changes, same title and time. ``` xcl-smoke v1 commit: 4178e888c0b5be50a2887eda45cdb832763b68a4 gpu: AMD Radeon RX 9070 title: game.exe seconds: 60 exit: 0x0 frames shown: 1618 (PresentX 1618) presents per 2 s (last 3): 61 60 60 device removals: 0 crashes: 0 peak commit: 14831 MB ``` ``` xcl-smoke v1 commit: 1aca319f0b61d4422caf3c653bc0bb49444fcf7e gpu: AMD Radeon RX 9070 title: game.exe seconds: 60 exit: 0x0 frames shown: 1633 (PresentX 1633) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14691 MB ``` Against the limits in CONTRIBUTING.md: 101 % of `main`'s frames, 99 % of its peak commit, no crash, no device removal. AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, `cargo build --release -p xcl`, 60 s, `XCL_NETWORK=0`. This is a regression check only: it does not show whether the run reaches the code this PR changes. AI use: Claude Code (Claude Opus 5.5) built both trees and ran `scripts/smoke.ps1`; I checked the blocks before posting.
upstream-sync closed this pull request 2026-11-25 20:07:00 +00:00
ivall commented 2026-11-25 20:08:34 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ivall on 2026-11-25T19:23:24Z.


Merging: the refusal is asserted on Windows only, where the runtime makes it.

Tested on AMD RDNA4 (native wave64), Windows, DXC 1.8.2502.11, debug, main 2898511 with 27 test PRs merged locally, this one included: the whole suite 3 times, 1419 passed, 2 failed, 46 ignored each time (fuzz_validate_and_gpu_1 and _3, which fail the same way on main); hle::d3d12x on 16 threads 5 times, no failure.

AI use: Claude Code (Claude Opus 5.5) reviewed and tested this and wrote the comment on the maintainer's behalf.

<!-- greyfinch-sync:ivall/xcl:comment:7172225684 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1475#issuecomment-7172225684). Originally posted by [ivall](https://github.com/ivall) on 2026-11-25T19:23:24Z. --- Merging: the refusal is asserted on Windows only, where the runtime makes it. Tested on AMD RDNA4 (native wave64), Windows, DXC 1.8.2502.11, debug, `main` `2898511` with 27 test PRs merged locally, this one included: the whole suite 3 times, 1419 passed, 2 failed, 46 ignored each time (`fuzz_validate_and_gpu_1` and `_3`, which fail the same way on `main`); `hle::d3d12x` on 16 threads 5 times, no failure. AI use: Claude Code (Claude Opus 5.5) reviewed and tested this and wrote the comment on the maintainer's behalf.
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!1465
No description provided.