C Specification

To query micromap size parameters call:

// Provided by VK_EXT_opacity_micromap
void vkCmdWriteMicromapsPropertiesEXT(
    VkCommandBuffer                             commandBuffer,
    uint32_t                                    micromapCount,
    const VkMicromapEXT*                        pMicromaps,
    VkQueryType                                 queryType,
    VkQueryPool                                 queryPool,
    uint32_t                                    firstQuery);

Parameters

  • commandBuffer is the command buffer into which the command will be recorded.

  • micromapCount is the count of micromaps for which to query the property.

  • pMicromaps is a pointer to an array of existing previously built micromaps.

  • queryType is a VkQueryType value specifying the type of queries managed by the pool.

  • queryPool is the query pool that will manage the results of the query.

  • firstQuery is the first query index within the query pool that will contain the micromapCount number of results.

Description

Accesses to any of the micromaps listed in pMicromaps 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.

Valid Usage
  • VUID-vkCmdWriteMicromapsPropertiesEXT-queryPool-07525
    queryPool must have been created with a queryType matching queryType

  • VUID-vkCmdWriteMicromapsPropertiesEXT-queryPool-07526
    The queries identified by queryPool and firstQuery must be unavailable

  • VUID-vkCmdWriteMicromapsPropertiesEXT-buffer-07527
    The buffer used to create each micromap in pMicrmaps must be bound to device memory

  • VUID-vkCmdWriteMicromapsPropertiesEXT-query-07528
    The sum of query plus micromapCount must be less than or equal to the number of queries in queryPool

Valid Usage (Implicit)
  • VUID-vkCmdWriteMicromapsPropertiesEXT-commandBuffer-parameter
    commandBuffer must be a valid VkCommandBuffer handle

  • VUID-vkCmdWriteMicromapsPropertiesEXT-pMicromaps-parameter
    pMicromaps must be a valid pointer to an array of micromapCount valid VkMicromapEXT handles

  • VUID-vkCmdWriteMicromapsPropertiesEXT-queryType-parameter
    queryType must be a valid VkQueryType value

  • VUID-vkCmdWriteMicromapsPropertiesEXT-queryPool-parameter
    queryPool must be a valid VkQueryPool handle

  • VUID-vkCmdWriteMicromapsPropertiesEXT-commandBuffer-recording
    commandBuffer must be in the recording state

  • VUID-vkCmdWriteMicromapsPropertiesEXT-commandBuffer-cmdpool
    The VkCommandPool that commandBuffer was allocated from must support VK_QUEUE_COMPUTE_BIT operations

  • VUID-vkCmdWriteMicromapsPropertiesEXT-renderpass
    This command must only be called outside of a render pass instance

  • VUID-vkCmdWriteMicromapsPropertiesEXT-suspended
    This command must not be called between suspended render pass instances

  • VUID-vkCmdWriteMicromapsPropertiesEXT-videocoding
    This command must only be called outside of a video coding scope

  • VUID-vkCmdWriteMicromapsPropertiesEXT-micromapCount-arraylength
    micromapCount must be greater than 0

  • VUID-vkCmdWriteMicromapsPropertiesEXT-commonparent
    Each of commandBuffer, queryPool, and the elements of pMicromaps must have been created, allocated, or retrieved from the same VkDevice

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

VK_QUEUE_COMPUTE_BIT

Action

Conditional Rendering

vkCmdWriteMicromapsPropertiesEXT is not affected by conditional rendering

See Also

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

SPDX-License-Identifier: CC-BY-4.0