class GpuQueue

Specifies a queue on which command buffers can be submitted on.

Public

Methods

~GpuQueue

virtual ~GpuQueue() = default

GetType

GpuQueueType GetType() const

Determines which type of command buffer commands can be used on the command buffers submitted on the queue.

GetIndex

u32 GetIndex() const

Returns the unique index of the queue, for its type.

GetId

GpuQueueId GetId() const

Returns a unique identifier for this queue.

SubmitCommandBuffer

void SubmitCommandBuffer(const SPtr<render::GpuCommandBuffer> &commandBuffer, GpuQueueMask syncMask = GpuQueueMask::kAll)

Submits the command buffer for execution on the specified queue.

This mask is only relevant if your command buffers are executing on different queues, and are dependent. If they are executing on the same queue then they will execute sequentially in the order they are submitted. Otherwise, if there is a dependency you must make state it explicitly here.

commandBuffer
Command buffer to submit.
syncMask
Optional synchronization mask that determines if the submitted command buffer depends on any other command buffers submitted on other queues.

PresentRenderWindow

virtual void PresentRenderWindow(const SPtr<render::RenderWindow> &renderWindow, GpuQueueMask syncMask = GpuQueueMask::kAll) = 0

Presents the back-buffer image from the provided window onto the window, using the appropriate queue that supports present operations.

renderWindow
Window whose back-buffer to present.
syncMask
Optional synchronization mask that determines if the present operation depends on any command buffers submitted on other queues.

WaitUntilIdle

virtual void WaitUntilIdle() = 0

Blocks the calling thread until all operations on the queue finish executing on the GPU.

Protected

Constructors

GpuQueue

GpuQueue(GpuDevice &gpuDevice, GpuQueueType type, u32 index)

Methods

SubmitCommandBuffer

virtual void SubmitCommandBuffer(const SPtr<render::GpuCommandBuffer> &commandBuffer, GpuQueueMask syncMask, bool flushTransferCommandBuffer) = 0

Provides the same functionality as SubmitCommandBuffer(const SPtr <render ::GpuCommandBuffer> & , GpuQueueMask), but makes the command buffer flush optional.

Fields

mGpuDevice

GpuDevice & mGpuDevice

mType

mIndex

u32 mIndex