summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_device.c
diff options
context:
space:
mode:
authorChad Versace <[email protected]>2016-12-27 10:25:58 -0800
committerChad Versace <[email protected]>2016-12-27 12:31:34 -0800
commitd6545f234593fb00d02fdc07f9b2a803d2b569f6 (patch)
tree42029a58b8d04132289aa0799f37d098704f0096 /src/intel/vulkan/anv_device.c
parentb85c0b569fe133b71a767a068e8608868158134e (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]>
Diffstat (limited to 'src/intel/vulkan/anv_device.c')
-rw-r--r--src/intel/vulkan/anv_device.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 037ef827e15..323cae40292 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 |