Module: Mesa Branch: 12.0 Commit: 2b87bb9b90b30f8f5aeca4098f9ab27369d5aebc URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2b87bb9b90b30f8f5aeca4098f9ab27369d5aebc
Author: Chad Versace <[email protected]> Date: Tue Dec 27 10:25:58 2016 -0800 anv: Handle vkGetPhysicalDeviceQueueFamilyProperties with count == 0 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: [email protected] Reviewed-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> (cherry picked from commit d6545f234593fb00d02fdc07f9b2a803d2b569f6) --- 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 45dff1d..ab9380a 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -583,7 +583,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 | _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
