Skip to content

Tests: align device_x UAV strip and pso cache marker tests with main - #2233

Open
raylitebull wants to merge 2 commits into
xcl-dev:mainfrom
raylitebull:fix/device-x-uav-promotion-test
Open

raylitebull wants to merge 2 commits into
xcl-dev:mainfrom
raylitebull:fix/device-x-uav-promotion-test

Conversation

@raylitebull

@raylitebull raylitebull commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

Reconciles two #[cfg(test)] assertion mismatches on main caused by independently merged PR pairs:

  1. crates/xcl/src/hle/d3d12x/device_x.rs: aligns hle::d3d12x::device_x::tests::pc_resource_desc_strips_uav_on_unsupported_formats_and_msaa with D3D12.X: global shader-visible sampler heap, typed UAV validation, and occlusion/query VA fixes #1991's UAV promotion (85 -> 28, 88 -> 87).
  2. crates/xcl/src/gpu/recomp/pso.rs: aligns gpu::recomp::pso::shader_cache_tests::rerouted_disk_entries_follow_the_direct_translator (.dxil[0] -> .dxil[67]) with Shaders: validate DXIL containers in the translated/v2 disk cache #2064's DXBC test header alongside Recompiler: enormous compute programs take the direct DXIL translator #2120.

Part of #1833 (test-only fix restoring cargo test -p xcl --lib on main).

What is in it

  • crates/xcl/src/hle/d3d12x/device_x.rs (#[cfg(test)] only): remove formats 85 (B5G6R5_UNORM) and 88 (B8G8R8X8_UNORM) from the unpromoted UAV-strip loop in pc_resource_desc_strips_uav_on_unsupported_formats_and_msaa (already verified in uav_format_promotion_and_linearization) while keeping direct !texture_format_allows_uav(85) / !texture_format_allows_uav(88) assertions and unpromoted non-UAV / MSAA checks.
  • crates/xcl/src/gpu/recomp/pso.rs (#[cfg(test)] only): read .dxil[67] instead of .dxil[0] in rerouted_disk_entries_follow_the_direct_translator (matching direct_and_hlsl_disk_entries_are_separate after Shaders: validate DXIL containers in the translated/v2 disk cache #2064).

Tested

  • Toolchain: Windows 11 x64, rustc 1.99.1 (58cf8f9c3 2026-10-13), WARP (D3D12), rebased cleanly onto f087b998 (50e4805b).
  • cargo test -p xcl --lib -- --nocapture "hle::d3d12x::device_x::tests" "gpu::recomp::pso::shader_cache_tests": 30 passed, 0 failed, 0 ignored (0.12s, 0 new warnings).

Regression run

  • Not needed: #[cfg(test)]-only changes (no runtime code touched).

Not tested

  • Full cargo test --workspace suite, standalone scripts/smoke.ps1 (test-only PR), and Linux/Wine/vkd3d-proton.

AI use

  • Antigravity assisted with reconciling the unit test assertions; the author reviewed the diff and test output.

@raylitebull
raylitebull force-pushed the fix/device-x-uav-promotion-test branch from 6a70b7e to 50e4805 Compare November 25, 2026 11:01
@raylitebull raylitebull changed the title Tests: reconcile device_x UAV promotion expectation with #1991 Tests: align device_x UAV strip and pso cache marker tests with main Nov 25, 2026
@raylitebull

Copy link
Copy Markdown
Member Author

Updated #2233 (50e4805b, cleanly based on f087b998) to also fix the second origin/main #[cfg(test)] mismatch (crates/xcl/src/gpu/recomp/pso.rs:1357 .dxil[0] -> .dxil[67] in rerouted_disk_entries_follow_the_direct_translator from #2064 + #2120).

Verified locally (cargo test -p xcl --lib -- --nocapture "hle::d3d12x::device_x::tests" "gpu::recomp::pso::shader_cache_tests": 30 passed, 0 failed, 0 ignored in 0.12s).

@Toons29

Toons29 commented Nov 25, 2026

Copy link
Copy Markdown

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

xcl-smoke v1
commit: 568e7db7729c8fa6c8f0f4b32d798faaf11462bb
gpu: AMD Radeon RX 9070
title: 34df7c50
seconds: 60
exit: 0x0
frames shown: 1566 (PresentX 1566)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14592 MB
xcl-smoke v1
commit: 50e4805bd35e8ef04b9a846c715b0034e258a091
gpu: AMD Radeon RX 9070
title: 34df7c50
seconds: 60
exit: 0x0
frames shown: 1628 (PresentX 1628)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14655 MB

Against the limits in CONTRIBUTING.md: 104 % of main's frames, 100 % 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; a script posted this right after the run, with both blocks exactly as printed.

@thehollowedone

Copy link
Copy Markdown

Independent Windows run on 50e4805. Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti (621.35), Rust 1.99.1 MSVC, debug.

cargo build --offline --locked -j 4 --workspace passed. cargo test --offline --locked -j 4 --workspace --no-fail-fast -- --test-threads=4 --nocapture reported 1,237 passed, 0 failed, 46 ignored, with 25 runtime skip notices included in Cargo's pass count. Both corrected tests and the separate UAV promotion test passed.

For a control, I restored only the two affected source files from 9633138 in the same checkout and ran the three named lib tests. The cache assertion read 68 instead of 1, the UAV-strip assertion saw 28 instead of 85, and the promotion test still passed. I restored the PR files afterward.

AI-assisted. Codex (GPT-6, exact variant unavailable) ran the suite and control and drafted this report.

@Daydream3r

Copy link
Copy Markdown

Independent check on RTX 5070 Ti, exact PR head 50e4805bd35e8ef04b9a846c715b0034e258a091, clean checkout. No source changes.

Tested

  • RTX 5070 Ti 16 GB, NVIDIA 621.01; Ryzen 7 9800X3D, 64 GB RAM; Windows 11 Pro 25H2 26200.6584; Rust 1.100.0 MSVC, DXC/DXIL 1.9.2609.5; debug tests.
  • cargo test --locked -p xcl --lib -- --nocapture --test-threads=1 hle::d3d12x::device_x::tests gpu::recomp::pso::shader_cache_tests: 30 passed, 0 failed, 0 ignored, no skips, exit 0. Both changed tests and uav_format_promotion_and_linearization executed and passed.
  • cargo test --workspace --locked --no-fail-fast -- --test-threads=4: 1233 passed, 4 failed, 46 ignored, exit 101.
  • Same full command on clean merge-base/main f087b998d0d51a9f11bbfa0761967a63e778edd9: 1231 passed, 6 failed, 46 ignored, exit 101. Both expectation failures also reproduced individually on that baseline before testing this head.

The four failures on both revisions are gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_{0,1,2,3}: seeds 70/545/1019/1507, CreateComputePipelineState returns 0x8007000E. The PR removes the two targeted failures; it does not make this adapter's full suite green.

Identical 26 explicit SKIPPED lines in both full runs: 20 no native wave64, 3 refused per-lane cases (V_MUL_F16, V_PK_MUL_F16, V_CVT_F16_F32), 2 missing D3D12 debug-layer checks, 1 no heap windows. These passing-return skips are not coverage.

Not tested: retail smoke/release build on this PR (test-only diff), AMD/Intel/native wave64, game-data sample coverage. No runtime-correctness or merge-approval claim. Logs remain local.

AI use: Codex desktop, GPT-6 (exact variant not exposed), inspected the diff, checked out the exact revision, ran the builds/tests and extracted these results. No source changes.

@dcastell1

Copy link
Copy Markdown

Patch check before spending a build on it: this does not apply to current main.

main @ 1a0bbe3
patch -p1 < this PR
  crates/xcl/src/hle/d3d12x/device_x.rs
  Hunk #1 FAILED at 1369.
  1 out of 1 hunk FAILED

It applies on its declared base (5478c4a7), so the code is fine where it was written; it just needs a rebase before it can be verified against today's tree. Nothing else from me on this one.

@dcastell1

Copy link
Copy Markdown

Correction to my line above: by the time I posted it the PR had already moved (base=f087b998, head=50e4805b, GitHub reports mergeable=CONFLICTING). The failed hunk was measured against main@1a0bbe3, which is the current tree; the "declared base" number in my previous comment is stale. Rebasing on f087b998 or later is what is needed.

@throny throny added the goal:world-load Bears on the retail title getting past world loading label Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

goal:world-load Bears on the retail title getting past world loading

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants