diff options
author | Chad Versace <[email protected]> | 2016-12-27 10:25:58 -0800 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2017-01-24 01:13:24 +0000 |
commit | 9c4ebd16e9253e1d9e69af6fe2ae368b3e3d10c1 (patch) | |
tree | 64122b77f934bd0ae7a12081dbd2249381771d08 /src/intel | |
parent | 0ca96e995e21cc6f3e44d33b32103fa9a8089a68 (diff) |
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)
Diffstat (limited to 'src/intel')
-rw-r--r-- | src/intel/vulkan/anv_device.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 9a315b9ae93..d92e95e84d0 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -616,7 +616,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 | |