vkCmdBuildPartitionedAccelerationStructuresNV(3)

# vkCmdBuildPartitionedAccelerationStructuresNV(3) Manual Page

## Name

vkCmdBuildPartitionedAccelerationStructuresNV - Command for building a PTLAS

Loading… please wait.

## C Specification

To build a partitioned top level acceleration structure, call:

    // Provided by VK_NV_partitioned_acceleration_structure
    void vkCmdBuildPartitionedAccelerationStructuresNV(
        VkCommandBuffer                             commandBuffer,
        const VkBuildPartitionedAccelerationStructureInfoNV* pBuildInfo);

## Parameters

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

- `pBuildInfo` is a pointer to a VkBuildPartitionedAccelerationStructureInfoNV structure containing parameters required for building a PTLAS.

## Description

Accesses to the acceleration structure scratch memory as identified by the VkBuildPartitionedAccelerationStructureInfoNV::`scratchData` must be synchronized with the VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR pipeline stage and an access type of (VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR | VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR).

Accesses to each VkBuildPartitionedAccelerationStructureInfoNV::`srcAccelerationStructureData` and VkBuildPartitionedAccelerationStructureInfoNV::`dstAccelerationStructureData` must be synchronized with the VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR pipeline stage and an access type of VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR or VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR, as appropriate.

Accesses to memory with input data as identified by any used values of VkBuildPartitionedAccelerationStructureInfoNV::`srcInfos` and VkBuildPartitionedAccelerationStructureInfoNV::`srcInfosCount` must be synchronized with the VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR pipeline stage and an access type of VK_ACCESS_INDIRECT_COMMAND_READ_BIT.

Valid Usage

- VUID-vkCmdBuildPartitionedAccelerationStructuresNV-partitionedAccelerationStructure-10536
  The `VkPhysicalDevicePartitionedAccelerationStructureFeaturesNV`::`partitionedAccelerationStructure` feature must be enabled

- VUID-vkCmdBuildPartitionedAccelerationStructuresNV-pBuildInfo-10537
  The count specified in `pBuildInfo->input.instanceCount` for the build operation must not exceed the value provided in `pInfo->instanceCount` when calling vkGetPartitionedAccelerationStructuresBuildSizesNV to determine the memory size

- VUID-vkCmdBuildPartitionedAccelerationStructuresNV-pBuildInfo-10538
  The count specified in `pBuildInfo->input.maxInstancePerPartitionCount` for the build operation must not exceed the value provided in `pInfo->maxInstancePerPartitionCount` when calling vkGetPartitionedAccelerationStructuresBuildSizesNV to determine the memory size

- VUID-vkCmdBuildPartitionedAccelerationStructuresNV-pBuildInfo-10539
  The count specified in `pBuildInfo->input.partitionCount` for the build operation must not exceed the value provided in `pInfo->partitionCount` when calling vkGetPartitionedAccelerationStructuresBuildSizesNV to determine the memory size

- VUID-vkCmdBuildPartitionedAccelerationStructuresNV-pBuildInfo-10540
  The count specified in `pBuildInfo->input.maxInstanceInGlobalPartitionCount` for the build operation must not exceed the value provided in `pInfo->maxInstanceInGlobalPartitionCount` when calling vkGetPartitionedAccelerationStructuresBuildSizesNV to determine the memory size

- VUID-vkCmdBuildPartitionedAccelerationStructuresNV-pBuildInfo-10541
  The scratch memory for the partitioned acceleration structure build specified in `pBuildInfo->scratchData` must be larger than or equal to the scratch size queried with vkGetPartitionedAccelerationStructuresBuildSizesNV

- VUID-vkCmdBuildPartitionedAccelerationStructuresNV-pBuildInfo-10542
  `pBuildInfo->scratchData` must be aligned to `256` bytes

- VUID-vkCmdBuildPartitionedAccelerationStructuresNV-pBuildInfo-10543
  The destination memory of the partitioned acceleration structure build specified in `pBuildInfo->dstAccelerationStructureData` must be larger than or equal to the size queried with vkGetPartitionedAccelerationStructuresBuildSizesNV

- VUID-vkCmdBuildPartitionedAccelerationStructuresNV-pBuildInfo-10544
  `pBuildInfo->srcAccelerationStructureData` must be aligned to `256` bytes

- VUID-vkCmdBuildPartitionedAccelerationStructuresNV-pBuildInfo-10545
  `pBuildInfo->dstAccelerationStructureData` must be aligned to `256` bytes

- VUID-vkCmdBuildPartitionedAccelerationStructuresNV-pBuildInfo-10546
  The number of inputs specified in `pBuildInfo->srcInfos` must be greater than or equal to `pBuildInfo->srcInfosCount`

- VUID-vkCmdBuildPartitionedAccelerationStructuresNV-pBuildInfo-10547
  The memory region containing the acceleration structure at address `pBuildInfo->srcAccelerationStructureData` must not overlap with scratch memory region at address `pBuildInfo->scratchData`

- VUID-vkCmdBuildPartitionedAccelerationStructuresNV-pBuildInfo-10548
  The memory region containing the acceleration structure at address `pBuildInfo->dstAccelerationStructureData` must not overlap with scratch memory region at address `pBuildInfo->scratchData`

- VUID-vkCmdBuildPartitionedAccelerationStructuresNV-pBuildInfo-10549
  If the source and destination acceleration structures are not the same, the memory regions containing the acceleration structures at addresses `pBuildInfo->srcAccelerationStructureData` and `pBuildInfo->dstAccelerationStructureData` must not overlap with each other

- VUID-vkCmdBuildPartitionedAccelerationStructuresNV-pBuildInfo-10550
  `pBuildInfo->scratchData` must be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set

- VUID-vkCmdBuildPartitionedAccelerationStructuresNV-pBuildInfo-10551
  `pBuildInfo->srcInfos` and `pBuildInfo->srcInfosCount` must be device addresses allocated to the application from buffers created with the VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR usage flag set

- VUID-vkCmdBuildPartitionedAccelerationStructuresNV-pBuildInfo-10552
  `pBuildInfo->srcAccelerationStructureData` and `pBuildInfo->dstAccelerationStructureData` must be a device addresses allocated to the application from buffers created with the VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR usage flag set

Valid Usage (Implicit)

- VUID-vkCmdBuildPartitionedAccelerationStructuresNV-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdBuildPartitionedAccelerationStructuresNV-pBuildInfo-parameter
  `pBuildInfo` must be a valid pointer to a valid VkBuildPartitionedAccelerationStructureInfoNV structure

- VUID-vkCmdBuildPartitionedAccelerationStructuresNV-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdBuildPartitionedAccelerationStructuresNV-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT operations

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

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

- VUID-vkCmdBuildPartitionedAccelerationStructuresNV-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 | VK_QUEUE_COMPUTE_BIT | Action

Conditional Rendering

vkCmdBuildPartitionedAccelerationStructuresNV is not affected by conditional rendering

## See Also

VK_NV_partitioned_acceleration_structure, VkBuildPartitionedAccelerationStructureInfoNV, VkCommandBuffer

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