powervr-graphics / Native_SDK

C++ cross-platform 3D graphics SDK. Includes demos & helper code (resource loading etc.) to speed up development of Vulkan, OpenGL ES 2.0 & 3.x applications
https://docs.imgtec.com/sdk-documentation/html/introduction.html
MIT License
702 stars 197 forks source link

Avoid creating more queues than supported #50

Closed c0d1f1ed closed 4 years ago

c0d1f1ed commented 4 years ago

It is valid(*) for Vulkan drivers to only support one queue which can accept both graphics and compute commands. If additional queues are requested, keep assigning it to the last queue index of a valid queue family, instead of failing to create the device.

(*) https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkQueueFlagBits.html: "If an implementation exposes any queue family that supports graphics operations, at least one queue family of at least one physical device exposed by the implementation must support both graphics and compute operations."