Reputation: 3951
From the official Vulkan Programming Guide:
The pQueuePriorities field is an optional pointer to an array of floating point values representing the relative priority of work submitted to each of the queues. These numbers are normalized numbers in the range of 0.0 to 1.0. Queues with higher priority may be allocated more processing resources or scheduled more aggressively than queues with lower priority. Setting pQueuePriorities to nullptr has the effect of leaving the queues at the same, default priority
However, when I enable the VK_LAYER_KHRONOS_validation
layer I get the following error:
VUID-VkDeviceQueueCreateInfo-pQueuePriorities-parameter(ERROR / SPEC): msgNum: -690544442 - Validation Error: [ VUID-VkDeviceQueueCreateInfo-pQueuePriorities-parameter ] Object 0: VK_NULL_HANDLE, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xd6d720c6 | vkCreateDevice: required parameter pCreateInfo->pQueueCreateInfos[0].pQueuePriorities specified as NULL. The Vulkan spec states: pQueuePriorities must be a valid pointer to an array of queueCount float values (https://vulkan.lunarg.com/doc/view/1.2.176.1/linux/1.2-extensions/vkspec.html#VUID-VkDeviceQueueCreateInfo-pQueuePriorities-parameter)
Should I consider that error as a warning? Or is the book just wrong?
Upvotes: 3
Views: 575
Reputation: 474176
The nice thing about the modern Vulkan validation layers is that they directly cite the validation rules they relate to. And their citations are searchable, as each validation rule has a unique name. So if you search for "VUID-VkDeviceQueueCreateInfo-pQueuePriorities-parameter" in the Vulkan specification, you'll find exactly one match:
pQueuePriorities
must be a valid pointer to an array ofqueueCount
float values
And of course, the one below that says:
queueCount
must be greater than 0
So this is an error in the book. And I even checked the old Vulkan 1.0.10 specification (the oldest one I have) to make sure that yes, this parameter was always required to be provided. Maybe it was optional in pre-publication days, but I don't know of a released version where it was optional.
Upvotes: 4