[Mesa-dev] [PATCH] anv: Handle vkGetPhysicalDeviceQueueFamilyProperties with count == 0
Anuj Phogat
anuj.phogat at gmail.com
Tue Dec 27 19:35:13 UTC 2016
On Tue, Dec 27, 2016 at 10:30 AM, Chad Versace <chadversary at chromium.org> wrote:
>
> The spec implicitly allows the incoming count to be 0. From the Vulkan
> 1.0.38 spec, Section 4.1 Physical Devices:
>
> If the value referenced by pQueueFamilyPropertyCount is not 0 [then
> do stuff].
>
> Cc: Damien Grassart <damien at grassart.com>
> ---
> src/intel/vulkan/anv_device.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
> index 037ef827e1..323cae4029 100644
> --- a/src/intel/vulkan/anv_device.c
> +++ b/src/intel/vulkan/anv_device.c
> @@ -646,7 +646,14 @@ void anv_GetPhysicalDeviceQueueFamilyProperties(
> return;
> }
>
> - assert(*pCount >= 1);
> + /* The spec implicitly allows the incoming count to be 0. From the Vulkan
> + * 1.0.38 spec, Section 4.1 Physical Devices:
> + *
> + * If the value referenced by pQueueFamilyPropertyCount is not 0 [then
> + * do stuff].
> + */
> + if (*pCount == 0)
> + return;
>
> *pQueueFamilyProperties = (VkQueueFamilyProperties) {
> .queueFlags = VK_QUEUE_GRAPHICS_BIT |
> --
> 2.11.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Reviewed-by: Anuj Phogat <anuj.phogat at gmail.com>
More information about the mesa-dev
mailing list