Function import_render_target
pub fn import_render_target(
device: &Device,
image: &DmabufRef<'_>,
) -> Result<ImportedRenderTarget, ImportError>Expand description
Import the one linear plane of a compositor-owned scanout buffer
(XRGB8888, XBGR2101010 or ABGR16161616F) as a render attachment on
device.
The allocation remains owned by the caller (normally a GBM buffer object). The returned Vulkan image and memory import are aliases and must be dropped before that allocation. Import once per scanout slot, never once per frame.
§Errors
Fails closed for every layout which cannot be described exactly without
VK_EXT_image_drm_format_modifier: other formats, more than one plane,
non-zero plane offsets, tiled/compressed modifiers, or a driver-selected
row pitch that differs from the producer’s stride.