Files
metal2vulkan/docs
Anees Iqbal e6124818d9 A recovery carries Private exportable buffers over their own memory
What: Buffer::carry takes a Private buffer in exportable memory (no host
copy) to the new generation over its block's payload imported again
(Device::buffer_in_carried_export, memory::place_carried_export): the lost
block is exported once from the lost VkDevice (memory::carried_payload,
vkGetMemoryFdKHR, which the spec lets a lost device answer) and that
descriptor is kept on the block (Block::payload); the new VkDevice imports
a clone of it (Handed) once for every buffer carried from the block, as
memory of the block's own type and allocation size with the device-address
flag of the device's blocks, dedicated to the buffer where the lost block
was a dma-buf's dedicated allocation, and binds each buffer at its offset.
The buffer is not cleared: another API's import (VA-API) reaches the same
memory and may be writing it, so it keeps whatever the memory holds, counted
among the buffers carried with their contents. Its exports after the
recovery answer a clone of the kept descriptor, and so does the dma-buf a
texture's image over it imports (ExportedTexels::payload), so textures over
it carry as over any carried buffer. Left refused: Shared and Managed
exportable buffers (their contents pointer is the lost mapping), and an
opaque descriptor's dedicated allocation, a new kind in the notice
(Left::DedicatedOpaqueFd: VUID-VkMemoryDedicatedAllocateInfo-buffer-01879
names a buffer identical to the payload's, which Vulkan does not define
across devices). Docs: exported_memory.rs, device/carry.rs, buffer.rs,
MadeBeforeRecovery, the device-recovered cost (degradation.rs, API.md) and
the runtime README, with the exception to the Private-reads-zero rule.

Why: reims's NV12/P010 device caches are Private exportable buffers
(STORAGE_PRIVATE in surface_cache.rs and vaapi.rs, read-only check) that
VA-API decodes into; a recovery left them refused, failing a video
session's frames, where Metal keeps the buffer.

Verified: the lane that follows runs the test before and after on lavapipe;
REFUSALS.md regenerated (no change).
2026-11-12 18:02:50 -08:00
..