diff --git a/crates/metal2vulkan-runtime/src/tests/d3d11.rs b/crates/metal2vulkan-runtime/src/tests/d3d11.rs index 7083de5b2..61b08cf51 100644 --- a/crates/metal2vulkan-runtime/src/tests/d3d11.rs +++ b/crates/metal2vulkan-runtime/src/tests/d3d11.rs @@ -713,10 +713,14 @@ mod on_device { /// committed before `Surface::external_writes_done`: Direct3D 11 draws picture 1 and waits /// for its work, the planes are imported, and rt's read of them is committed and waited /// for with no `external_writes_done` before it; the consumer's call comes after it, and a - /// second read follows. Both reads are picture 1's exactly: what another API wrote before + /// second read follows. Both reads are picture 1's exactly, and every acquire, the first + /// included, names the general layout as its old layout: what another API wrote before /// the first acquire is kept whatever order the two calls arrived in. The first read's /// bytes that match picture 1 and that are zero, and each acquire's old layout - /// (`Work::acquired`, undefined 0, general 1), are printed. + /// (`Work::acquired`, undefined 0, general 1), are printed. The old layouts are the check + /// that holds on every driver: an acquire from the undefined layout need not keep the + /// bytes (section 12.5.1), and a driver may keep them anyway, as the UHD 630's did through + /// such an acquire (job m3-max-77834), so the bytes alone do not show the discard. #[test] fn every_device_reads_what_direct3d_11_drew_through_a_commit_ahead_of_external_writes_done() { @@ -758,6 +762,12 @@ mod on_device { after.0, None, "{name}: the read after external_writes_done is picture 1" ); + let general = vk::ImageLayout::GENERAL.as_raw(); + assert!( + !layouts.is_empty() && layouts.iter().all(|&layout| layout == general), + "{name}: every acquire of a plane, the first included, names the general \ + layout as its old layout: {layouts:?}" + ); }); }