vkCmdCopyMicromapToMemoryEXT
To copy a micromap to device memory call:
void vkCmdCopyMicromapToMemoryEXT(
VkCommandBuffer commandBuffer,
const VkCopyMicromapToMemoryInfoEXT* pInfo);
commandBuffer
is the command buffer into which the command will be recorded.pInfo
is an a pointer to a VkCopyMicromapToMemoryInfoEXT structure defining the copy operation.
Accesses to pInfo→src
must be synchronized with the VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT
pipeline stage and an
access type of
VK_ACCESS_2_MICROMAP_READ_BIT_EXT
.
Accesses to the buffer indicated by pInfo→dst.deviceAddress
must be
synchronized with the VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT
pipeline stage and an access type of VK_ACCESS_TRANSFER_WRITE_BIT
.
This command produces the same results as vkCopyMicromapToMemoryEXT, but writes its result to a device address, and is executed on the device rather than the host. The output may not necessarily be bit-for-bit identical, but it can be equally used by either vkCmdCopyMemoryToMicromapEXT or vkCopyMemoryToMicromapEXT.
The defined header structure for the serialized data consists of:
VK_UUID_SIZE
bytes of data matchingVkPhysicalDeviceIDProperties
::driverUUID
VK_UUID_SIZE
bytes of data identifying the compatibility for comparison using vkGetDeviceMicromapCompatibilityEXT The serialized data is written to the buffer (or read from the buffer) according to the host endianness.
Valid Usage
VUID-vkCmdCopyMicromapToMemoryEXT-pInfo-07536
pInfo→dst.deviceAddress
must be a valid device address for a
buffer bound to device memory
VUID-vkCmdCopyMicromapToMemoryEXT-pInfo-07537
pInfo→dst.deviceAddress
must be aligned to 256
bytes
VUID-vkCmdCopyMicromapToMemoryEXT-pInfo-07538
If the buffer pointed to by pInfo→dst.deviceAddress
is non-sparse
then it must be bound completely and contiguously to a single
VkDeviceMemory object
VUID-vkCmdCopyMicromapToMemoryEXT-buffer-07539
The buffer
used to create pInfo→src
must be bound to
device memory
Valid Usage (Implicit)
VUID-vkCmdCopyMicromapToMemoryEXT-commandBuffer-parameter
commandBuffer
must be a valid VkCommandBuffer handle
VUID-vkCmdCopyMicromapToMemoryEXT-pInfo-parameter
pInfo
must be a valid pointer to a valid VkCopyMicromapToMemoryInfoEXT structure
VUID-vkCmdCopyMicromapToMemoryEXT-commandBuffer-recording
commandBuffer
must be in the recording state
VUID-vkCmdCopyMicromapToMemoryEXT-commandBuffer-cmdpool
The VkCommandPool
that commandBuffer
was allocated from must support compute operations
VUID-vkCmdCopyMicromapToMemoryEXT-renderpass
This command must only be called outside of a render pass instance
VUID-vkCmdCopyMicromapToMemoryEXT-videocoding
This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized ::