vulkan/runtime: Use DMA_BUF to import anb

Switch to using DMA_BUF to import android native buffers instead of
opaque FDs since more drivers (like lavapipe) can support dma bufs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29344>
This commit is contained in:
Lucas Fryzek
2024-06-25 08:39:45 +01:00
committed by Marge Bot
parent df96cac2cf
commit cfd897bae0

View File

@@ -283,7 +283,7 @@ vk_android_import_anb(struct vk_device *device,
const VkImportMemoryFdInfoKHR import_info = {
.sType = VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR,
.pNext = &ded_alloc,
.handleType = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT,
.handleType = VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT,
.fd = os_dupfd_cloexec(native_buffer->handle->data[0]),
};