[Mesa-dev] [PATCH] anv: Return correct result in EnumeratePhysicalDevices

Nicolas Koch nioko1337 at gmail.com
Wed Oct 12 11:30:32 UTC 2016


On Wed, Oct 12, 2016 at 10:32 AM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> Hi Nicolas,
>
> On 6 October 2016 at 20:21, Nicolas Koch <nioko1337 at gmail.com> wrote:
>> 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.
>> ---
>>  src/intel/vulkan/anv_device.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
>> index c7b9979..76cbb69 100644
>> --- a/src/intel/vulkan/anv_device.c
>> +++ b/src/intel/vulkan/anv_device.c
>> @@ -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;
> Looks like RADV could use the exact same fix
> (s/intel/amd/;s/anv/radv/). Can you spin a patch for it ?
>
> -Emil

Sure, will do!


More information about the mesa-dev mailing list