vkGetAccelerationStructureMemoryRequirementsNV(3)

# vkGetAccelerationStructureMemoryRequirementsNV(3) Manual Page

## Name

vkGetAccelerationStructureMemoryRequirementsNV - Get acceleration structure memory requirements

Loading… please wait.

## C Specification

An acceleration structure has memory requirements for the structure object itself, scratch space for the build, and scratch space for the update.

Scratch space is allocated as a `VkBuffer`, so for `VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV` and `VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV` the `pMemoryRequirements->alignment` and `pMemoryRequirements->memoryTypeBits` values returned by this call must be filled with zero, and should be ignored by the application.

To query the memory requirements, call:

    // Provided by VK_NV_ray_tracing
    void vkGetAccelerationStructureMemoryRequirementsNV(
        VkDevice                                    device,
        const VkAccelerationStructureMemoryRequirementsInfoNV* pInfo,
        VkMemoryRequirements2KHR*                   pMemoryRequirements);

## Parameters

- `device` is the logical device on which the acceleration structure was created.

- `pInfo` is a pointer to a VkAccelerationStructureMemoryRequirementsInfoNV structure specifying the acceleration structure to get memory requirements for.

- `pMemoryRequirements` is a pointer to a VkMemoryRequirements2KHR structure in which the requested acceleration structure memory requirements are returned.

## Description

Valid Usage (Implicit)

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

- VUID-vkGetAccelerationStructureMemoryRequirementsNV-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkAccelerationStructureMemoryRequirementsInfoNV structure

- VUID-vkGetAccelerationStructureMemoryRequirementsNV-pMemoryRequirements-parameter
  `pMemoryRequirements` must be a valid pointer to a VkMemoryRequirements2KHR structure

## See Also

VK_NV_ray_tracing, VkAccelerationStructureMemoryRequirementsInfoNV, VkDevice, VkMemoryRequirements2KHR

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

SPDX-License-Identifier: CC-BY-4.0