Files
metal2vulkan/docs
Anees Iqbal cb6c971456 fd blocks: dma-buf only, every image there a DRM_FORMAT_MOD_LINEAR one
The validation layer on RADV PHOENIX reported
VUID-VkExportMemoryAllocateInfo-handleTypes-09860 at every bind of a
linear-tiling image into a block allocated exportable as opaque fd and
dma-buf (32 reports over three exported_textures tests, m3-max-10768):
the handle types of an allocation must be supported for the resources
in it, and RADV's image format query takes a dma-buf for no image of
linear tiling (ERROR_FORMAT_NOT_SUPPORTED for formats 9, 16, 37, 44,
64, 97), while it takes an opaque fd for a DRM_FORMAT_MOD_LINEAR image
only from a dedicated allocation (VUID-VkMemoryAllocateInfo-pNext-00639).
No dual-handle block holds either image kind validly.

So the blocks are dma-buf only (FD_BLOCKS_HANDLE), taken where the
device exports a pooled dma-buf for both buffer usages and enables
VK_EXT_image_drm_format_modifier. Every image there is a
DRM_FORMAT_MOD_LINEAR one naming that handle type: where the device's
linear image (made to be measured, never bound) lies on Metal's
layout, one of that layout, gated as before on the FdBlocks first-move
verdict for the texture's row ends and free of the pitched cost bound,
as base's linear form is; else the pitched path at Metal's pitch under
the FdBlocks verdicts. Both count as pooled pitched images.
fd_blocks_take is unchanged. CHECK_VERSION 15, as the class's images
changed. FdExport::compatible and Memory::fd_handles are gone.

Verified: nothing yet; built on gem10 next.
(cherry picked from commit 2b4919bd9e54635c7192b425bb740d9a77f57ec7)
2026-11-09 01:44:40 -08:00
..