SpiecsEngine
 
Loading...
Searching...
No Matches

◆ CopyBuffer()

void Spices::VulkanBuffer::CopyBuffer ( VkBuffer srcBuffer,
VkBuffer dstBuffer,
VkDeviceSize size )

Copy data from a buffer to another.

Parameters
[in]srcBufferThe buffer copy from.
[in]dstBufferThe buffer copy to.
[in]sizeThe buffer size(byres).

Use CustomCmd.

Instance a VkBufferCopy.

Copy Cmd.

Use CustomCmd.

Instance a VkBufferCopy.

Copy Cmd.

Definition at line 63 of file VulkanBuffer.cpp.

68 {
70
75
79 VkBufferCopy copyRegion{};
80 copyRegion.srcOffset = 0;
81 copyRegion.dstOffset = 0;
82 copyRegion.size = size;
83
87 vkCmdCopyBuffer(commandBuffer, srcBuffer, dstBuffer, 1, &copyRegion);
88 });
89 }
#define SPICES_PROFILE_ZONE
static void CustomGraphicCmd(VulkanState &vulkanState, T func)
Create a new command buffer and record custom cmd, submit to graphic queue, execute it immediately.
VulkanState & m_VulkanState
The global VulkanState Referenced from VulkanRenderBackend.

References Spices::VulkanObject::m_VulkanState.