diff --git a/crates/xcl/src/hle/d3d12x/device_x.rs b/crates/xcl/src/hle/d3d12x/device_x.rs index 4b6d32aa79..944ca17560 100644 --- a/crates/xcl/src/hle/d3d12x/device_x.rs +++ b/crates/xcl/src/hle/d3d12x/device_x.rs @@ -1110,7 +1110,12 @@ mod tests { let mut r: Option = None; dev.CreatePlacedResource(&heap, 0, &d, D3D12_RESOURCE_STATES(state as i32), None, &mut r).map(|_| r) }; - assert!(place(0x8 & real::PC_RESOURCE_STATES).is_err(), "UNORDERED_ACCESS without the UAV flag"); + // Microsoft's runtime refuses this state for a resource without the UAV flag. vkd3d-proton + // (under Wine) does not check it and creates the resource, so the refusal is asserted on + // Windows only; the state XCL asks for is checked on both below. + if !crate::util::under_wine() { + assert!(place(0x8 & real::PC_RESOURCE_STATES).is_err(), "UNORDERED_ACCESS without the UAV flag"); + } let state = pc_initial_state(6, 0x8); assert_eq!(state, D3D12_RESOURCE_STATE_DEPTH_WRITE.0 as u32); let r = place(state).unwrap_or_else(|e| panic!("placed in {state:#x}: {e}"));