QRhiVulkanNativeHandles Struct

Collects device, queue, and other Vulkan objects that are used by the QRhi. More...

Header: #include <rhi/qrhi.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS GuiPrivate)
target_link_libraries(mytarget PRIVATE Qt6::GuiPrivate)
qmake: QT += gui-private
Since: Qt 6.6
Inherits: QRhiNativeHandles

Public Variables

VkDevice dev
VkQueue gfxQueue
quint32 gfxQueueFamilyIdx
(since 6.13) VkDeviceQueueCreateFlags gfxQueueFlags
quint32 gfxQueueIdx
QVulkanInstance *inst
VkPhysicalDevice physDev
void *vmemAllocator

Detailed Description

Note: Ownership of the Vulkan objects is never transferred.

Note: This is a RHI API with limited compatibility guarantees, see QRhi for details.

Member Variable Documentation

VkDevice QRhiVulkanNativeHandles::dev

When wanting to import not just a physical device, but also use an already existing VkDevice, set this and the graphics queue index and family index.

VkQueue QRhiVulkanNativeHandles::gfxQueue

Output only, not used by QRhi::create(), only set by the QRhi::nativeHandles() accessor. The graphics VkQueue used by the QRhi.

quint32 QRhiVulkanNativeHandles::gfxQueueFamilyIdx

Graphics queue family index.

[since 6.13] VkDeviceQueueCreateFlags QRhiVulkanNativeHandles::gfxQueueFlags

Graphics queue flags (VkDeviceQueueCreateFlags) or 0. Setting this to a non-zero value will imply using vkGetDeviceQueue2 instead of vkGetDeviceQueue.

Note: This value is ignored when running with Vulkan 1.0. Non-zero queue flags are introduced in Vulkan 1.1.

This variable was introduced in Qt 6.13.

quint32 QRhiVulkanNativeHandles::gfxQueueIdx

Graphics queue index.

QVulkanInstance *QRhiVulkanNativeHandles::inst

Output only, not used by QRhi::create(), only set by the QRhi::nativeHandles() accessor. The QVulkanInstance used by the QRhi.

VkPhysicalDevice QRhiVulkanNativeHandles::physDev

When different from nullptr, specifies the Vulkan physical device to use.

void *QRhiVulkanNativeHandles::vmemAllocator

Relevant only when importing an existing memory allocator object, leave it set to nullptr otherwise.