Files
metal2vulkan/docs
Anees Iqbal 005a54ea8d fd blocks: opaque fd only, every image there the device's linear image, behind a cover check
RADV PHOENIX asks a dedicated allocation of a DRM_FORMAT_MOD_LINEAR
image made for an opaque fd or a dma-buf (requiresDedicatedAllocation=1
for formats 9/16/37/44/64/97, m3-max-10880), and its image format query
takes a dma-buf for no linear-tiling image: the dma-buf blocks of
6798cf39a2 held no texture at all (all 1824 in-place layouts of the
placement test lost, m3-max-10884), and the FdBlocks check made nothing.
The one image such a block can hold there is the device's linear image
made for an opaque fd, and over a plain block's buffer no texture took a
DRM_FORMAT_MOD_LINEAR image at Metal's pitch (0 of 1824 over 20736
layouts): the driver takes no explicit pitch but its own.

So the blocks are exportable as an opaque fd again (FD_BLOCKS_HANDLE),
every texture over such a buffer the linear image made for it, gated on
the FdBlocks first-move verdict, and no pitched image there.

Guards, from documented queries and made-and-released images, never a
driver name:
- memory::fd_image_types, at device assembly: per memory type of the
  system heap, kept where a 64x4 linear image made for an opaque fd
  (R8, RG8, RGBA8, RGBA16F; format query exportable and not
  dedicated-only first) takes it wherever the plain linear image does,
  and not asking a dedicated allocation; the memory log names the kept
  types and why the others stay plain.
- Device::fd_blocks_cover (texture/fd_blocks_cover.rs), in the check's
  FdBlocks class: for every backed pixel format and the read, write and
  render usages, the opaque-fd linear image wherever the plain one is
  made, laid out the same (pitch, offset, size, alignment, types); and
  no DRM_FORMAT_MOD_LINEAR image of the device's own memory at a pitch
  other than its linear image's (probed at +256 and twice it). Else the
  class is unmade (lasting, so recorded), fd_blocks_take refuses, and
  the memory log says why.

Removed: the dma-buf block path, Device::modifier_takes_linear, the
probe-then-DRM linear slot, pooled_pitched_image's class parameter.
CHECK_VERSION 16.

Verified: nothing yet.
(cherry picked from commit 0b59a1700f0911b1024f83ed3be30f99fb5e23d8)
2026-11-09 01:44:40 -08:00
..