|
CeresEngine 0.2.0
A game development framework
|
#include <CeresEngine/RenderAPI/GPUCommandBuffer.hpp>
Public Member Functions | |
| GPUCommandBuffer (const GPUCommandBuffer &)=delete | |
| Deleted copy constructor. | |
| GPUCommandBuffer & | operator= (const GPUCommandBuffer &)=delete |
| GPUCommandBuffer (GPUCommandBuffer &&)=delete | |
| Deleted move constructor. | |
| GPUCommandBuffer & | operator= (GPUCommandBuffer &&)=delete |
| virtual void | bindResourceSet (GPUResourceSet &resourceSet, UInt32 firstSet=0, Int32 offset=-1)=0 |
| Binds the specified resource heap to the graphics pipeline. | |
| void | bindResourceSet (const GPUResourceSetPtr &resourceSet, const UInt32 firstSet=0, const Int32 offset=-1) |
| virtual void | bindVertexBuffer (GPUBuffer &vertexBuffer, UInt32 offset=0, UInt32 slot=0)=0 |
| Binds a vertex buffer for drawing. | |
| void | bindVertexBuffer (const GPUBufferPtr &vertexBuffer, const UInt32 offset=0, const UInt32 slot=0) |
| virtual void | bindVertexBuffer (const GPUVertexBuffer &vertexBuffer) |
| Binds a vertex buffer for drawing. | |
| virtual void | bindIndexBuffer (GPUBuffer &indexBuffer, UInt32 offset=0, IndexType indexType=IndexType::UInt32)=0 |
| Binds a index buffer for drawing. | |
| void | bindIndexBuffer (const GPUBufferPtr &indexBuffer, const UInt32 offset=0, const IndexType indexType=IndexType::UInt32) |
| virtual void | bindIndexBuffer (const GPUIndexBuffer &indexBuffer) |
| Binds a index buffer for drawing. | |
| virtual void | draw (UInt32 vertexCount, UInt32 instanceCount=1, UInt32 firstVertex=0, UInt32 firstInstance=0)=0 |
| Submits a draw command using the bound vertex buffer. | |
| virtual void | draw (GPUBuffer &buffer, UInt32 drawCount, UInt32 bufferOffset=0, UInt32 stride=sizeof(GPUDrawIndirectCommand))=0 |
| Submits an indirect draw command using the bound vertex buffer. | |
| void | draw (const GPUIndirectBuffer &buffer, UInt32 drawCount, UInt32 stride=sizeof(GPUDrawIndirectCommand)) |
| virtual void | drawIndexed (UInt32 indexCount, UInt32 instanceCount=1, UInt32 firstVertex=0, Int32 vertexOffset=0, UInt32 firstInstance=0)=0 |
| Submits a draw command using the bound vertex and index buffer. | |
| virtual void | drawIndexed (GPUBuffer &buffer, UInt32 drawCount, UInt32 bufferOffset=0, UInt32 stride=sizeof(GPUDrawIndexedIndirectCommand))=0 |
| Submits an indirect indexed draw command using the bound vertex and index buffer. | |
| void | drawIndexed (const GPUIndirectBuffer &buffer, UInt32 drawCount, UInt32 stride=sizeof(GPUDrawIndexedIndirectCommand)) |
| virtual void | dispatch (UInt32 groupCountX, UInt32 groupCountY, UInt32 groupCountZ)=0 |
| Dispatches a compute command. | |
| virtual void | setViewport (const Viewport &viewport) |
| Sets a single viewport. | |
| virtual void | setViewports (const SmallVector< Viewport, 16 > &viewports)=0 |
| Sets an array of viewports. | |
| virtual void | setScissor (const Scissor &scissor) |
| Sets a single scissor rectangle. | |
| virtual void | setScissors (const SmallVector< Scissor, 16 > &scissors)=0 |
| Sets an array of scissor rectangles, but only if the scissor test was enabled in the previously set graphics pipeline (otherwise, this function has no effect). | |
| void | buildAccelerationStructures () |
| void | buildAccelerationStructuresIndirect () |
| void | copyAccelerationStructure () |
| void | copyAccelerationStructureToMemory () |
| void | copyMemoryToAccelerationStructure () |
| void | writeAccelerationStructuresProperties () |
| void | setRayTracingPipelineStackSize () |
| void | traceRays () |
| void | traceRaysIndirect () |
| virtual void | drawMeshTasks (UInt32 groupCountX, UInt32 groupCountY, UInt32 groupCountZ)=0 |
| Draw mesh task work items. | |
| virtual void | drawMeshTasksIndirect (GPUBuffer &buffer, UInt64 offset, UInt32 drawCount, UInt32 stride)=0 |
| Issue an indirect mesh tasks draw into a command buffer. | |
| virtual void | drawMeshTasksIndirect (GPUBuffer &buffer, UInt64 offset, GPUBuffer &countBuffer, UInt64 countBufferOffset, uint32_t maxDrawCount, uint32_t stride)=0 |
| Perform an indirect mesh tasks draw with the draw count sourced from a buffer. | |
| virtual void | updateBuffer (GPUBuffer &dstBuffer, std::uint64_t dstOffset, const void *data, std::uint16_t dataSize)=0 |
| Updates the data of the specified buffer during encoding the command buffer. | |
| virtual void | copyBuffer (GPUBuffer &dstBuffer, std::uint64_t dstOffset, GPUBuffer &srcBuffer, std::uint64_t srcOffset, std::uint64_t size)=0 |
| Encodes a buffer copy command for the specified buffer region. | |
| virtual void | fillBuffer (GPUBuffer &dstBuffer, std::uint64_t dstOffset, std::uint32_t value, std::uint64_t fillSize=~0u)=0 |
| Fills the destination buffer with copies of the specified 32-bit value. | |
| virtual void | copyBufferFromImage (GPUBuffer &dstBuffer, std::uint64_t dstOffset, GPUImage &srcImage, const GPUImageRegion &srcImageRegion, std::uint32_t rowStride=0, std::uint32_t layerStride=0)=0 |
| Encodes a buffer copy command that blits data from a source image. | |
| virtual void | copyImage (GPUImage &dstImage, const GPUImageLocation &dstLocation, GPUImage &srcImage, const GPUImageLocation &srcLocation, const TExtent3< UInt32 > &extent)=0 |
| Encodes a image copy command for the specified image regions. | |
| virtual void | copyImageFromBuffer (GPUImage &dstImage, const GPUImageRegion &dstRegion, GPUBuffer &srcBuffer, std::uint64_t srcOffset, std::uint32_t rowStride=0, std::uint32_t layerStride=0)=0 |
| Encodes a image copy command that blits data from a source buffer. | |
| virtual void | resolveImage (GPUImage &dstImage, const GPUImageLocation &dstLocation, GPUImage &srcImage, const GPUImageLocation &srcLocation, const TExtent3< UInt32 > &extent)=0 |
| virtual void | clear (GPUImage &image)=0 |
| virtual void | generateMips (GPUImage &image)=0 |
| Generates all MIP-maps for the specified image. | |
| virtual void | generateMips (GPUImage &texture, const GPUImageSubresource &subresource)=0 |
| Generates a range of MIP-maps for the specified texture. | |
| virtual void | barrier (GPUImage &image, GPUImageLayout layout)=0 |
| virtual void | begin ()=0 |
| Begins with the encoding (also referred to as "recording") of this command buffer. | |
| virtual void | end ()=0 |
| Ends the encoding (also referred to as "recording") of this command buffer. | |
| virtual void | wait ()=0 |
| template<typename Func > | |
| decltype(auto) | record (Func &&recorder) |
| Records a sequence of commands to be executed by the GPU. | |
| TDeviceObject (GPUDevice &device, const Descriptor &descriptor) | |
| Inherited constructors. | |
| TDeviceObject (const TDeviceObject &)=delete | |
| Inherited constructors. | |
| TDeviceObject (TDeviceObject &&)=delete | |
| Inherited constructors. | |
Public Member Functions inherited from CeresEngine::TDeviceObject< GPUCommandBufferDescriptor > | |
| TDeviceObject (GPUDevice &device, const Descriptor &descriptor) | |
| Initializes a new RenderAPI device object instance. | |
| TDeviceObject (const TDeviceObject &)=delete | |
| TDeviceObject (TDeviceObject &&)=delete | |
| ~TDeviceObject () override=default | |
| TDeviceObject & | operator= (const TDeviceObject &)=delete |
| TDeviceObject & | operator= (TDeviceObject &&)=delete |
Public Member Functions inherited from CeresEngine::GPUDeviceObject | |
| GPUDeviceObject (GPUDevice &device) | |
| ~GPUDeviceObject () override | |
Public Member Functions inherited from CeresEngine::GPUObject | |
| GPUObject ()=default | |
| virtual | ~GPUObject ()=default |
| GPUObject (const GPUObject &)=delete | |
| GPUObject & | operator= (const GPUObject &)=delete |
| GPUObject (GPUObject &&)=delete | |
| GPUObject & | operator= (GPUObject &&)=delete |
| void | retain () noexcept |
| Retains the object by increment it's reference count by one. | |
| bool | release () noexcept |
| Releases the object by decrementing it's reference count by one. | |
Public Attributes | |
| Event< void()> | didFinish |
| An event triggered whenever the command buffer has finished execution. | |
Public Attributes inherited from CeresEngine::TDeviceObject< GPUCommandBufferDescriptor > | |
| const Descriptor & | descriptor |
| A structure that describes the object and it's properties. | |
Public Attributes inherited from CeresEngine::GPUDeviceObject | |
| GPUDevice & | device |
| The owning device this object was created from. | |
Additional Inherited Members | |
Public Types inherited from CeresEngine::TDeviceObject< GPUCommandBufferDescriptor > | |
| using | Descriptor = GPUCommandBufferDescriptor |
| An type-alias to the descriptor struct type. | |
Protected Member Functions inherited from CeresEngine::GPUObject | |
| virtual void | destroy () noexcept |
| A internal method called by the system when the object reference count reaches zero. | |
|
delete |
Deleted copy constructor.
|
delete |
Deleted move constructor.
|
pure virtual |
Begins with the encoding (also referred to as "recording") of this command buffer.
CommandBuffer interface must be used between a call to begin() and end(). Implemented in CeresEngine::MTCommandBuffer, CeresEngine::MKCommandBuffer, CeresEngine::NLCommandBuffer, CeresEngine::GLCommandBuffer, CeresEngine::VKCommandBuffer, and CeresEngine::WGCommandBuffer.
|
inline |
|
virtual |
Binds a index buffer for drawing.
| indexBuffer | The index buffer to be bound |
|
pure virtual |
Binds a index buffer for drawing.
| indexBuffer | The index buffer to be bound |
| offset | The amount of bytes to offset the buffer |
| indexType | The index buffer type. By default uses uint32. |
Implemented in CeresEngine::MTCommandBuffer, CeresEngine::MKCommandBuffer, CeresEngine::NLCommandBuffer, CeresEngine::GLCommandBuffer, CeresEngine::VKCommandBuffer, and CeresEngine::WGCommandBuffer.
|
inline |
|
pure virtual |
Binds the specified resource heap to the graphics pipeline.
| resourceSet | Specifies the resource heap that contains all shader resources that will be bound to the shader pipeline. |
| firstSet | Specifies the set number of the first layout resource. |
| offset | The offset to apply to the buffer before binding |
Implemented in CeresEngine::MTCommandBuffer, CeresEngine::MKCommandBuffer, CeresEngine::NLCommandBuffer, CeresEngine::GLCommandBuffer, CeresEngine::VKCommandBuffer, and CeresEngine::WGCommandBuffer.
|
inline |
|
virtual |
Binds a vertex buffer for drawing.
| vertexBuffer | The vertex buffer to be bound |
|
pure virtual |
Binds a vertex buffer for drawing.
| vertexBuffer | The vertex buffer to be bound. |
| offset | The amount of bytes to offset the buffer. |
| slot | The slot to bind the vertex buffer to. |
Implemented in CeresEngine::MTCommandBuffer, CeresEngine::MKCommandBuffer, CeresEngine::NLCommandBuffer, CeresEngine::GLCommandBuffer, CeresEngine::VKCommandBuffer, and CeresEngine::WGCommandBuffer.
| void CeresEngine::GPUCommandBuffer::buildAccelerationStructures | ( | ) |
| void CeresEngine::GPUCommandBuffer::buildAccelerationStructuresIndirect | ( | ) |
| void CeresEngine::GPUCommandBuffer::copyAccelerationStructure | ( | ) |
| void CeresEngine::GPUCommandBuffer::copyAccelerationStructureToMemory | ( | ) |
|
pure virtual |
Encodes a buffer copy command for the specified buffer region.
| dstBuffer | Specifies the destination buffer whose data is to be updated. |
| dstOffset | Specifies the destination offset (in bytes) at which the destination buffer is to be updated. This offset plus the size (i.e. dstOffset + size) must be less than or equal to the size of the destination buffer. |
| srcBuffer | Specifies the source buffer whose data is to be read from. |
| srcOffset | Specifies the source offset (in bytes) at which the source buffer is to be read from. This offset plus the size (i.e. srcOffset + size) must be less than or equal to the size of the source buffer. |
| size | Specifies the size of the buffer region to copy. |
Implemented in CeresEngine::MTCommandBuffer, CeresEngine::MKCommandBuffer, CeresEngine::NLCommandBuffer, CeresEngine::GLCommandBuffer, CeresEngine::VKCommandBuffer, and CeresEngine::WGCommandBuffer.
|
pure virtual |
Encodes a buffer copy command that blits data from a source image.
| dstBuffer | Specifies the destination buffer whose data is to be updated. This buffer must have been created with the usage flag BufferUsage::Destination. |
| dstOffset | Specifies the destination offset (in bytes) at which the source buffer is to be updated. This must be a multiple of 4. |
| srcImage | Specifies the source image whose data is to be read from. This image must have been created with the usage flag ImageUsage::Source and its format must not be compressed or packed. |
| srcImageRegion | Specifies the source region where the image is to be read from. Note that the numMipLevels attribute of this parameter must be 1. |
| rowStride | Specifies an optional stride (in bytes) per row in the source buffer. By default 0. |
| layerStride | Specifies an optional stride (in bytes) per layer in the source buffer. This must be a multiple of rowStride. If rowStride is zero, then layerStride must also be zero. By default 0. |
buffer := image, or memcpy(destination, source, size). rowStride is 0, the source data is considered to be tightly packed for each array layer and the required alignment is managed automatically. rowStride is not 0, it must be greater than or equal to the size (in bytes) of each row in the image region with respect to the image's format. rowStride also apply to layerStride. Implemented in CeresEngine::MTCommandBuffer, CeresEngine::MKCommandBuffer, CeresEngine::NLCommandBuffer, CeresEngine::GLCommandBuffer, CeresEngine::VKCommandBuffer, and CeresEngine::WGCommandBuffer.
|
pure virtual |
Encodes a image copy command for the specified image regions.
| dstImage | Specifies the destination image whose data is to be updated. |
| dstLocation | Specifies the destination location, including MIP-map level and offset. Its offset plus the extent (i.e. dstLocation.offset + extent) must be less than or equal to the size of the destination image. |
| srcImage | Specifies the source image whose data is to be read from. |
| srcLocation | Specifies the source location, including MIP-map level and offset. Its offset plus the extent (i.e. srcLocation.offset + extent) must be less than or equal to the size of the source image. |
| extent | Specifies the extent of the image region to copy (see ImageDescriptor::extent). For this function, the extent also includes the array layers, i.e. y component for 1D arrays (ImageType::Image1DArray), and z component for 2D and cube arrays (ImageType::Image2DArray and ImageType::ImageCubeArray). |
Implemented in CeresEngine::MTCommandBuffer, CeresEngine::MKCommandBuffer, CeresEngine::NLCommandBuffer, CeresEngine::GLCommandBuffer, CeresEngine::VKCommandBuffer, and CeresEngine::WGCommandBuffer.
|
pure virtual |
Encodes a image copy command that blits data from a source buffer.
| dstImage | Specifies the destination image whose data is to be updated. This image must have been created with the usage flag ImageUsage::Destination and its format must not be compressed or packed. |
| dstRegion | Specifies the destination region where the image is to be updated. Note that the numMipLevels attribute of this parameter must be 1. |
| srcBuffer | Specifies the source buffer whose data is to be read from. This buffer must have been created with the usage flag BufferUsage::Source. |
| srcOffset | Specifies the source offset (in bytes) at which the source buffer is to be read from. This must be a multiple of 4. |
| rowStride | Specifies an optional stride (in bytes) per row in the source buffer. By default 0. |
| layerStride | Specifies an optional stride (in bytes) per layer in the source buffer. This must be a multiple of rowStride. If rowStride is zero, then layerStride must also be zero. By default 0. |
image := buffer, or memcpy(destination, source, size). rowStride is 0, the source data is considered to be tightly packed for each array layer and the required alignment is managed automatically. rowStride is not 0, it must be greater than or equal to the size (in bytes) of each row in the image region with respect to the image's format. rowStride also apply to layerStride. Implemented in CeresEngine::MTCommandBuffer, CeresEngine::MKCommandBuffer, CeresEngine::NLCommandBuffer, CeresEngine::GLCommandBuffer, CeresEngine::VKCommandBuffer, and CeresEngine::WGCommandBuffer.
| void CeresEngine::GPUCommandBuffer::copyMemoryToAccelerationStructure | ( | ) |
|
pure virtual |
Dispatches a compute command.
| groupCountX | The number of local workgroups to dispatch in the X dimension. |
| groupCountY | The number of local workgroups to dispatch in the Y dimension. |
| groupCountZ | The number of local workgroups to dispatch in the Z dimension. |
Implemented in CeresEngine::MTCommandBuffer, CeresEngine::MKCommandBuffer, CeresEngine::NLCommandBuffer, CeresEngine::GLCommandBuffer, CeresEngine::VKCommandBuffer, and CeresEngine::WGCommandBuffer.
| void CeresEngine::GPUCommandBuffer::draw | ( | const GPUIndirectBuffer & | buffer, |
| UInt32 | drawCount, | ||
| UInt32 | stride = sizeof(GPUDrawIndirectCommand) |
||
| ) |
|
pure virtual |
Submits an indirect draw command using the bound vertex buffer.
| buffer | A buffer that holds drawCount structs of type DrawIndirectCommand. This buffer must have been created with BufferUsage::Indirect usage flag. |
| drawCount | The number of draws to execute, and can be zero. |
| bufferOffset | The byte offset into buffer where parameters begin. |
| stride | The byte stride between successive sets of draw parameters. |
Implemented in CeresEngine::MTCommandBuffer, CeresEngine::MKCommandBuffer, CeresEngine::NLCommandBuffer, CeresEngine::GLCommandBuffer, CeresEngine::VKCommandBuffer, and CeresEngine::WGCommandBuffer.
|
pure virtual |
Submits a draw command using the bound vertex buffer.
instanceCount. | vertexCount | The number of vertices per instance |
| instanceCount | The number of instances to be drawn |
| firstVertex | The vertex to start the draw command from |
| firstInstance | The instance to start the draw command from |
Implemented in CeresEngine::MTCommandBuffer, CeresEngine::MKCommandBuffer, CeresEngine::NLCommandBuffer, CeresEngine::GLCommandBuffer, CeresEngine::VKCommandBuffer, and CeresEngine::WGCommandBuffer.
| void CeresEngine::GPUCommandBuffer::drawIndexed | ( | const GPUIndirectBuffer & | buffer, |
| UInt32 | drawCount, | ||
| UInt32 | stride = sizeof(GPUDrawIndexedIndirectCommand) |
||
| ) |
|
pure virtual |
Submits an indirect indexed draw command using the bound vertex and index buffer.
| buffer | A buffer that holds drawCount structs of type DrawIndexedIndirectCommand. This buffer must have been created with BufferUsage::Indirect usage flag. |
| drawCount | The number of draws to execute, and can be zero. |
| bufferOffset | The byte offset into buffer where parameters begin. |
| stride | The byte stride between successive sets of draw parameters. |
Implemented in CeresEngine::MTCommandBuffer, CeresEngine::MKCommandBuffer, CeresEngine::NLCommandBuffer, CeresEngine::GLCommandBuffer, CeresEngine::VKCommandBuffer, and CeresEngine::WGCommandBuffer.
|
pure virtual |
Submits a draw command using the bound vertex and index buffer.
instanceCount. | indexCount | The number of vertex indices per instance |
| instanceCount | The number of instances to be drawn |
| firstVertex | The vertex to start the draw command from |
| vertexOffset | The offset to the first vertex |
| firstInstance | The instance to start the draw command from |
Implemented in CeresEngine::MTCommandBuffer, CeresEngine::MKCommandBuffer, CeresEngine::NLCommandBuffer, CeresEngine::GLCommandBuffer, CeresEngine::VKCommandBuffer, and CeresEngine::WGCommandBuffer.
|
pure virtual |
Draw mesh task work items.
| groupCountX | The number of local workgroups to dispatch in the X dimension. |
| groupCountY | The number of local workgroups to dispatch in the Y dimension. |
| groupCountZ | The number of local workgroups to dispatch in the Z dimension. |
Implemented in CeresEngine::MTCommandBuffer, CeresEngine::MKCommandBuffer, CeresEngine::NLCommandBuffer, CeresEngine::GLCommandBuffer, and CeresEngine::VKCommandBuffer.
|
pure virtual |
Perform an indirect mesh tasks draw with the draw count sourced from a buffer.
| buffer | |
| offset | The byte offset into buffer where parameters begin. |
| countBuffer | The buffer containing the draw count. |
| countBufferOffset | The byte offset into countBuffer where the draw count begins. |
| maxDrawCount | Specifies the maximum number of draws that will be executed. The actual number of executed draw calls is the minimum of the count specified in countBuffer and maxDrawCount. |
| stride | The byte stride between successive sets of draw parameters. |
Implemented in CeresEngine::MTCommandBuffer, CeresEngine::MKCommandBuffer, CeresEngine::NLCommandBuffer, CeresEngine::GLCommandBuffer, and CeresEngine::VKCommandBuffer.
|
pure virtual |
Issue an indirect mesh tasks draw into a command buffer.
| buffer | The buffer containing draw parameters. |
| offset | The byte offset into buffer where parameters begin. |
| drawCount | The number of draws to execute, and can be zero. |
| stride | The byte stride between successive sets of draw parameters. |
Implemented in CeresEngine::MTCommandBuffer, CeresEngine::MKCommandBuffer, CeresEngine::NLCommandBuffer, CeresEngine::GLCommandBuffer, and CeresEngine::VKCommandBuffer.
Ends the encoding (also referred to as "recording") of this command buffer.
CommandQueue or executed by a primary command buffer. Implemented in CeresEngine::MTCommandBuffer, CeresEngine::MKCommandBuffer, CeresEngine::NLCommandBuffer, CeresEngine::GLCommandBuffer, CeresEngine::VKCommandBuffer, and CeresEngine::WGCommandBuffer.
|
pure virtual |
Fills the destination buffer with copies of the specified 32-bit value.
| dstBuffer | Specifies the destination buffer whose data is to be updated. This command works with all kinds of buffers, but for performance reasons it is recommended to create this buffer with the usage flag BufferUsage::Storage. |
| dstOffset | Specifies the destination offset (in bytes) at which the destination buffer is to be updated. |
| value | Specifies the 32-bit value to fill the buffer with. |
| fillSize | Specifies the fill size (in bytes) of the buffer region. This must be a multiple of 4. By default ~0u. If this is equal to ~0u, dstOffset is ignored and the entire buffer will be filled. |
Implemented in CeresEngine::MTCommandBuffer, CeresEngine::MKCommandBuffer, CeresEngine::NLCommandBuffer, CeresEngine::GLCommandBuffer, CeresEngine::VKCommandBuffer, and CeresEngine::WGCommandBuffer.
Generates all MIP-maps for the specified image.
| image | Specifies the image whose MIP-maps are to be generated. This image must have been created with the binding flags ImageUsage::Sampled and ImageUsage::ColorAttachment. |
Implemented in CeresEngine::MTCommandBuffer, CeresEngine::MKCommandBuffer, CeresEngine::NLCommandBuffer, CeresEngine::GLCommandBuffer, CeresEngine::VKCommandBuffer, and CeresEngine::WGCommandBuffer.
|
pure virtual |
Generates a range of MIP-maps for the specified texture.
| texture | Specifies the image whose MIP-maps are to be generated. This image must have been created with the usage flags ImageUsageFlag::Sampled and ImageUsageFlag::Attachment. |
| subresource | Specifies the texture subresource, i.e. the range of MIP-maps that are to be updated. |
subresource). However, this function may introduce a performance penalty compared to generating the full MIP chain if texture views are not natively supported by the backend. It is therefore recommended to use this function only if the range of MIP-maps is significantly smaller than the entire MIP chain, e.g. only a single slice of a large 2D array texture, and use the primary generateMips function otherwise. Implemented in CeresEngine::MTCommandBuffer, CeresEngine::MKCommandBuffer, CeresEngine::NLCommandBuffer, CeresEngine::GLCommandBuffer, CeresEngine::VKCommandBuffer, and CeresEngine::WGCommandBuffer.
|
delete |
|
delete |
Records a sequence of commands to be executed by the GPU.
| recorder | A block to be executed by the command buffer. |
|
pure virtual |
| void CeresEngine::GPUCommandBuffer::setRayTracingPipelineStackSize | ( | ) |
Sets a single scissor rectangle.
scissors but only a single scissor rectangle is set. scissors being empty. Otherwise, the behavior is undefined. Reimplemented in CeresEngine::MTCommandBuffer, CeresEngine::MKCommandBuffer, CeresEngine::NLCommandBuffer, CeresEngine::GLCommandBuffer, CeresEngine::VKCommandBuffer, and CeresEngine::WGCommandBuffer.
|
pure virtual |
Sets an array of scissor rectangles, but only if the scissor test was enabled in the previously set graphics pipeline (otherwise, this function has no effect).
| scissors | The scissor rectangles to be set. Most render system have a limit of 16 viewports. |
scissors being empty. Otherwise, the behavior is undefined. Implemented in CeresEngine::MTCommandBuffer, CeresEngine::MKCommandBuffer, CeresEngine::NLCommandBuffer, CeresEngine::GLCommandBuffer, CeresEngine::VKCommandBuffer, and CeresEngine::WGCommandBuffer.
Sets a single viewport.
viewports but only a single viewport is set. viewports being empty. Otherwise, the behavior is undefined. Reimplemented in CeresEngine::MTCommandBuffer, CeresEngine::MKCommandBuffer, CeresEngine::NLCommandBuffer, CeresEngine::GLCommandBuffer, CeresEngine::VKCommandBuffer, and CeresEngine::WGCommandBuffer.
|
pure virtual |
Sets an array of viewports.
| viewports | The viewports to be set. Most render system have a limit of 16 viewports. |
viewports being empty. Otherwise, the behavior is undefined. Implemented in CeresEngine::MTCommandBuffer, CeresEngine::MKCommandBuffer, CeresEngine::NLCommandBuffer, CeresEngine::GLCommandBuffer, CeresEngine::VKCommandBuffer, and CeresEngine::WGCommandBuffer.
|
delete |
Inherited constructors.
|
inlineexplicit |
Inherited constructors.
|
delete |
Inherited constructors.
| void CeresEngine::GPUCommandBuffer::traceRays | ( | ) |
| void CeresEngine::GPUCommandBuffer::traceRaysIndirect | ( | ) |
|
pure virtual |
Updates the data of the specified buffer during encoding the command buffer.
| dstBuffer | Specifies the destination buffer whose data is to be updated. |
| dstOffset | Specifies the destination offset (in bytes) at which the buffer is to be updated. This offset plus the data block size (i.e. dstOffset + dataSize) must be less than or equal to the size of the buffer. |
| data | Raw pointer to the data with which the buffer is to be updated. This must not be nullptr! |
| dataSize | Specifies the size (in bytes) of the data block which is to be updated. This is limited to 2^16 = 65536 bytes, because it may be written to the command buffer itself before it is copied to the destination buffer (depending on the backend). |
writeBuffer() or Buffer::map. Implemented in CeresEngine::MTCommandBuffer, CeresEngine::MKCommandBuffer, CeresEngine::NLCommandBuffer, CeresEngine::GLCommandBuffer, CeresEngine::VKCommandBuffer, and CeresEngine::WGCommandBuffer.
| void CeresEngine::GPUCommandBuffer::writeAccelerationStructuresProperties | ( | ) |
An event triggered whenever the command buffer has finished execution.