Skip to content

LiteFX::Rendering::Backends::VulkanCommandBuffer::transfer

Performs a buffer-to-buffer transfer from a temporary buffer into target.

Synopsis

Declared in <litefx/backends/vulkan.hpp>

[[dllimport, dllexport]] virtual void transfer(
    Span<void const const*> data,
    size_t elementSize,
    IVulkanImage const& target,
    UInt32 firstSubresource = 0,
    UInt32 subresources = 1) const override;

Description

This method creates a temporary buffer and maps data into it, before transferring it into target. A reference of the temporary buffer is stored until the parent command queue finished using the command buffer. At this point, the command queue calls releaseSharedState to release all shared references. Note that this is a relaxed constraint. It is only guaranteed, that the queue calls this method at some point after the command buffer has been executed.

Parameters

NameDescription
dataThe addresses that mark the beginning of the element data to map.
elementSizeThe number of bytes to map for each element.
targetThe target buffer to transfer data to.
firstSubresourceThe index of the first sub-resource of the target image to receive data.
subresourcesA type for an unsigned 32 bit integer.