C Specification

To query acceleration structure size parameters on the host, call:

// Provided by VK_KHR_acceleration_structure
VkResult vkWriteAccelerationStructuresPropertiesKHR(
    VkDevice                                    device,
    uint32_t                                    accelerationStructureCount,
    const VkAccelerationStructureKHR*           pAccelerationStructures,
    VkQueryType                                 queryType,
    size_t                                      dataSize,
    void*                                       pData,
    size_t                                      stride);

Parameters

  • device is the device which owns the acceleration structures in pAccelerationStructures.

  • accelerationStructureCount is the count of acceleration structures for which to query the property.

  • pAccelerationStructures is a pointer to an array of existing previously built acceleration structures.

  • queryType is a VkQueryType value specifying the property to be queried.

  • dataSize is the size in bytes of the buffer pointed to by pData.

  • pData is a pointer to an application-allocated buffer where the results will be written.

  • stride is the stride in bytes between results for individual queries within pData.

Description

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

Valid Usage
Valid Usage (Implicit)
  • VUID-vkWriteAccelerationStructuresPropertiesKHR-device-parameter
    device must be a valid VkDevice handle

  • VUID-vkWriteAccelerationStructuresPropertiesKHR-pAccelerationStructures-parameter
    pAccelerationStructures must be a valid pointer to an array of accelerationStructureCount valid VkAccelerationStructureKHR handles

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

  • VUID-vkWriteAccelerationStructuresPropertiesKHR-pData-parameter
    pData must be a valid pointer to an array of dataSize bytes

  • VUID-vkWriteAccelerationStructuresPropertiesKHR-accelerationStructureCount-arraylength
    accelerationStructureCount must be greater than 0

  • VUID-vkWriteAccelerationStructuresPropertiesKHR-dataSize-arraylength
    dataSize must be greater than 0

  • VUID-vkWriteAccelerationStructuresPropertiesKHR-pAccelerationStructures-parent
    Each element of pAccelerationStructures must have been created, allocated, or retrieved from device

Return Codes
On success, this command returns
On failure, this command returns

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