vkCopyMicromapToMemoryEXT(3)

# vkCopyMicromapToMemoryEXT(3) Manual Page

## Name

vkCopyMicromapToMemoryEXT - Serialize a micromap on the host

Loading… please wait.

## C Specification

To copy a micromap to host accessible memory, call:

    // Provided by VK_EXT_opacity_micromap
    VkResult vkCopyMicromapToMemoryEXT(
        VkDevice                                    device,
        VkDeferredOperationKHR                      deferredOperation,
        const VkCopyMicromapToMemoryInfoEXT*        pInfo);

## Parameters

- `device` is the device which owns `pInfo->src`.

- `deferredOperation` is an optional VkDeferredOperationKHR to request deferral for this command.

- `pInfo` is a pointer to a VkCopyMicromapToMemoryInfoEXT structure defining the copy operation.

## Description

This command fulfills the same task as vkCmdCopyMicromapToMemoryEXT but is executed by the host.

This command produces the same results as vkCmdCopyMicromapToMemoryEXT, but writes its result directly to a host pointer, and is executed on the host rather than the device. The output may not necessarily be bit-for-bit identical, but it can be equally used by either vkCmdCopyMemoryToMicromapEXT or vkCopyMemoryToMicromapEXT.

Valid Usage

- VUID-vkCopyMicromapToMemoryEXT-deferredOperation-03678
  Any previous deferred operation that was associated with `deferredOperation` must be complete

- VUID-vkCopyMicromapToMemoryEXT-buffer-07568
  The `buffer` used to create `pInfo->src` must be bound to host-visible device memory

- VUID-vkCopyMicromapToMemoryEXT-pInfo-07569
  `pInfo->dst.hostAddress` must be a valid host pointer

- VUID-vkCopyMicromapToMemoryEXT-pInfo-07570
  `pInfo->dst.hostAddress` must be aligned to 16 bytes

- VUID-vkCopyMicromapToMemoryEXT-micromapHostCommands-07571
  The `VkPhysicalDeviceOpacityMicromapFeaturesEXT`::`micromapHostCommands` feature must be enabled

- VUID-vkCopyMicromapToMemoryEXT-buffer-07572
  The `buffer` used to create `pInfo->src` must be bound to memory that was not allocated with multiple instances

Valid Usage (Implicit)

- VUID-vkCopyMicromapToMemoryEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCopyMicromapToMemoryEXT-deferredOperation-parameter
  If `deferredOperation` is not VK_NULL_HANDLE, `deferredOperation` must be a valid VkDeferredOperationKHR handle

- VUID-vkCopyMicromapToMemoryEXT-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkCopyMicromapToMemoryInfoEXT structure

- VUID-vkCopyMicromapToMemoryEXT-deferredOperation-parent
  If `deferredOperation` is a valid handle, it must have been created, allocated, or retrieved from `device`

Return Codes

On success, this command returns

  - VK_OPERATION_DEFERRED_KHR

  - VK_OPERATION_NOT_DEFERRED_KHR

  - VK_SUCCESS

On failure, this command returns

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

## See Also

VK_EXT_opacity_micromap, VkCopyMicromapToMemoryInfoEXT, VkDeferredOperationKHR, VkDevice

## 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-2026 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0