Files
metal2vulkan/crates/metal2vulkan-runtime/src/dma_buf
Anees Iqbal 9136d850d3 RUNTIME 2507: Parked images: destroy each in an exit-guard section, and before their pages' memory goes
What: dma_buf/parked.rs's release enters a section of the exit guard around each parked image's
vkDestroyImage (its shared.vk() included), leaving the image to the process's end while it exits,
as DmaBufPages's drop leaves the import. FixedPages releases its parked images inside its own
section and before its memory is freed or recycled (and before the free on a lost generation),
as the parked.rs docs say. The exported parking test now has the residency thread's own pass
release the parked images (import tax forced Holds), not the test thread's sweep.

Why: on the 780M, tests::exported_textures::an_nv12_picture_s_planes_over_exported_memory_go_in_place_naming_its_handle_type
ended in SIGABRT in parallel runs (m3-max-38587, and run 2 of 3 in m3-max-38611):
"metal2vulkan: the runtime's thread metal2vulkan-residency reached the device outside an
exit-guard section". The residency thread's pass (release_idle_parked) calls parked::release,
whose shared.vk() was read outside any section; a test build ends the process there
(exit_guard::check). Since exported images park (RUNTIME 2505), RADV's residency releases them
at its next pass, so the path runs on the thread in most tests over exported memory; the
host-page parked images took the same path before.

Verified: the 780M (m3-max-38630): the parallel 7-test set (exported_textures and
dma_buf_parked_images) 3 times, 7/7 each, no abort (before: 2 of 4 parallel runs aborted,
m3-max-38587 and m3-max-38611). msi: clippy --cfg m2v_gpu and the archive (m3-max-38621);
plain and --cfg m2v_cpu_icd clippy, lavapipe 20/20 (m3-max-38622).
2026-11-16 18:46:37 -08:00
..