vkCmdCopyMicromapToMemoryEXT(3)

# vkCmdCopyMicromapToMemoryEXT(3) Manual Page

## Name

vkCmdCopyMicromapToMemoryEXT - Copy a micromap to device memory

Loading… please wait.

## C Specification

To copy a micromap to device memory call:

    // Provided by VK_EXT_opacity_micromap
    void vkCmdCopyMicromapToMemoryEXT(
        VkCommandBuffer                             commandBuffer,
        const VkCopyMicromapToMemoryInfoEXT*        pInfo);

## Parameters

- `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.

## Description

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 matching `VkPhysicalDeviceIDProperties`::`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` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Outside | Compute | Action

## See Also

VK_EXT_opacity_micromap, VkCommandBuffer, VkCopyMicromapToMemoryInfoEXT

## 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.

## Copyright

Copyright 2014-2023 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0