anv: fix VkExternalBufferProperties for unsupported handles
authorChia-I Wu <olvaffe@gmail.com>
Sat, 6 Jul 2019 19:02:51 +0000 (12:02 -0700)
committerChia-I Wu <olvaffe@gmail.com>
Sun, 7 Jul 2019 20:31:58 +0000 (13:31 -0700)
compatibleHandleTypes must include the queried handle type.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/intel/vulkan/anv_formats.c

index 3f18553023cac06df1bf4ea195cce36f5627d196..8a5b6827666d2e3af7886df2a61f6a060c3bd566 100644 (file)
@@ -1170,8 +1170,14 @@ void anv_GetPhysicalDeviceExternalBufferProperties(
    }
 
  unsupported:
+   /* From the Vulkan 1.1.113 spec:
+    *
+    *    compatibleHandleTypes must include at least handleType.
+    */
    pExternalBufferProperties->externalMemoryProperties =
-      (VkExternalMemoryProperties) {0};
+      (VkExternalMemoryProperties) {
+         .compatibleHandleTypes = pExternalBufferInfo->handleType,
+      };
 }
 
 VkResult anv_CreateSamplerYcbcrConversion(