[Mesa-dev] [PATCH v2 06/32] anv: Implement VK_EXT_external_memory_dma_buf
Chad Versace
chadversary at chromium.org
Wed Nov 29 20:32:16 UTC 2017
On Tue 28 Nov 2017, Jason Ekstrand wrote:
> This is a modified version of the patch originally sent by Chad Versace.
> The primary difference is that this version claims that OPQAUE_FD and
> DMA_BUF are compatible handle types.
> ---
> src/intel/vulkan/anv_device.c | 13 ++++++-------
> src/intel/vulkan/anv_extensions.py | 1 +
> src/intel/vulkan/anv_formats.c | 8 ++++++--
> 3 files changed, 13 insertions(+), 9 deletions(-)
> @@ -923,6 +925,7 @@ VkResult anv_GetPhysicalDeviceImageFormatProperties2KHR(
> if (external_info && external_info->handleType != 0) {
> switch (external_info->handleType) {
> case VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR:
> + case VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT:
I reflexively perceive this hunk as incorrect. My instinct screams "No!
We we must allow binding VkImage to dma-buf-backed VkDeviceMemory *only*
when the VkImage is simple.". Of course, all the discussions around
VK_EXT_queue_family_foreign changed that requirement. It will take some
time to re-orient my intuition here.
> if (external_props)
> external_props->externalMemoryProperties = prime_fd_props;
> break;
More information about the mesa-dev
mailing list