From 7e41f7a32eb4c8916b25eef5456f81fd4d9f4832 Mon Sep 17 00:00:00 2001 From: raylitebull <287713799+raylitebull@users.noreply.github.com> Date: Wed, 25 Nov 2026 11:51:10 +0100 Subject: [PATCH 1/2] Tests: align device_x UAV strip test with B5G6R5/B8G8R8X8 promotion --- crates/xcl/src/hle/d3d12x/device_x.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/crates/xcl/src/hle/d3d12x/device_x.rs b/crates/xcl/src/hle/d3d12x/device_x.rs index 152431e22e..0712a62696 100644 --- a/crates/xcl/src/hle/d3d12x/device_x.rs +++ b/crates/xcl/src/hle/d3d12x/device_x.rs @@ -1369,13 +1369,16 @@ mod tests { 40, 44, 45, 55, // D32 / R24G8 / D24S8 / D16 65, 66, 68, 69, // A8, R1, R8G8_B8G8, G8R8_G8B8 70, 71, 72, 74, 77, 80, 83, 95, 98, 99, // BC1..BC7 - 85, 88, 89, 92, // B5G6R5, B8G8R8X8, XR_BIAS - 103, 107, // YUV (NV12, YUY2) + 89, 92, // XR_BIAS (B5G6R5=85 and B8G8R8X8=88 promote to 28/87 when UAV is requested) + 103, 107, // YUV (NV12, YUY2) ] { let (out_fmt, out_flags) = make(3, fmt, 1, 0x4); assert_eq!(out_fmt, fmt, "format {fmt} kept"); assert_eq!(out_flags & 0x4, 0, "format {fmt} must strip ALLOW_UNORDERED_ACCESS"); } + // Native B5G6R5 (85) and B8G8R8X8 (88) lack PC UAV support (promoted to 28/87 in pc_resource_desc): + assert!(!texture_format_allows_uav(85)); + assert!(!texture_format_allows_uav(88)); // Multisampled textures never support UAV even on UAV-capable formats: assert_eq!(make(3, 28, 4, 0x5), (28, 0x1)); assert_eq!(make(3, 27, 2, 0x4), (27, 0x0)); From 50e4805bd35e8ef04b9a846c715b0034e258a091 Mon Sep 17 00:00:00 2001 From: raylitebull <287713799+raylitebull@users.noreply.github.com> Date: Wed, 25 Nov 2026 12:00:43 +0100 Subject: [PATCH 2/2] Tests: read DXBC payload marker at offset 67 in rerouted_disk_entries_follow_the_direct_translator --- crates/xcl/src/gpu/recomp/pso.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/xcl/src/gpu/recomp/pso.rs b/crates/xcl/src/gpu/recomp/pso.rs index 743a31264e..8032ec078b 100644 --- a/crates/xcl/src/gpu/recomp/pso.rs +++ b/crates/xcl/src/gpu/recomp/pso.rs @@ -1354,7 +1354,7 @@ mod shader_cache_tests { Ok((compiled(marker), rerouted)) }) .unwrap() - .dxil[0] + .dxil[67] }; let mut calls = 0; assert_eq!(go(enormous_blob, 7, 1, true, &mut calls), 1);