From: Jason Ekstrand Date: Tue, 14 Mar 2017 02:30:26 +0000 (-0700) Subject: anv: Properly enumerate physical devices when none are present X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=aed27141452ab894ba62358e6a88fd681eff09c7;p=mesa.git anv: Properly enumerate physical devices when none are present --- diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index d8eafb98ee3..5d1bbf60859 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -412,8 +412,11 @@ VkResult anv_EnumeratePhysicalDevices( } } - vk_outarray_append(&out, i) { - *i = anv_physical_device_to_handle(&instance->physicalDevice); + if (instance->physicalDeviceCount > 0) { + assert(instance->physicalDeviceCount == 1); + vk_outarray_append(&out, i) { + *i = anv_physical_device_to_handle(&instance->physicalDevice); + } } return vk_outarray_status(&out);