From b8f8ed10aa29b3ddbc9495a2cce5c01d3e7b580d Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Thu, 25 Feb 2021 10:07:42 -0600 Subject: [PATCH] d3d12: Check for VK_KHR_external_memory_capabilities before using VkPhysicalDeviceIDProperties. Signed-off-by: Zebediah Figura Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/d3d12/d3d12_main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/d3d12/d3d12_main.c b/dlls/d3d12/d3d12_main.c index 3dd4ec796b0..388de0b56c2 100644 --- a/dlls/d3d12/d3d12_main.c +++ b/dlls/d3d12/d3d12_main.c @@ -265,7 +265,9 @@ static VkPhysicalDevice d3d12_get_vk_physical_device(struct vkd3d_instance *inst if ((vr = pfn_vkEnumeratePhysicalDevices(vk_instance, &count, vk_physical_devices)) < 0) goto done; - if (!IsEqualGUID(&adapter_info->driver_uuid, &GUID_NULL) && pfn_vkGetPhysicalDeviceProperties2) + if (!IsEqualGUID(&adapter_info->driver_uuid, &GUID_NULL) && pfn_vkGetPhysicalDeviceProperties2 + && check_vk_instance_extension(vk_instance, pfn_vkGetInstanceProcAddr, + VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME)) { TRACE("Matching adapters by UUIDs.\n"); @@ -331,6 +333,7 @@ HRESULT WINAPI D3D12CreateDevice(IUnknown *adapter, D3D_FEATURE_LEVEL minimum_fe }; static const char * const optional_instance_extensions[] = { + VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME, }; static const char * const device_extensions[] =