Skip to content

LiteFX::Rendering::Backends::VulkanDevice::createQueue

Attempts to create a new queue that supports the combination of queue types specified by the type parameter.

Synopsis

Declared in <litefx/backends/vulkan.hpp>

[[dllimport, dllexport]] virtual SharedPtr<VulkanQueue const> createQueue(
    QueueType type,
    QueuePriority priority = QueuePriority::Normal) override;

Description

Note that a queue is not guaranteed to represent an actual hardware queue that runs in parallel to other hardware queues. Backends might create virtual queues, that map the same hardware queue. In this case, creating a new queue is always possible but might not yield performance benefits. As a good practice, it is advised to create only as few queues as required.

If this method is not able to create a new queue (i.e., it returns nullptr), you can either fall back to the default queue (defaultQueue) or use any queue that you created earlier instead.

The priority parameter can be specified to request a queue with a certain priority. However, the backend is not required to return a queue with that actual priority. The default queues are always prioritized highest.

Return Value

A pointer to the newly created queue, or nullptr, if no queue could be created.

Parameters

NameDescription
typeThe type of the queue or a combination of capabilities the queue is required to support.
priorityThe preferred priority of the queue.

See Also

defaultQueue