Tests: two expectations that no longer match the code #2235

Merged
b3IKK merged 1 commit from upstream-pr/2245 into main 2026-11-25 11:19:13 +00:00
b3IKK commented 2026-11-25 11:11:43 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by b3IKK on 2026-11-25T11:11:43Z.


Fixes #2242.
Fixes #2248.

main (9633138) fails two of its own tests on this machine, so every PR's .\scripts\test.ps1 is red for reasons unrelated to the PR:

  • gpu::recomp::pso::shader_cache_tests::rerouted_disk_entries_follow_the_direct_translator read the marker at byte 0 of the synthetic DXIL that compiled() builds. Since the translated cache checks that an entry is a DXIL container, marker 1 sits at byte 67 and byte 0 is 'D' (68): the test compared 68 with 1 (left: 68, right: 1).
  • hle::d3d12x::device_x::tests::pc_resource_desc_strips_uav_on_unsupported_formats_and_msaa required formats 85 (B5G6R5) and 88 (B8G8R8X8) to come through unchanged. pc_resource_desc promotes them to 28 (R8G8B8A8) and 87 (B8G8R8A8) — a PC driver takes neither as a UAV — and ALLOW_UNORDERED_ACCESS is valid on the promoted format, so it stays. The flag assertion only holds for the formats left as they are (left: 4, right: 0 at format 85).

Both are stale expectations of the tests, not regressions of the code: the promotions and the container check are deliberate and are what their own tests elsewhere assert (28 for a B5G5R5A1 target at pc_resource_desc, and the 68-byte synthetic container).

What is in it

  • crates/xcl/src/gpu/recomp/pso.rs: read the marker at byte 67, with a comment saying why.
  • crates/xcl/src/hle/d3d12x/device_x.rs: in the loop over formats without typed-UAV support, assert the flag is kept for the two promoted formats and stripped (and the format unchanged) for the rest.

Tested

  • hardware (GPU + driver, CPU), Windows build, Rust version, debug: NVIDIA GeForce RTX 5080 (driver 32.0.16.1088), AMD Ryzen 9 9950X3D, Windows 11 10.0.26300, Rust 1.100.0 (stable-x86_64-pc-windows-msvc), DXC 1.9.2609.5
  • .\scripts\test.ps1 (cargo build --workspace + cargo test --workspace -- --test-threads=4) on this head: 1243 passed, 0 failed, 46 ignored (the same command on unmodified main 9633138 here: 2 failed)
  • both tests individually: 2 passed, 0 failed

Regression run

main (9633138, clean tree, no local changes):

xcl-smoke v1
commit: 963313835813f475037b3a9f5fcc3cb591696928
gpu: NVIDIA GeForce RTX 5080
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1639 (PresentX 1639)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15205 MB

PR (0d13b07, clean tree, no local changes):

xcl-smoke v1
commit: 0d13b071a55caaf4cc1ab5a73298139006edd7c6
gpu: NVIDIA GeForce RTX 5080
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1652 (PresentX 1652)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15187 MB

Not tested

  • other GPUs, AMD and native wave64 hardware, and CI's own runner: the two tests are CPU-side, but CI is the check that matters for them
  • whether a second copy of either failure exists elsewhere; I searched the suite by running it, not by reading every test

AI use

  • OpenCode, Claude Fable 5.2: ran main's suite, traced both failures to the tests' expectations, fixed them, ran the suite again and the scripts/smoke.ps1 pair.
<!-- greyfinch-sync:ivall/xcl:issue:6603167025 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2245). Originally posted by [b3IKK](https://github.com/b3IKK) on 2026-11-25T11:11:43Z. --- Fixes #2242. Fixes #2248. `main` (9633138) fails two of its own tests on this machine, so every PR's `.\scripts\test.ps1` is red for reasons unrelated to the PR: - `gpu::recomp::pso::shader_cache_tests::rerouted_disk_entries_follow_the_direct_translator` read the marker at byte 0 of the synthetic DXIL that `compiled()` builds. Since the translated cache checks that an entry is a DXIL container, marker `1` sits at byte 67 and byte 0 is `'D'` (68): the test compared `68` with `1` (`left: 68, right: 1`). - `hle::d3d12x::device_x::tests::pc_resource_desc_strips_uav_on_unsupported_formats_and_msaa` required formats 85 (B5G6R5) and 88 (B8G8R8X8) to come through unchanged. `pc_resource_desc` promotes them to 28 (R8G8B8A8) and 87 (B8G8R8A8) — a PC driver takes neither as a UAV — and `ALLOW_UNORDERED_ACCESS` is valid on the promoted format, so it stays. The flag assertion only holds for the formats left as they are (`left: 4, right: 0` at format 85). Both are stale expectations of the tests, not regressions of the code: the promotions and the container check are deliberate and are what their own tests elsewhere assert (28 for a B5G5R5A1 target at `pc_resource_desc`, and the 68-byte synthetic container). **What is in it** - `crates/xcl/src/gpu/recomp/pso.rs`: read the marker at byte 67, with a comment saying why. - `crates/xcl/src/hle/d3d12x/device_x.rs`: in the loop over formats without typed-UAV support, assert the flag is kept for the two promoted formats and stripped (and the format unchanged) for the rest. **Tested** - hardware (GPU + driver, CPU), Windows build, Rust version, debug: NVIDIA GeForce RTX 5080 (driver 32.0.16.1088), AMD Ryzen 9 9950X3D, Windows 11 10.0.26300, Rust 1.100.0 (`stable-x86_64-pc-windows-msvc`), DXC 1.9.2609.5 - `.\scripts\test.ps1` (`cargo build --workspace` + `cargo test --workspace -- --test-threads=4`) on this head: **1243 passed, 0 failed, 46 ignored** (the same command on unmodified `main` `9633138` here: 2 failed) - both tests individually: 2 passed, 0 failed **Regression run** main (`9633138`, clean tree, no local changes): ``` xcl-smoke v1 commit: 963313835813f475037b3a9f5fcc3cb591696928 gpu: NVIDIA GeForce RTX 5080 title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1639 (PresentX 1639) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15205 MB ``` PR (`0d13b07`, clean tree, no local changes): ``` xcl-smoke v1 commit: 0d13b071a55caaf4cc1ab5a73298139006edd7c6 gpu: NVIDIA GeForce RTX 5080 title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1652 (PresentX 1652) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15187 MB ``` **Not tested** - other GPUs, AMD and native wave64 hardware, and CI's own runner: the two tests are CPU-side, but CI is the check that matters for them - whether a second copy of either failure exists elsewhere; I searched the suite by running it, not by reading every test **AI use** - OpenCode, Claude Fable 5.2: ran `main`'s suite, traced both failures to the tests' expectations, fixed them, ran the suite again and the `scripts/smoke.ps1` pair.
upstream-sync closed this pull request 2026-11-25 12:05:59 +00:00
ivall commented 2026-11-25 12:06:18 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ivall on 2026-11-25T11:19:14Z.


Merged as 426a5a7, thank you. This unblocks CI on main.

Tested the merged tree (9633138 + this) on AMD RDNA4, Windows, DXC 1.8.2502.11, debug: cargo build --workspace, then cargo test --workspace --no-fail-fast -- --test-threads=4: 1240 passed, 3 failed, 46 ignored, 7 SKIPPED (6 per-lane refusals, 1 no heap windows). Both tests fixed here pass. The 3 failures are on main too: fuzz_validate_and_gpu_1 and _3 (#2115), and gpu_image_get_resinfo_past_last_level, which fails every time on this card: for a mip past the last level the driver gives the sizes of a clamped mip, not 0 as the test and RDNA2 want.

@raylitebull #2233 fixes the same two tests. I took this one because its checks were green and it also checks that 85 and 88 become 28 and 87 with the flag kept. Please close #2233 if you agree.

AI use: Claude Code (Claude Opus 5.5) read the diffs, ran the tests and wrote this on the maintainer's behalf.

<!-- greyfinch-sync:ivall/xcl:comment:7160888729 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2245#issuecomment-7160888729). Originally posted by [ivall](https://github.com/ivall) on 2026-11-25T11:19:14Z. --- Merged as `426a5a7`, thank you. This unblocks CI on `main`. Tested the merged tree (`9633138` + this) on AMD RDNA4, Windows, DXC 1.8.2502.11, debug: `cargo build --workspace`, then `cargo test --workspace --no-fail-fast -- --test-threads=4`: 1240 passed, 3 failed, 46 ignored, 7 SKIPPED (6 per-lane refusals, 1 no heap windows). Both tests fixed here pass. The 3 failures are on `main` too: `fuzz_validate_and_gpu_1` and `_3` (#2115), and `gpu_image_get_resinfo_past_last_level`, which fails every time on this card: for a mip past the last level the driver gives the sizes of a clamped mip, not 0 as the test and RDNA2 want. @raylitebull #2233 fixes the same two tests. I took this one because its checks were green and it also checks that 85 and 88 become 28 and 87 with the flag kept. Please close #2233 if you agree. AI use: Claude Code (Claude Opus 5.5) read the diffs, ran the tests and wrote this 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!2235
No description provided.