anv: Properly enumerate physical devices when none are present

This commit is contained in:
Jason Ekstrand 2017-03-13 19:30:26 -07:00
parent 9d559ba39d
commit aed2714145
1 changed files with 5 additions and 2 deletions

View File

@ -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);