KhronosGroup / Vulkan-ValidationLayers

Vulkan Validation Layers (VVL)
https://vulkan.lunarg.com/doc/sdk/latest/linux/khronos_validation_layer.html
Other
768 stars 404 forks source link

Error message slightly wrong for out-of-range queue index #8285

Closed io7m closed 3 months ago

io7m commented 3 months ago

Environment:

Describe the Issue

When calling vkGetDeviceQueue with a queue index that's greater than or equal to the queueCount that was used to create queues from the queue family, the error message seems to mix up the queue index and the queue family index:

VUID-vkGetDeviceQueue-queueIndex-00385: Validation Error: [ VUID-vkGetDeviceQueue-queueIndex-00385 ] | MessageID = 0x4b50ab6f | vkGetDeviceQueue(): queueFamilyIndex (1) is not less than the number of queues requested from queueFamilyIndex (=1) when the device was created vkCreateDevice::pCreateInfo->pQueueCreateInfos[1] (i.e. is not less than 1). The Vulkan spec states: queueIndex must be less than the value of VkDeviceQueueCreateInfo::queueCount for the queue family indicated by queueFamilyIndex when device was created (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkGetDeviceQueue-queueIndex-00385)

I believe that this should read:

VUID-vkGetDeviceQueue-queueIndex-00385: Validation Error: [ VUID-vkGetDeviceQueue-queueIndex-00385 ] | MessageID = 0x4b50ab6f | vkGetDeviceQueue(): queueIndex (1) is not less than the number of queues requested from queueFamilyIndex (=1) ...

Expected behavior

I think the error message should be referring to the queueIndex, not the queueFamilyIndex

Valid Usage ID

VUID-vkGetDeviceQueue-queueIndex-00385

Additional context

None.

io7m commented 3 months ago

To be clear: The queue family index was within bounds. The queue index was not within bounds, but the error message blamed the family index.

artem-lunarg commented 3 months ago

@io7m thanks for spotting this, that's indeed a wrong message.