CI: 2 unit tests failing on main after PR #2120 and D3D12.X UAV format promotion merges #2233

Closed
opened 2026-11-25 11:08:53 +00:00 by heditrigui · 1 comment
heditrigui commented 2026-11-25 11:08:53 +00:00 (Migrated from github.com)
Contributor

Imported from ivall/xcl. Originally posted by heditrigui on 2026-11-25T11:08:53Z.


Two unit tests under cargo test -p xcl --lib are failing on main (visible on recent push runs including 45599963095 and 45601040540):

1. gpu::recomp::pso::shader_cache_tests::rerouted_disk_entries_follow_the_direct_translator

Failure:
thread 'gpu::recomp::pso::shader_cache_tests::rerouted_disk_entries_follow_the_direct_translator' panicked at crates\xcl\src\gpu\recomp\pso.rs:1360:9: assertion left == right failed left: 68 right: 1

Root cause:
In crates/xcl/src/gpu/recomp/pso.rs:1351-1358:
ust let go = |blob: &[u8], version: u64, marker: u8, rerouted: bool, calls: &mut u32| { cached_rerouted(&dir, ident, version, blob, Stage::Compute, 0, 1, true, || { *calls += 1; Ok((compiled(marker), rerouted)) }) .unwrap() .dxil[0] };
compiled(marker) was updated in commit 743a612 to return synthetic_dxil(marker), which begins with "DXBC" ('D' = 68) at byte 0 and embeds marker at index 67 ([67] = marker;). Because line 1357 indexes .dxil[0], go(...) evaluates to 68 instead of marker, failing the assertion ssert_eq!(go(..., 1), 1).

Fix:
Change .dxil[0] to .dxil[67] at line 1357 (matching line 1328's ssert_eq!(other.dxil[67], 4)).


2. hle::d3d12x::device_x::tests::pc_resource_desc_strips_uav_on_unsupported_formats_and_msaa

Failure:
thread 'hle::d3d12x::device_x::tests::pc_resource_desc_strips_uav_on_unsupported_formats_and_msaa' panicked at crates\xcl\src\hle\d3d12x\device_x.rs:1376:13: assertion left == right failed: format 85 kept left: 28 right: 85

Root cause:
In crates/xcl/src/hle/d3d12x/device_x.rs:776-777:
ust if (matches!(format, 86 | 115) && flags & 5 != 0) || (format == 85 && flags & 4 != 0) { d[0x20..0x24].copy_from_slice(&28u32.to_le_bytes()); }
B5G6R5_UNORM (format 85) carrying ALLOW_UNORDERED_ACCESS (0x4) is promoted to R8G8B8A8_UNORM (format 28).

However, in pc_resource_desc_strips_uav_on_unsupported_formats_and_msaa (line 1372):
ust 85, 88, 89, 92, // B5G6R5, B8G8R8X8, XR_BIAS
The test passes flags

<!-- greyfinch-sync:ivall/xcl:issue:6603113994 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/2242). Originally posted by [heditrigui](https://github.com/heditrigui) on 2026-11-25T11:08:53Z. --- Two unit tests under cargo test -p xcl --lib are failing on main (visible on recent push runs including 45599963095 and 45601040540): ### 1. gpu::recomp::pso::shader_cache_tests::rerouted_disk_entries_follow_the_direct_translator **Failure:** ` thread 'gpu::recomp::pso::shader_cache_tests::rerouted_disk_entries_follow_the_direct_translator' panicked at crates\xcl\src\gpu\recomp\pso.rs:1360:9: assertion left == right failed left: 68 right: 1 ` **Root cause:** In crates/xcl/src/gpu/recomp/pso.rs:1351-1358: ` ust let go = |blob: &[u8], version: u64, marker: u8, rerouted: bool, calls: &mut u32| { cached_rerouted(&dir, ident, version, blob, Stage::Compute, 0, 1, true, || { *calls += 1; Ok((compiled(marker), rerouted)) }) .unwrap() .dxil[0] }; ` compiled(marker) was updated in commit 743a612 to return synthetic_dxil(marker), which begins with "DXBC" ('D' = 68) at byte 0 and embeds marker at index 67 ([67] = marker;). Because line 1357 indexes .dxil[0], go(...) evaluates to 68 instead of marker, failing the assertion ssert_eq!(go(..., 1), 1). **Fix:** Change .dxil[0] to .dxil[67] at line 1357 (matching line 1328's ssert_eq!(other.dxil[67], 4)). --- ### 2. hle::d3d12x::device_x::tests::pc_resource_desc_strips_uav_on_unsupported_formats_and_msaa **Failure:** ` thread 'hle::d3d12x::device_x::tests::pc_resource_desc_strips_uav_on_unsupported_formats_and_msaa' panicked at crates\xcl\src\hle\d3d12x\device_x.rs:1376:13: assertion left == right failed: format 85 kept left: 28 right: 85 ` **Root cause:** In crates/xcl/src/hle/d3d12x/device_x.rs:776-777: ` ust if (matches!(format, 86 | 115) && flags & 5 != 0) || (format == 85 && flags & 4 != 0) { d[0x20..0x24].copy_from_slice(&28u32.to_le_bytes()); } ` B5G6R5_UNORM (format 85) carrying ALLOW_UNORDERED_ACCESS (0x4) is promoted to R8G8B8A8_UNORM (format 28). However, in pc_resource_desc_strips_uav_on_unsupported_formats_and_msaa (line 1372): ` ust 85, 88, 89, 92, // B5G6R5, B8G8R8X8, XR_BIAS ` The test passes flags
b3IKK commented 2026-11-25 12:06:17 +00:00 (Migrated from github.com)
Author
Contributor

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


Thank you — this is exactly the two failures, and the root causes you give are right (marker at byte 67 in synthetic_dxil; 85 → 28 and 88 → 87 promotions with the UAV flag kept).

#2245 fixes both: .dxil[67] in the pso test, and the format loop now asserts the flag stays for the two promoted formats and is stripped for the rest. On this machine the suite goes from 2 failed to 1243 passed, 0 failed, 46 ignored, and the PR has the smoke pair the description check asks for (the files are under crates/xcl/src). AI use: OpenCode, Claude Fable 5.2.

<!-- greyfinch-sync:ivall/xcl:comment:7160870308 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/2242#issuecomment-7160870308). Originally posted by [b3IKK](https://github.com/b3IKK) on 2026-11-25T11:18:24Z. --- Thank you — this is exactly the two failures, and the root causes you give are right (marker at byte 67 in `synthetic_dxil`; 85 → 28 and 88 → 87 promotions with the UAV flag kept). #2245 fixes both: `.dxil[67]` in the pso test, and the format loop now asserts the flag stays for the two promoted formats and is stripped for the rest. On this machine the suite goes from 2 failed to **1243 passed, 0 failed, 46 ignored**, and the PR has the smoke pair the description check asks for (the files are under `crates/xcl/src`). AI use: OpenCode, Claude Fable 5.2.
Sign in to join this conversation.
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#2233
No description provided.