C Specification
To update device memory inline in a command buffer, call:
// Provided by VK_KHR_device_address_commands
void vkCmdUpdateMemoryKHR(
VkCommandBuffer commandBuffer,
const VkDeviceAddressRangeKHR* pDstRange,
VkAddressCommandFlagsKHR dstFlags,
VkDeviceSize dataSize,
const void* pData);
Parameters
-
commandBufferis the command buffer into which the command will be recorded. -
pDstRangeis a pointer to the VkDeviceAddressRangeKHR selecting the memory range to be updated. -
dstFlagsis a VkAddressCommandFlagsKHR value defining the copy flags for the destination address range. -
dataSizeis the number of bytes to update, and must be a multiple of 4. -
pDatais a pointer to the source data for the buffer update, and must be at leastdataSizebytes in size.
Description
The source data is copied from pData to the command buffer when the
command is called, and then copied to dstRange when the command is
executed on a device.
|
Note
|
Due to the data being copied into command buffers, memory range copies are recommended for larger data transfers, to avoid excessive memory consumption. |
Document Notes
For more information, see the Vulkan Specification.
This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.