Overv / VulkanTutorial

Tutorial for the Vulkan graphics and compute API
https://vulkan-tutorial.com
Creative Commons Attribution Share Alike 4.0 International
3.15k stars 516 forks source link

[Validation] Queue Families need to be unique #233

Closed hjred closed 3 years ago

hjred commented 3 years ago

Hello there,

when running the code in the tutorial and enabling validation, the following error is displayed:

Error: [ VUID-VkDeviceCreateInfo-queueFamilyIndex-00372 ] Object 0: handle = 0x19a6ef6f4b0, type = 
VK_OBJECT_TYPE_PHYSICAL_DEVICE; | MessageID = 0xde3cbaf | vkCreateDevice: 
pCreateInfo->pQueueCreateInfos[1].queueFamilyIndex (=0) is not unique within pCreateInfo->pQueueCreateInfos array. The
 Vulkan spec states: The queueFamilyIndex member of each element of pQueueCreateInfos must be unique within 
 pQueueCreateInfos (https://vulkan.lunarg.com/doc/view/1.2.170.0/windows/1.2-extensions/vkspec.html#VUID-
 VkDeviceCreateInfo-queueFamilyIndex-00372)

Looking it up (the anchor to the page seems to be wrong) and looking through the code it seems that the distinction between Graphics and Present Queue yields the same Index on my machine (NVIDIA card). The spec says, that it is an error to have multiple queueCreateInfos using the same index.

The respective code is located here: https://vulkan-tutorial.com/Drawing_a_triangle/Presentation/Window_surface

Btw. I love the tutorial, really big thanks for that :heart:

hjred commented 3 years ago

This is already taken care of, as I see now and is a bug in the code I'm looking at (which should be a 1-to-1 translation in C#, but is missing a set for de-duplication of the indices).