Skip to content

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

Open
Tjabooo wants to merge 1 commit into
xcl-dev:mainfrom
Tjabooo:tests/depth-uav-refusal-windows-only
Open

Tjabooo wants to merge 1 commit into
xcl-dev:mainfrom
Tjabooo:tests/depth-uav-refusal-windows-only

Conversation

@Tjabooo

@Tjabooo Tjabooo commented Nov 24, 2026 •

Copy link
Copy Markdown

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

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

AI use

  • Claude Code with Claude Opus 5.5: traced the failure, wrote the change and this description. I read the diff.

gpu_depth_buffer_created_for_unordered_access_is_placed (xcl-dev#1353) first checks
that a depth buffer without the UAV flag can't be placed in
UNORDERED_ACCESS. Microsoft's D3D12 runtime refuses that state;
vkd3d-proton under Wine does not validate it and creates the resource, so
the test failed on every Linux run although the state XCL asks for
(DEPTH_WRITE, from pc_initial_state) is accepted there too. The refusal is
now asserted only when not under Wine; the rest of the test is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@futurepro62

futurepro62 commented Nov 24, 2026 •

Copy link
Copy Markdown

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

Copy link
Copy Markdown
Contributor

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 Linux: docs/linux.md, scripts/linux and Wine start-up checks for vkd3d-proton and DXVK (#154, #241) #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

Copy link
Copy Markdown
Contributor

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

Tjabooo commented Nov 24, 2026

Copy link
Copy Markdown
Author

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

Toons29 commented Nov 25, 2026

Copy link
Copy Markdown

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.

@throny throny added the off-goal Does not bear on the current goal (world loading); waits until it is reached label Nov 25, 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants