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

Manually merged
github merged 1 commit from gh-pr/2245/head into gh-pr/2245/base 2026-11-26 05:24:25 +00:00
Owner

@⁠b3IKK on GitHub · 2026-11-25 11:11 UTC · original
b3IKK:tests/main-suite-red → main · +10 −3 · 2 files · 1 commits · merged 2026-11-25 11:19 UTC

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.
**@⁠b3IKK** on GitHub · 2026-11-25 11:11 UTC · [original](https://github.com/xcl-dev/xcl/pull/2245) `b3IKK:tests/main-suite-red` → `main` · +10 −3 · 2 files · 1 commits · merged 2026-11-25 11:19 UTC 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.
Both tests fail on unmodified `main` (9633138), so every PR's suite is red for
reasons that have nothing to do with the PR:

- rerouted_disk_entries_follow_the_direct_translator read the marker at byte 0
  of the synthetic DXIL `compiled()` builds. Since the translated cache began
  checking that an entry is a DXIL container, marker 1 sits at byte 67 and byte
  0 is 'D' (68), so the test compared 68 with 1.
- 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) because a PC driver takes
  neither as a UAV, and ALLOW_UNORDERED_ACCESS is valid on the promoted format
  - so it stays there, and the flag assertion only holds for the formats that
  are left as they are.

Test-only: the two tests pass here, and the suite goes from 2 failed to 0.

Assisted-by: OpenCode (Claude Fable 5.2)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:24:24 +00:00
github manually merged commit 0d13b071a5 into gh-pr/2245/base 2026-11-26 05:24:25 +00:00
Author
Owner

@⁠ivall on GitHub · 2026-11-25 11:19 UTC · original

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.

**@⁠ivall** on GitHub · 2026-11-25 11:19 UTC · [original](https://github.com/xcl-dev/xcl/pull/2245#issuecomment-7160888729) 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.
This discussion has been locked. Commenting is limited to contributors.
No description provided.