Files
metal2vulkan/docs
Anees Iqbal 0cd1618247 Runtime tests: the two-copy view runs a Managed buffer's device-copy form on one-copy devices
No device in CI kept a device copy of a Managed buffer: lavapipe is a CPU device, so
Core::unified_memory() (rule 2's unified-memory form, decided by Vulkan's device type alone) is
true there, and every device test of the two-copy form returned at its unified-memory check or
took the one-copy arm. every_device_synchronizes_a_texture_over_a_managed_buffer passed vacuously
on lavapipe while the runtime recorded nothing for that synchronize on discrete cards (fixed in
d0f117f2a8). The integrated lab cards take the same one-copy arm.

DeviceOptions gains a test-only field beside `memory`, under the same
cfg(all(test, any(m2v_gpu, m2v_cpu_icd))): `two_copies`. Device::open reads it, under that gate
alone, where it decides `unified_memory`: where true the device keeps a device copy of every
Managed buffer whatever its device type, and Device::has_unified_memory answers false, as on a
discrete GPU; its Vulkan device, memory types and every other answer are its own. No product
build carries the field or its read, and tests/one_path.rs is untouched.

tests::command::on_device::each_device_in_both_forms runs `body` on each device in its own form
and, where the device keeps one copy, once more through the view (the run's name ends in
", two copies"). The tests a Managed buffer's form decides take it: those of tests::managed that
make a Managed buffer (not the two Managed-texture tests, nor the Shared variant of the
two-queue read), the three of tests::copy_over that read the form, two of tests::blit
(buffer-to-buffer, synchronize of a Managed buffer) and tests::over's texture held in place. So
the plain m2v_cpu_icd and m2v_gpu suites run the two-copy form on lavapipe and on the integrated
cards; a discrete card runs as before. docs/VALIDATION.md says so.

Verification: the jobs on lavapipe (the synchronize test failing with blit.rs and texture.rs at
e9f09c9a92 and passing here, and the device suite), the RTX 5080 and the Radeon 780M follow in the
lane's report.
2026-11-26 16:59:51 -08:00
..