diff --git a/crates/xcl/src/gpu/recomp/pso.rs b/crates/xcl/src/gpu/recomp/pso.rs index 743a31264..c9a50b72b 100644 --- a/crates/xcl/src/gpu/recomp/pso.rs +++ b/crates/xcl/src/gpu/recomp/pso.rs @@ -1354,7 +1354,8 @@ mod shader_cache_tests { Ok((compiled(marker), rerouted)) }) .unwrap() - .dxil[0] + // (`compiled`: a DXIL container whose marker byte is 67, not its first byte) + .dxil[67] }; let mut calls = 0; assert_eq!(go(enormous_blob, 7, 1, true, &mut calls), 1); diff --git a/crates/xcl/src/hle/d3d12x/device_x.rs b/crates/xcl/src/hle/d3d12x/device_x.rs index 152431e22..d1bc058dc 100644 --- a/crates/xcl/src/hle/d3d12x/device_x.rs +++ b/crates/xcl/src/hle/d3d12x/device_x.rs @@ -1373,8 +1373,14 @@ mod tests { 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"); + if matches!((fmt, out_fmt), (85, 28) | (88, 87)) { + // promoted to a format a PC driver takes as a UAV of the same values: the flag + // stays, and is valid there + assert_eq!(out_flags & 0x4, 0x4, "format {fmt} promoted to {out_fmt} keeps ALLOW_UNORDERED_ACCESS"); + } else { + assert_eq!(out_fmt, fmt, "format {fmt} kept"); + assert_eq!(out_flags & 0x4, 0, "format {fmt} must strip ALLOW_UNORDERED_ACCESS"); + } } // Multisampled textures never support UAV even on UAV-capable formats: assert_eq!(make(3, 28, 4, 0x5), (28, 0x1));