QVulkanWindow: Add function to retrieve graphics queue family index

Change-Id: I51e4a006e82fbcd998815da3de6daa80558a973f
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This commit is contained in:
Frank Richter 2019-08-25 14:19:20 +02:00
parent 6b884d2aa1
commit 699a0d2dee
2 changed files with 18 additions and 0 deletions

View File

@ -2210,6 +2210,23 @@ VkQueue QVulkanWindow::graphicsQueue() const
return d->gfxQueue;
}
/*!
Returns the family index of the active graphics queue.
\note Calling this function is only valid from the invocation of
QVulkanWindowRenderer::initResources() up until
QVulkanWindowRenderer::releaseResources(). Implementations of
QVulkanWindowRenderer::updateQueueCreateInfo() can also call this
function.
\since 5.15
*/
uint32_t QVulkanWindow::graphicsQueueFamilyIndex() const
{
Q_D(const QVulkanWindow);
return d->gfxQueueFamilyIdx;
}
/*!
Returns the active graphics command pool.

View File

@ -112,6 +112,7 @@ public:
const VkPhysicalDeviceProperties *physicalDeviceProperties() const;
VkDevice device() const;
VkQueue graphicsQueue() const;
uint32_t graphicsQueueFamilyIndex() const;
VkCommandPool graphicsCommandPool() const;
uint32_t hostVisibleMemoryIndex() const;
uint32_t deviceLocalMemoryIndex() const;