SPARK  0.1.0
A general purpose game engine written in C++.
Loading...
Searching...
No Matches
spark::render::vk::VulkanCommandBuffer Class Referencefinal

Vulkan implementation of ICommandBuffer. More...

#include <VulkanCommandBuffer.h>

Inheritance diagram for spark::render::vk::VulkanCommandBuffer:
spark::render::CommandBuffer< VulkanCommandBuffer, IVulkanBuffer, IVulkanVertexBuffer, IVulkanIndexBuffer, IVulkanImage, VulkanPipelineState > spark::render::Resource< VkCommandBuffer > spark::render::ICommandBuffer spark::render::IResource< VkCommandBuffer >

Classes

struct  Impl
 

Public Member Functions

 VulkanCommandBuffer (const VulkanQueue &queue, bool begin_recording=false, bool is_primary=true)
 
 VulkanCommandBuffer (const VulkanCommandBuffer &other)=delete
 
 VulkanCommandBuffer (VulkanCommandBuffer &&other) noexcept=delete
 
VulkanCommandBufferoperator= (const VulkanCommandBuffer &other)=delete
 
VulkanCommandBufferoperator= (VulkanCommandBuffer &&other) noexcept=delete
 
void begin () const override
 Sets the command buffer to recording state, allowing it to receive commands that should be transmitted to the CommandQueue.
 
void begin (const VulkanRenderPass &render_pass) const
 Begins the command buffer as a secondary command buffer that inherits the state of renderPass.
 
void end () const override
 Ends the recording of the command buffer.
 
bool isRecording () const noexcept override
 Checks if the command buffer is recording.
 
bool isSecondary () const noexcept override
 Checks if the command buffer is a secondary command buffer.
 
void transfer (IVulkanBuffer &source, IVulkanBuffer &target, unsigned source_element, unsigned target_element, unsigned elements) const override
 Performs a buffer to buffer transfer from source to target.
 
void transfer (IVulkanImage &source, IVulkanBuffer &target, unsigned first_subresource, unsigned target_element, unsigned subresources) const override
 Performs a buffer to buffer transfer from source to target.
 
void transfer (IVulkanBuffer &source, IVulkanImage &target, unsigned source_element, unsigned first_subresource, unsigned elements) const override
 Performs a buffer to buffer transfer from source to target.
 
void transfer (IVulkanImage &source, IVulkanImage &target, unsigned source_subresource, unsigned target_subresource, unsigned subresources) const override
 Performs a buffer to buffer transfer from source to target.
 
void transfer (std::shared_ptr< IVulkanBuffer > source, IVulkanBuffer &target, unsigned source_element, unsigned target_element, unsigned elements) const override
 Performs a buffer to buffer transfer from source to target.
 
void transfer (std::shared_ptr< IVulkanBuffer > source, IVulkanImage &target, unsigned source_element, unsigned first_subresource, unsigned elements) const override
 Performs a buffer to buffer transfer from source to target.
 
void transfer (std::shared_ptr< IVulkanImage > source, IVulkanImage &target, unsigned first_subresource, unsigned target_element, unsigned subresources) const override
 Performs a buffer to buffer transfer from source to target.
 
void transfer (std::shared_ptr< IVulkanImage > source, IVulkanBuffer &target, unsigned first_subresource, unsigned target_element, unsigned subresources) const override
 Performs a buffer to buffer transfer from source to target.
 
void use (const VulkanPipelineState &pipeline) const noexcept override
 Sets the pipeline to be used for subsequent draw calls.
 
void bind (const VulkanDescriptorSet &descriptor_set) const override
 Sets the pipeline to be used for subsequent draw calls.
 
void bind (const VulkanDescriptorSet &descriptor_set, const VulkanPipelineState &pipeline) const noexcept override
 Binds the descriptor_set to the last pipeline used by the command buffer.
 
void bind (const IVulkanIndexBuffer &index_buffer) const noexcept override
 Binds the descriptor_set to the last pipeline used by the command buffer.
 
void bind (const IVulkanVertexBuffer &vertex_buffer) const noexcept override
 Binds the descriptor_set to the last pipeline used by the command buffer.
 
void draw (unsigned vertices, unsigned instances, unsigned first_vertex, unsigned first_instance) const noexcept override
 Draw a number of vertices from the currently bound vertex buffer.
 
void draw (const IVulkanVertexBuffer &vertex_buffer, unsigned instances, unsigned first_vertex, unsigned first_instance) const noexcept override
 Draw a number of vertices from the currently bound vertex buffer.
 
void drawIndexed (unsigned indices, unsigned instances, unsigned first_index, int vertex_offset, unsigned first_instance) const noexcept override
 Draws the currently bound vertex buffer with a set of indices from the currently bound index buffer.
 
void drawIndexed (const IVulkanIndexBuffer &index_buffer, unsigned instances, unsigned first_index, int vertex_offset, unsigned first_instance) const noexcept override
 Draws the currently bound vertex buffer with a set of indices from the currently bound index buffer.
 
void drawIndexed (const IVulkanVertexBuffer &vertex_buffer, const IVulkanIndexBuffer &index_buffer, unsigned instances, unsigned first_index, int vertex_offset, unsigned first_instance) const noexcept override
 Draws the currently bound vertex buffer with a set of indices from the currently bound index buffer.
 
void dispatch () const noexcept override
 Executes a compute shader.
 
void execute (std::shared_ptr< const VulkanCommandBuffer > command_buffer) const override
 Executes a secondary command buffer.
 
void execute (const std::vector< std::shared_ptr< const VulkanCommandBuffer > > &command_buffers) const override
 Executes a secondary command buffer.
 
void pushConstants (const VulkanPushConstantsLayout &layout, const void *const memory) const noexcept override
 Pushes a block of memory into the push constants backing memory.
 
void setViewport (const IViewport *viewport) const noexcept override
 Sets the viewport to use for subsequent draw calls.
 
void setViewports (std::span< const IViewport * > viewports) const noexcept override
 Sets the viewports to use for subsequent draw calls.
 
void setScissor (const IScissor *scissor) const noexcept override
 Sets the scissor to use for subsequent draw calls.
 
void setScissors (std::span< const IScissor * > scissors) const noexcept override
 Sets the scissors to use for subsequent draw calls.
 
void setBlendFactors (const math::Vector4< float > &blend_factors) const noexcept override
 Sets the blend factors to use for subsequent draw calls.
 
void setStencilRef (unsigned stencil_ref) const noexcept override
 Sets the stencil reference value to use for subsequent draw calls.
 
void releaseSharedState () const override
 Called by the parent command queue to signal that the command buffer should release it's shared state.
 
- Public Member Functions inherited from spark::render::CommandBuffer< VulkanCommandBuffer, IVulkanBuffer, IVulkanVertexBuffer, IVulkanIndexBuffer, IVulkanImage, VulkanPipelineState >
virtual void transfer (buffer_type &source, buffer_type &target, unsigned source_element, unsigned target_element, unsigned elements) const=0
 Performs a buffer to buffer transfer from source to target.
 
virtual void transfer (image_type &source, buffer_type &target, unsigned first_subresource, unsigned target_element, unsigned subresources) const=0
 Performs a buffer to buffer transfer from source to target.
 
virtual void transfer (buffer_type &source, image_type &target, unsigned source_element, unsigned first_subresource, unsigned elements) const=0
 Performs a buffer to buffer transfer from source to target.
 
virtual void transfer (image_type &source, image_type &target, unsigned source_subresource, unsigned target_subresource, unsigned subresources) const=0
 Performs a buffer to buffer transfer from source to target.
 
virtual void transfer (std::shared_ptr< buffer_type > source, buffer_type &target, unsigned source_element, unsigned target_element, unsigned elements) const=0
 Performs a buffer to buffer transfer from source to target.
 
virtual void transfer (std::shared_ptr< buffer_type > source, image_type &target, unsigned source_element, unsigned first_subresource, unsigned elements) const=0
 Performs a buffer to buffer transfer from source to target.
 
virtual void transfer (std::shared_ptr< image_type > source, image_type &target, unsigned first_subresource, unsigned target_element, unsigned subresources) const=0
 Performs a buffer to buffer transfer from source to target.
 
virtual void transfer (std::shared_ptr< image_type > source, buffer_type &target, unsigned int first_subresource, unsigned int target_element, unsigned int subresources) const=0
 Performs a buffer to buffer transfer from source to target.
 
virtual void use (const pipeline_type &pipeline) const noexcept=0
 Sets the pipeline to be used for subsequent draw calls.
 
virtual void bind (const descriptor_set_type &descriptor_set) const=0
 Binds the descriptor_set to the last pipeline used by the command buffer.
 
virtual void bind (const descriptor_set_type &descriptor_set, const pipeline_type &pipeline) const noexcept=0
 Binds the descriptor_set to the last pipeline used by the command buffer.
 
virtual void bind (const index_buffer_type &index_buffer) const noexcept=0
 Binds the descriptor_set to the last pipeline used by the command buffer.
 
virtual void bind (const vertex_buffer_type &vertex_buffer) const noexcept=0
 Binds the descriptor_set to the last pipeline used by the command buffer.
 
virtual void draw (const vertex_buffer_type &vertex_buffer, unsigned instances, unsigned first_vertex, unsigned first_instance) const noexcept=0
 Draw a number of vertices from the currently bound vertex buffer.
 
virtual void drawIndexed (const index_buffer_type &index_buffer, unsigned instances, unsigned first_index, int vertex_offset, unsigned first_instance) const noexcept=0
 Draws the currently bound vertex buffer with a set of indices from the currently bound index buffer.
 
virtual void drawIndexed (const vertex_buffer_type &vertex_buffer, const index_buffer_type &index_buffer, unsigned instances, unsigned first_index, int vertex_offset, unsigned first_instance) const noexcept=0
 Draws the currently bound vertex buffer with a set of indices from the currently bound index buffer.
 
virtual void execute (std::shared_ptr< const command_buffer_type > command_buffer) const=0
 Executes a secondary command buffer.
 
virtual void execute (const std::vector< std::shared_ptr< const command_buffer_type > > &command_buffers) const=0
 Executes a secondary command buffer.
 
virtual void pushConstants (const push_constants_layout_type &layout, const void *const memory) const noexcept=0
 Pushes a block of memory into the push constants backing memory.
 
- Public Member Functions inherited from spark::render::ICommandBuffer
void transfer (IBuffer &source, IBuffer &target, unsigned int source_element=0, unsigned int target_element=0, unsigned int elements=1) const
 Performs a buffer to buffer transfer from source to target.
 
void transfer (std::shared_ptr< IBuffer > source, IBuffer &target, unsigned int source_element=0, unsigned int target_element=0, unsigned int elements=1) const
 Performs a buffer to buffer transfer from source to target.
 
void transfer (IBuffer &source, IImage &target, unsigned int source_element=0, unsigned int first_subresource=0, unsigned int elements=1) const
 Performs a buffer to image transfer from source to target.
 
void transfer (std::shared_ptr< IBuffer > source, IImage &target, unsigned int source_element=0, unsigned int first_subresource=0, unsigned int elements=1) const
 Performs a buffer to image transfer from source to target.
 
void transfer (IImage &source, IImage &target, unsigned int source_subresource=0, unsigned int target_subresource=0, unsigned int subresources=1) const
 Performs an image to buffer transfer from source to target.
 
void transfer (std::shared_ptr< IImage > source, IImage &target, unsigned int source_subresource=0, unsigned int target_subresource=0, unsigned int subresources=1) const
 Performs an image to buffer transfer from source to target.
 
void transfer (IImage &source, IBuffer &target, unsigned int first_subresource=0, unsigned int target_element=0, unsigned int subresources=1) const
 Performs an image to buffer transfer from source to target.
 
void transfer (std::shared_ptr< IImage > source, IBuffer &target, unsigned int first_subresource=0, unsigned int target_element=0, unsigned int subresources=1) const
 Performs an image to buffer transfer from source to target.
 
void use (const IPipeline &pipeline) const noexcept
 Sets the pipeline to be used for subsequent draw calls.
 
void bind (const IDescriptorSet &descriptor_set) const
 Binds the descriptor_set to the last pipeline used by the command buffer.
 
void bind (const IDescriptorSet &descriptor_set, const IPipeline &pipeline) const noexcept
 Binds the descriptor_set to the pipeline.
 
void bind (const IVertexBuffer &vertex_buffer) const noexcept
 Binds the vertex_buffer to the pipeline.
 
void bind (const IIndexBuffer &index_buffer) const noexcept
 Binds the index_buffer to the pipeline.
 
void draw (unsigned int vertices, unsigned int instances=1, unsigned int first_vertex=0, unsigned int first_instance=0) const noexcept
 Draw a number of vertices from the currently bound vertex buffer.
 
void draw (const IVertexBuffer &vertex_buffer, unsigned int instances=1, unsigned int first_vertex=0, unsigned int first_instance=0) const noexcept
 Draw all vertices from the provided IVertexBuffer in vertex_buffer.
 
void drawIndexed (unsigned int indices, unsigned int instances=1, unsigned int first_index=0, int vertex_offset=0, unsigned int first_instance=0) const noexcept
 Draws the currently bound vertex buffer with a set of indices from the currently bound index buffer.
 
void drawIndexed (const IIndexBuffer &index_buffer, unsigned int instances=1, unsigned int first_index=0, int vertex_offset=0, unsigned int first_instance=0) const noexcept
 Draws the currently bound IVertexBuffer using the provided IIndexBuffer in index_buffer.
 
void drawIndexed (const IVertexBuffer &vertex_buffer, const IIndexBuffer &index_buffer, unsigned int instances=1, unsigned int first_index=0, int vertex_offset=0, unsigned int first_instance=0) const noexcept
 Draws the currently bound IVertexBuffer using the provided IIndexBuffer in index_buffer.
 
void execute (std::shared_ptr< const ICommandBuffer > command_buffer) const
 Executes a secondary command buffer.
 
void execute (const std::vector< std::shared_ptr< const ICommandBuffer > > &command_buffers) const
 Executes a series of secondary command buffers/bundles.
 
void pushConstants (const IPushConstantsLayout &layout, const void *const memory) const noexcept
 Pushes a block of memory into the push constants backing memory.
 
virtual void setStencilRef (unsigned int stencil_ref) const noexcept=0
 Sets the stencil reference value to use for subsequent draw calls.
 
- Public Member Functions inherited from spark::render::Resource< VkCommandBuffer >
 Resource (VkCommandBuffer handle) noexcept
 Initializes the managed resource with the given handle.
 
 Resource (const Resource &other)=delete
 
 Resource (Resource &&other) noexcept=delete
 
Resourceoperator= (const Resource &other)=delete
 
Resourceoperator= (Resource &&other) noexcept=delete
 
const VkCommandBuffer & handle () const final
 Gets the managed resource handle.
 

Additional Inherited Members

- Public Types inherited from spark::render::CommandBuffer< VulkanCommandBuffer, IVulkanBuffer, IVulkanVertexBuffer, IVulkanIndexBuffer, IVulkanImage, VulkanPipelineState >
using command_buffer_type
 
using buffer_type
 
using vertex_buffer_type
 
using index_buffer_type
 
using image_type
 
using pipeline_type
 
using pipeline_layout_type
 
using descriptor_set_layout_type
 
using push_constants_layout_type
 
using descriptor_set_type
 
- Public Types inherited from spark::render::IResource< VkCommandBuffer >
using handle_type
 
- Protected Member Functions inherited from spark::render::Resource< VkCommandBuffer >
VkCommandBuffer & handle () final
 Gets the managed resource handle.
 

Detailed Description

Vulkan implementation of ICommandBuffer.

Member Function Documentation

◆ begin() [1/2]

void spark::render::vk::VulkanCommandBuffer::begin ( ) const
overridevirtual

Sets the command buffer to recording state, allowing it to receive commands that should be transmitted to the CommandQueue.

Note
You should wait for the buffer to be executed before recording again.
Exceptions
spark::base::CommandBufferAlreadyRecordingExceptionif the command buffer is already recording.

Implements spark::render::ICommandBuffer.

◆ begin() [2/2]

void spark::render::vk::VulkanCommandBuffer::begin ( const VulkanRenderPass & render_pass) const

Begins the command buffer as a secondary command buffer that inherits the state of renderPass.

Parameters
render_passThe render pass state to inherit.

◆ bind() [1/4]

void spark::render::vk::VulkanCommandBuffer::bind ( const IVulkanIndexBuffer & index_buffer) const
overridenoexcept

Binds the descriptor_set to the last pipeline used by the command buffer.

Parameters
descriptor_setThe IDescriptorSet to bind.
Exceptions
base::BadArgumentExceptionif the command buffer has not used a pipeline yet.

◆ bind() [2/4]

void spark::render::vk::VulkanCommandBuffer::bind ( const IVulkanVertexBuffer & vertex_buffer) const
overridenoexcept

Binds the descriptor_set to the last pipeline used by the command buffer.

Parameters
descriptor_setThe IDescriptorSet to bind.
Exceptions
base::BadArgumentExceptionif the command buffer has not used a pipeline yet.

◆ bind() [3/4]

void spark::render::vk::VulkanCommandBuffer::bind ( const VulkanDescriptorSet & descriptor_set) const
override

Sets the pipeline to be used for subsequent draw calls.

Parameters
pipelineA IPipeline object to use for subsequent draw calls.

◆ bind() [4/4]

void spark::render::vk::VulkanCommandBuffer::bind ( const VulkanDescriptorSet & descriptor_set,
const VulkanPipelineState & pipeline ) const
overridenoexcept

Binds the descriptor_set to the last pipeline used by the command buffer.

Parameters
descriptor_setThe IDescriptorSet to bind.
Exceptions
base::BadArgumentExceptionif the command buffer has not used a pipeline yet.

◆ dispatch()

void spark::render::vk::VulkanCommandBuffer::dispatch ( ) const
overridevirtualnoexcept

Executes a compute shader.

Implements spark::render::ICommandBuffer.

◆ draw() [1/2]

void spark::render::vk::VulkanCommandBuffer::draw ( const IVulkanVertexBuffer & vertex_buffer,
unsigned instances,
unsigned first_vertex,
unsigned first_instance ) const
overridenoexcept

Draw a number of vertices from the currently bound vertex buffer.

Parameters
verticesThe number of vertices to draw.
instancesThe number of instances to draw.
first_vertexThe index of the first vertex to draw.
first_instanceThe index of the first instance to draw.

◆ draw() [2/2]

void spark::render::vk::VulkanCommandBuffer::draw ( unsigned vertices,
unsigned instances,
unsigned first_vertex,
unsigned first_instance ) const
overridevirtualnoexcept

Draw a number of vertices from the currently bound vertex buffer.

Parameters
verticesThe number of vertices to draw.
instancesThe number of instances to draw.
first_vertexThe index of the first vertex to draw.
first_instanceThe index of the first instance to draw.

Implements spark::render::CommandBuffer< VulkanCommandBuffer, IVulkanBuffer, IVulkanVertexBuffer, IVulkanIndexBuffer, IVulkanImage, VulkanPipelineState >.

◆ drawIndexed() [1/3]

void spark::render::vk::VulkanCommandBuffer::drawIndexed ( const IVulkanIndexBuffer & index_buffer,
unsigned instances,
unsigned first_index,
int vertex_offset,
unsigned first_instance ) const
overridenoexcept

Draws the currently bound vertex buffer with a set of indices from the currently bound index buffer.

Parameters
indicesThe number of indices to draw.
instancesThe number of instances to draw.
first_indexThe index of the first index to draw.
vertex_offsetThe offset to add to each index to find the vertex to draw.
first_instanceThe index of the first instance to draw.

◆ drawIndexed() [2/3]

void spark::render::vk::VulkanCommandBuffer::drawIndexed ( const IVulkanVertexBuffer & vertex_buffer,
const IVulkanIndexBuffer & index_buffer,
unsigned instances,
unsigned first_index,
int vertex_offset,
unsigned first_instance ) const
overridenoexcept

Draws the currently bound vertex buffer with a set of indices from the currently bound index buffer.

Parameters
indicesThe number of indices to draw.
instancesThe number of instances to draw.
first_indexThe index of the first index to draw.
vertex_offsetThe offset to add to each index to find the vertex to draw.
first_instanceThe index of the first instance to draw.

◆ drawIndexed() [3/3]

void spark::render::vk::VulkanCommandBuffer::drawIndexed ( unsigned indices,
unsigned instances,
unsigned first_index,
int vertex_offset,
unsigned first_instance ) const
overridevirtualnoexcept

Draws the currently bound vertex buffer with a set of indices from the currently bound index buffer.

Parameters
indicesThe number of indices to draw.
instancesThe number of instances to draw.
first_indexThe index of the first index to draw.
vertex_offsetThe offset to add to each index to find the vertex to draw.
first_instanceThe index of the first instance to draw.

Implements spark::render::CommandBuffer< VulkanCommandBuffer, IVulkanBuffer, IVulkanVertexBuffer, IVulkanIndexBuffer, IVulkanImage, VulkanPipelineState >.

◆ end()

void spark::render::vk::VulkanCommandBuffer::end ( ) const
overridevirtual

Ends the recording of the command buffer.

Note
You can call this method multiple times but it will do nothing after the first call.

Implements spark::render::ICommandBuffer.

◆ execute() [1/2]

void spark::render::vk::VulkanCommandBuffer::execute ( const std::vector< std::shared_ptr< const VulkanCommandBuffer > > & command_buffers) const
override

Executes a secondary command buffer.

Parameters
command_bufferThe secondary command buffer to execute.

◆ execute() [2/2]

void spark::render::vk::VulkanCommandBuffer::execute ( std::shared_ptr< const VulkanCommandBuffer > command_buffer) const
override

Executes a secondary command buffer.

Parameters
command_bufferThe secondary command buffer to execute.

◆ isRecording()

bool spark::render::vk::VulkanCommandBuffer::isRecording ( ) const
nodiscardoverridevirtualnoexcept

Checks if the command buffer is recording.

Returns
true if the command buffer is recording, false otherwise.

Implements spark::render::ICommandBuffer.

◆ isSecondary()

bool spark::render::vk::VulkanCommandBuffer::isSecondary ( ) const
nodiscardoverridevirtualnoexcept

Checks if the command buffer is a secondary command buffer.

Returns
true if the command buffer is a secondary command buffer, false otherwise.

Implements spark::render::ICommandBuffer.

◆ pushConstants()

void spark::render::vk::VulkanCommandBuffer::pushConstants ( const VulkanPushConstantsLayout & layout,
const void *const memory ) const
overridenoexcept

Pushes a block of memory into the push constants backing memory.

Parameters
layoutThe IPushConstantsLayout to update.
memoryA pointer to the source memory.

◆ releaseSharedState()

void spark::render::vk::VulkanCommandBuffer::releaseSharedState ( ) const
overridevirtual

Called by the parent command queue to signal that the command buffer should release it's shared state.

Implements spark::render::ICommandBuffer.

◆ setBlendFactors()

void spark::render::vk::VulkanCommandBuffer::setBlendFactors ( const math::Vector4< float > & blend_factors) const
overridevirtualnoexcept

Sets the blend factors to use for subsequent draw calls.

Parameters
blend_factorsThe math::Vector4<float> containing the blend factors to use for subsequent draw calls.
Note
Blend factors are set for all render targets that use the blend modes ConstantColor, OneMinusConstantColor, ConstantAlpha or OneMinusConstantAlpha.

Implements spark::render::ICommandBuffer.

◆ setScissor()

void spark::render::vk::VulkanCommandBuffer::setScissor ( const IScissor * scissor) const
overridevirtualnoexcept

Sets the scissor to use for subsequent draw calls.

Parameters
scissorThe IScissor to use for subsequent draw calls.

Implements spark::render::ICommandBuffer.

◆ setScissors()

void spark::render::vk::VulkanCommandBuffer::setScissors ( std::span< const IScissor * > scissors) const
overridevirtualnoexcept

Sets the scissors to use for subsequent draw calls.

Parameters
scissorsA std::span of IScissor to use for subsequent draw calls.

Implements spark::render::ICommandBuffer.

◆ setStencilRef()

void spark::render::vk::VulkanCommandBuffer::setStencilRef ( unsigned stencil_ref) const
overridenoexcept

Sets the stencil reference value to use for subsequent draw calls.

Parameters
stencil_refThe stencil reference value to use for subsequent draw calls.

◆ setViewport()

void spark::render::vk::VulkanCommandBuffer::setViewport ( const IViewport * viewport) const
overridevirtualnoexcept

Sets the viewport to use for subsequent draw calls.

Parameters
viewportThe IViewport to use for subsequent draw calls.

Implements spark::render::ICommandBuffer.

◆ setViewports()

void spark::render::vk::VulkanCommandBuffer::setViewports ( std::span< const IViewport * > viewports) const
overridevirtualnoexcept

Sets the viewports to use for subsequent draw calls.

Parameters
viewportsThe std::span of IViewport to use for subsequent draw calls.

Implements spark::render::ICommandBuffer.

◆ transfer() [1/8]

void spark::render::vk::VulkanCommandBuffer::transfer ( IVulkanBuffer & source,
IVulkanBuffer & target,
unsigned source_element,
unsigned target_element,
unsigned elements ) const
override

Performs a buffer to buffer transfer from source to target.

Parameters
sourceThe source buffer to transfer data from.
targetThe target buffer to transfer data to.
source_elementThe index of the first element to transfer from the source buffer.
target_elementThe index of the first element to transfer to the target buffer.
elementsThe number of elements to transfer.
Exceptions
spark::base::ArgumentOutOfRangeExceptionif the number of either the source or target buffers has not enough elements for the specified elements parameter.

◆ transfer() [2/8]

void spark::render::vk::VulkanCommandBuffer::transfer ( IVulkanBuffer & source,
IVulkanImage & target,
unsigned source_element,
unsigned first_subresource,
unsigned elements ) const
override

Performs a buffer to buffer transfer from source to target.

Parameters
sourceThe source buffer to transfer data from.
targetThe target buffer to transfer data to.
source_elementThe index of the first element to transfer from the source buffer.
target_elementThe index of the first element to transfer to the target buffer.
elementsThe number of elements to transfer.
Exceptions
spark::base::ArgumentOutOfRangeExceptionif the number of either the source or target buffers has not enough elements for the specified elements parameter.

◆ transfer() [3/8]

void spark::render::vk::VulkanCommandBuffer::transfer ( IVulkanImage & source,
IVulkanBuffer & target,
unsigned first_subresource,
unsigned target_element,
unsigned subresources ) const
override

Performs a buffer to buffer transfer from source to target.

Parameters
sourceThe source buffer to transfer data from.
targetThe target buffer to transfer data to.
source_elementThe index of the first element to transfer from the source buffer.
target_elementThe index of the first element to transfer to the target buffer.
elementsThe number of elements to transfer.
Exceptions
spark::base::ArgumentOutOfRangeExceptionif the number of either the source or target buffers has not enough elements for the specified elements parameter.

◆ transfer() [4/8]

void spark::render::vk::VulkanCommandBuffer::transfer ( IVulkanImage & source,
IVulkanImage & target,
unsigned source_subresource,
unsigned target_subresource,
unsigned subresources ) const
override

Performs a buffer to buffer transfer from source to target.

Parameters
sourceThe source buffer to transfer data from.
targetThe target buffer to transfer data to.
source_elementThe index of the first element to transfer from the source buffer.
target_elementThe index of the first element to transfer to the target buffer.
elementsThe number of elements to transfer.
Exceptions
spark::base::ArgumentOutOfRangeExceptionif the number of either the source or target buffers has not enough elements for the specified elements parameter.

◆ transfer() [5/8]

void spark::render::vk::VulkanCommandBuffer::transfer ( std::shared_ptr< IVulkanBuffer > source,
IVulkanBuffer & target,
unsigned source_element,
unsigned target_element,
unsigned elements ) const
override

Performs a buffer to buffer transfer from source to target.

Parameters
sourceThe source buffer to transfer data from.
targetThe target buffer to transfer data to.
source_elementThe index of the first element to transfer from the source buffer.
target_elementThe index of the first element to transfer to the target buffer.
elementsThe number of elements to transfer.
Exceptions
spark::base::ArgumentOutOfRangeExceptionif the number of either the source or target buffers has not enough elements for the specified elements parameter.

◆ transfer() [6/8]

void spark::render::vk::VulkanCommandBuffer::transfer ( std::shared_ptr< IVulkanBuffer > source,
IVulkanImage & target,
unsigned source_element,
unsigned first_subresource,
unsigned elements ) const
override

Performs a buffer to buffer transfer from source to target.

Parameters
sourceThe source buffer to transfer data from.
targetThe target buffer to transfer data to.
source_elementThe index of the first element to transfer from the source buffer.
target_elementThe index of the first element to transfer to the target buffer.
elementsThe number of elements to transfer.
Exceptions
spark::base::ArgumentOutOfRangeExceptionif the number of either the source or target buffers has not enough elements for the specified elements parameter.

◆ transfer() [7/8]

void spark::render::vk::VulkanCommandBuffer::transfer ( std::shared_ptr< IVulkanImage > source,
IVulkanBuffer & target,
unsigned first_subresource,
unsigned target_element,
unsigned subresources ) const
override

Performs a buffer to buffer transfer from source to target.

Parameters
sourceThe source buffer to transfer data from.
targetThe target buffer to transfer data to.
source_elementThe index of the first element to transfer from the source buffer.
target_elementThe index of the first element to transfer to the target buffer.
elementsThe number of elements to transfer.
Exceptions
spark::base::ArgumentOutOfRangeExceptionif the number of either the source or target buffers has not enough elements for the specified elements parameter.

◆ transfer() [8/8]

void spark::render::vk::VulkanCommandBuffer::transfer ( std::shared_ptr< IVulkanImage > source,
IVulkanImage & target,
unsigned first_subresource,
unsigned target_element,
unsigned subresources ) const
override

Performs a buffer to buffer transfer from source to target.

Parameters
sourceThe source buffer to transfer data from.
targetThe target buffer to transfer data to.
source_elementThe index of the first element to transfer from the source buffer.
target_elementThe index of the first element to transfer to the target buffer.
elementsThe number of elements to transfer.
Exceptions
spark::base::ArgumentOutOfRangeExceptionif the number of either the source or target buffers has not enough elements for the specified elements parameter.

◆ use()

void spark::render::vk::VulkanCommandBuffer::use ( const VulkanPipelineState & pipeline) const
overridenoexcept

Sets the pipeline to be used for subsequent draw calls.

Parameters
pipelineA IPipeline object to use for subsequent draw calls.