mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
anv: Return correct result in EnumeratePhysicalDevices
If pPhysicalDevices is too small for all physical devices, the driver must return VK_INCOMPLETE. Since only a single physical device is supported, this is only the case when pPhysicalDeviceCount == 0 && pPhysicalDevices != NULL. Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
parent
2871d4d687
commit
fd27d5fd92
1 changed files with 2 additions and 0 deletions
|
|
@ -385,6 +385,8 @@ VkResult anv_EnumeratePhysicalDevices(
|
|||
} else if (*pPhysicalDeviceCount >= 1) {
|
||||
pPhysicalDevices[0] = anv_physical_device_to_handle(&instance->physicalDevice);
|
||||
*pPhysicalDeviceCount = 1;
|
||||
} else if (*pPhysicalDeviceCount < instance->physicalDeviceCount) {
|
||||
return VK_INCOMPLETE;
|
||||
} else {
|
||||
*pPhysicalDeviceCount = 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue