|
SPARK
0.1.0
A general purpose game engine written in C++.
|
Vulkan implementation of ICommandQueue. More...
#include <VulkanQueue.h>
Classes | |
| struct | Impl |
Public Member Functions | |
| VulkanQueue (const VulkanDevice &device, QueueType type, QueuePriority priority, unsigned family_id, unsigned queue_id) | |
| VulkanQueue (const VulkanQueue &other)=delete | |
| VulkanQueue (VulkanQueue &&other) noexcept=delete | |
| VulkanQueue & | operator= (const VulkanQueue &other)=delete |
| VulkanQueue & | operator= (VulkanQueue &&other) noexcept=delete |
| const VulkanDevice & | device () const noexcept |
| Gets the parent VulkanDevice that provides the queue. | |
| const VkCommandPool & | commandPool () const noexcept |
| Gets a reference to the command pool used to allocate command buffers. | |
| unsigned | familyId () const noexcept |
| Gets the family ID of the queue. | |
| unsigned | queueId () const noexcept |
| Gets the queue ID of the queue. | |
| const VkSemaphore & | timelineSemaphore () const noexcept |
| Gets the internal semaphore used to synchronize the queue. | |
| bool | isBound () const noexcept override |
| Checks whether the queue is currently bound to the parent device. | |
| QueuePriority | priority () const noexcept override |
| Gets the priority of the queue. | |
| QueueType | type () const noexcept override |
| Gets the type of the queue. | |
| void | bind () const noexcept override |
| Binds the queue to the parent device. | |
| void | release () const noexcept override |
| Releases the queue from the parent device. | |
| void | waitFor (std::size_t fence) const noexcept override |
Waits for fence value fence to complete on the command queue. | |
| std::size_t | currentFence () const noexcept override |
| Gets the latest fence inserted into the queue. | |
| std::shared_ptr< VulkanCommandBuffer > | createCommandBuffer (bool begin_recording, bool secondary) const noexcept override |
| Creates a command buffer that can be used to allocate commands on the queue. | |
| std::size_t | submit (std::shared_ptr< const VulkanCommandBuffer > command_buffer, std::span< VkSemaphore > wait_for_semaphores, std::span< VkPipelineStageFlags > wait_for_stages, std::span< VkSemaphore > signal_semaphores={}) const |
| Submits a single command buffer and inserts a fence to wait for it. | |
| std::size_t | submit (const std::vector< std::shared_ptr< const VulkanCommandBuffer > > &command_buffers, std::span< VkSemaphore > wait_for_semaphores, std::span< VkPipelineStageFlags > wait_for_stages, std::span< VkSemaphore > signal_semaphores={}) const |
| Submits a set of command buffers and inserts a fence to wait for them. | |
| std::size_t | submit (std::shared_ptr< VulkanCommandBuffer > command_buffer) const noexcept override |
| Submits a single command buffer to the queue and inserts a fence to wait for it. | |
| std::size_t | submit (std::shared_ptr< const VulkanCommandBuffer > command_buffer) const noexcept override |
| Submits a single command buffer to the queue and inserts a fence to wait for it. | |
| std::size_t | submit (const std::vector< std::shared_ptr< const VulkanCommandBuffer > > &command_buffers) const noexcept override |
| Submits a single command buffer to the queue and inserts a fence to wait for it. | |
| std::size_t | submit (const std::vector< std::shared_ptr< VulkanCommandBuffer > > &command_buffers) const noexcept override |
| Submits a single command buffer to the queue and inserts a fence to wait for it. | |
Public Member Functions inherited from spark::render::CommandQueue< VulkanCommandBuffer > | |
| virtual std::size_t | submit (std::shared_ptr< command_buffer_type > command_buffer) const noexcept=0 |
| Submits a single command buffer to the queue and inserts a fence to wait for it. | |
| virtual std::size_t | submit (std::shared_ptr< const command_buffer_type > command_buffer) const noexcept=0 |
| Submits a single command buffer to the queue and inserts a fence to wait for it. | |
| virtual std::size_t | submit (const std::vector< std::shared_ptr< const command_buffer_type > > &command_buffers) const noexcept=0 |
| Submits a single command buffer to the queue and inserts a fence to wait for it. | |
| virtual std::size_t | submit (const std::vector< std::shared_ptr< command_buffer_type > > &command_buffers) const noexcept=0 |
| Submits a single command buffer to the queue and inserts a fence to wait for it. | |
Public Member Functions inherited from spark::render::ICommandQueue | |
| std::shared_ptr< ICommandBuffer > | createCommandBuffer (bool begin_recording=false, bool secondary=false) const noexcept |
| Creates a command buffer that can be used to allocate commands on the queue. | |
| std::size_t | submit (std::shared_ptr< ICommandBuffer > command_buffer) const noexcept |
| Submits a single command buffer to the queue and inserts a fence to wait for it. | |
| std::size_t | submit (std::shared_ptr< const ICommandBuffer > command_buffer) const noexcept |
| Submits a single command buffer to the queue and inserts a fence to wait for it. | |
| std::size_t | submit (const std::vector< std::shared_ptr< const ICommandBuffer > > &command_buffers) const noexcept |
| Submits multiple command buffers to the queue and inserts a fence to wait for them. | |
| std::size_t | submit (const std::vector< std::shared_ptr< ICommandBuffer > > &command_buffers) const noexcept |
| Submits multiple command buffers to the queue and inserts a fence to wait for them. | |
Public Member Functions inherited from spark::render::Resource< VkQueue > | |
| Resource (VkQueue handle) noexcept | |
| Initializes the managed resource with the given handle. | |
| Resource (const Resource &other)=delete | |
| Resource (Resource &&other) noexcept=delete | |
| Resource & | operator= (const Resource &other)=delete |
| Resource & | operator= (Resource &&other) noexcept=delete |
| const VkQueue & | handle () const final |
| Gets the managed resource handle. | |
Additional Inherited Members | |
Public Types inherited from spark::render::CommandQueue< VulkanCommandBuffer > | |
| using | command_buffer_type |
Public Types inherited from spark::render::IResource< VkQueue > | |
| using | handle_type |
Protected Member Functions inherited from spark::render::Resource< VkQueue > | |
| VkQueue & | handle () final |
| Gets the managed resource handle. | |
Vulkan implementation of ICommandQueue.
|
overridevirtualnoexcept |
Binds the queue to the parent device.
Implements spark::render::ICommandQueue.
|
nodiscardnoexcept |
Gets a reference to the command pool used to allocate command buffers.
|
nodiscardoverridevirtualnoexcept |
Creates a command buffer that can be used to allocate commands on the queue.
| begin_recording | true if the command buffer should be in recording state after creation, false otherwise. |
| secondary | true if the command buffer should be a secondary command buffer, false otherwise. |
Specifying secondary allows to create secondary command buffers (aka. bundles). Those are intended to be used as efficient pre-recorded command buffers that are re-used multiple times. Using such a command buffer allows drivers to pre-apply optimizations, which causes a one-time cost during setup, but reduces cost when re- applying the command buffer multiple times. Ideally they are used as small chunks of re-occurring workloads.
A secondary command buffer must not be submitted to a queue, but rather to a primary command buffer by calling ICommandBuffer::execute().
Implements spark::render::CommandQueue< VulkanCommandBuffer >.
|
nodiscardoverridevirtualnoexcept |
Gets the latest fence inserted into the queue.
Implements spark::render::ICommandQueue.
|
nodiscardnoexcept |
Gets the parent VulkanDevice that provides the queue.
|
nodiscardnoexcept |
Gets the family ID of the queue.
|
nodiscardoverridevirtualnoexcept |
Checks whether the queue is currently bound to the parent device.
true if the queue is bound, false otherwise. Implements spark::render::ICommandQueue.
|
nodiscardoverridevirtualnoexcept |
Gets the priority of the queue.
Implements spark::render::ICommandQueue.
|
nodiscardnoexcept |
Gets the queue ID of the queue.
|
overridevirtualnoexcept |
Releases the queue from the parent device.
Implements spark::render::ICommandQueue.
|
nodiscardoverridenoexcept |
Submits a single command buffer to the queue and inserts a fence to wait for it.
| command_buffer | The command buffer to submit to the queue. |
|
nodiscard |
Submits a set of command buffers and inserts a fence to wait for them.
| command_buffers | The command buffers to submit to the command queue. |
| wait_for_semaphores | The semaphores to wait for on each pipeline stage. There must be a semaphore for each entry in the waitForStages array. |
| wait_for_stages | The pipeline stages of the current render pass to wait for before submitting the command buffer. |
| signal_semaphores | The semaphores to signal, when the command buffer is executed. |
By calling this method, the queue takes shared ownership over the command_buffers until the fence is passed. The reference will be released during a waitFor(), if the awaited fence is inserted after the associated one.
|
nodiscardoverridenoexcept |
Submits a single command buffer to the queue and inserts a fence to wait for it.
| command_buffer | The command buffer to submit to the queue. |
|
nodiscardoverridenoexcept |
Submits a single command buffer to the queue and inserts a fence to wait for it.
| command_buffer | The command buffer to submit to the queue. |
|
nodiscard |
Submits a single command buffer and inserts a fence to wait for it.
| command_buffer | The command buffer to submit to the queue. |
| wait_for_semaphores | The semaphores to wait for on each pipeline stage. There must be a semaphore for each entry in the wait_for_stages array. |
| wait_for_stages | The pipeline stages of the current render pass to wait for before submitting the command buffer. |
| signal_semaphores | The semaphores to signal, when the command buffer is executed. |
By calling this method, the queue takes shared ownership over the command_buffer until the fence is passed. The reference will be released during a waitFor(), if the awaited fence is inserted after the associated one.
|
nodiscardoverridenoexcept |
Submits a single command buffer to the queue and inserts a fence to wait for it.
| command_buffer | The command buffer to submit to the queue. |
|
nodiscardnoexcept |
Gets the internal semaphore used to synchronize the queue.
|
nodiscardoverridevirtualnoexcept |
|
overridevirtualnoexcept |
Waits for fence value fence to complete on the command queue.
| fence | The fence value to wait for. |
Each time one or more command buffers are submitted to the queue, a fence is inserted and its value will be returned. By calling this method, it is possible to wait for this fence. A fence value is guaranteed to be larger than earlier fences, so the method returns, if the latest signaled fence value is larger or equal to the value specified in fence.
Implements spark::render::ICommandQueue.