vkCmdWriteAccelerationStructuresPropertiesNV(3)

# vkCmdWriteAccelerationStructuresPropertiesNV(3) Manual Page

## Name

vkCmdWriteAccelerationStructuresPropertiesNV - Write acceleration structure result parameters to query results.

## C Specification

To query acceleration structure size parameters call:

    void vkCmdWriteAccelerationStructuresPropertiesNV(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    accelerationStructureCount,
        const VkAccelerationStructureNV*            pAccelerationStructures,
        VkQueryType                                 queryType,
        VkQueryPool                                 queryPool,
        uint32_t                                    firstQuery);

## Parameters

- `commandBuffer` is the command buffer into which the command will be recorded.

- `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 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 `accelerationStructureCount` number of results.

## Description

Valid Usage

- `queryType` must be `VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV`

- `queryPool` must have been created with a `queryType` matching `queryType`

- The queries identified by `queryPool` and `firstQuery` must be unavailable

- All acceleration structures in `accelerationStructures` must have been built with `VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_NV` if `queryType` is `VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV`

Valid Usage (Implicit)

- `commandBuffer` must be a valid VkCommandBuffer handle

- `pAccelerationStructures` must be a valid pointer to an array of `accelerationStructureCount` valid VkAccelerationStructureNV handles

- `queryType` must be a valid VkQueryType value

- `queryPool` must be a valid VkQueryPool handle

- `commandBuffer` must be in the recording state

- The `VkCommandPool` that `commandBuffer` was allocated from must support compute operations

- This command must only be called outside of a render pass instance

- `accelerationStructureCount` must be greater than `0`

- Each of `commandBuffer`, `queryPool`, and the elements of `pAccelerationStructures` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

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

## See Also

VkAccelerationStructureNV, VkCommandBuffer, VkQueryPool, VkQueryType

## 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 (c) 2014-2020 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.