Magnum::Vk::Queue class new in Git master

Queue.

Wraps a VkQueue. See Device creation for information about how queues are created and retrieved from a device and Command buffer recording and submit for an overview of recording and submitting command buffers to a queue.

Public static functions

static auto wrap(Device& device, VkQueue handle) -> Queue
Wrap existing Vulkan queue.

Constructors, destructors, conversion operators

Queue(NoCreateT) explicit
Construct without creating the instance.
Queue(const Queue&) deleted
Copying is not allowed.
Queue(Queue&& other) noexcept
Move constructor.
~Queue()
Destructor.
operator VkQueue()

Public functions

auto operator=(const Queue&) -> Queue& deleted
Copying is not allowed.
auto operator=(Queue&& other) -> Queue& noexcept
Move assignment.
auto handle() -> VkQueue
Underlying VkQueue handle.
void submit(Containers::ArrayView<const Containers::Reference<const SubmitInfo>> infos, VkFence fence)
Submit a sequence of semaphores or command buffers to a queue.
void submit(std::initializer_list<Containers::Reference<const SubmitInfo>> infos, VkFence fence)
auto submit(Containers::ArrayView<const Containers::Reference<const SubmitInfo>> infos) -> Fence
Submit a sequence of semaphores or command buffers to a queue and return a new fence to wait on.
auto submit(std::initializer_list<Containers::Reference<const SubmitInfo>> infos) -> Fence

Function documentation

static Queue Magnum::Vk::Queue::wrap(Device& device, VkQueue handle)

Wrap existing Vulkan queue.

Parameters
device Vulkan device
handle The VkQueue handle

The handle is expected to be originating from device. Unlike with other handle types, the VkQueue handles don't have to be destroyed at the end, so there's no equivalent of e.g. Device::release() or Device::handleFlags().

Magnum::Vk::Queue::Queue(NoCreateT) explicit

Construct without creating the instance.

This is the expected way to create a queue that's later populated on Device creation through DeviceCreateInfo::addQueues().

Magnum::Vk::Queue::~Queue()

Destructor.

Queues are associated with the device they come from, so no explicit destruction is needed.

Magnum::Vk::Queue::operator VkQueue()

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

void Magnum::Vk::Queue::submit(Containers::ArrayView<const Containers::Reference<const SubmitInfo>> infos, VkFence fence)

Submit a sequence of semaphores or command buffers to a queue.

Parameters
infos Submit info structures, each specifying a command buffer submission batch
fence A Fence or a raw Vulkan fence handle to be signaled once all submitted command buffers have completed execution. Pass a {} or a NoCreate'd Fence to not signal anything.

void Magnum::Vk::Queue::submit(std::initializer_list<Containers::Reference<const SubmitInfo>> infos, VkFence fence)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Fence Magnum::Vk::Queue::submit(Containers::ArrayView<const Containers::Reference<const SubmitInfo>> infos)

Submit a sequence of semaphores or command buffers to a queue and return a new fence to wait on.

Compared to submit(Containers::ArrayView<const Containers::Reference<const SubmitInfo>>, VkFence) creates a new Fence and returns it for a more convenient one-off submission.

Fence Magnum::Vk::Queue::submit(std::initializer_list<Containers::Reference<const SubmitInfo>> infos)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.