diff options
author | Jason Ekstrand <[email protected]> | 2017-11-27 18:43:43 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-12-04 10:04:19 -0800 |
commit | 546e747867c91a0738a145ff5bc0825f4afac1a3 (patch) | |
tree | fce3a6324718d18edee1f2a62b51f99bebf8f9fc /src/amd/vulkan/radv_formats.c | |
parent | ab18e8e59b6212003eb223d633070b3f9efd6e4d (diff) |
radv: Implement VK_EXT_external_memory_dma_buf
Reviewed-by: Dave Airlie <[email protected]>
Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_formats.c')
-rw-r--r-- | src/amd/vulkan/radv_formats.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/amd/vulkan/radv_formats.c b/src/amd/vulkan/radv_formats.c index 5c79ea74069..c008c1bae67 100644 --- a/src/amd/vulkan/radv_formats.c +++ b/src/amd/vulkan/radv_formats.c @@ -1182,7 +1182,8 @@ get_external_image_format_properties(const VkPhysicalDeviceImageFormatInfo2KHR * switch (pImageFormatInfo->type) { case VK_IMAGE_TYPE_2D: flags = VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_KHR|VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_KHR|VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_KHR; - compat_flags = export_flags = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR; + compat_flags = export_flags = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR | + VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT; break; default: break; @@ -1241,6 +1242,7 @@ VkResult radv_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: get_external_image_format_properties(base_info, &external_props->externalMemoryProperties); break; default: @@ -1309,9 +1311,11 @@ void radv_GetPhysicalDeviceExternalBufferPropertiesKHR( VkExternalMemoryHandleTypeFlagsKHR compat_flags = 0; switch(pExternalBufferInfo->handleType) { case VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR: + case VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT: flags = VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_KHR | VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_KHR; - compat_flags = export_flags = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR; + compat_flags = export_flags = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR | + VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT; break; default: break; |