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

View File

@@ -412,9 +412,12 @@ VkResult anv_EnumeratePhysicalDevices(
} }
} }
if (instance->physicalDeviceCount > 0) {
assert(instance->physicalDeviceCount == 1);
vk_outarray_append(&out, i) { vk_outarray_append(&out, i) {
*i = anv_physical_device_to_handle(&instance->physicalDevice); *i = anv_physical_device_to_handle(&instance->physicalDevice);
} }
}
return vk_outarray_status(&out); return vk_outarray_status(&out);
} }