anv: report HOST_ALLOCATION as supported for images
authorArcady Goldmints-Orlov <agoldmints@igalia.com>
Tue, 23 Jul 2019 19:36:48 +0000 (14:36 -0500)
committerArcady Goldmints-Orlov <agoldmints@igalia.com>
Thu, 25 Jul 2019 14:01:26 +0000 (09:01 -0500)
Report VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT as
supported for images. It was being shown supported for buffers, but not
images.

Fixes: 69cc6272fbc1 ("anv: Implement VK_EXT_external_memory_host")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/intel/vulkan/anv_formats.c

index 362d9ad6f27fe6de06d84008e337d90f9350c645..ceb62e345739fe7d2f4f6a1318794e5b7bba8114 100644 (file)
@@ -1079,6 +1079,10 @@ VkResult anv_GetPhysicalDeviceImageFormatProperties2(
          if (external_props)
             external_props->externalMemoryProperties = prime_fd_props;
          break;
+      case VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT:
+         if (external_props)
+            external_props->externalMemoryProperties = userptr_props;
+         break;
       case VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID:
          if (ahw_supported && external_props) {
             external_props->externalMemoryProperties = android_image_props;