vkGetAccelerationStructureMemoryRequirementsKHR(3)

# vkGetAccelerationStructureMemoryRequirementsKHR(3) Manual Page

## Name

vkGetAccelerationStructureMemoryRequirementsKHR - Get acceleration structure memory requirements

## 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_KHR` and `VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_KHR` 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:

    void vkGetAccelerationStructureMemoryRequirementsKHR(
        VkDevice                                    device,
        const VkAccelerationStructureMemoryRequirementsInfoKHR* pInfo,
        VkMemoryRequirements2*                      pMemoryRequirements);

## Parameters

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

- `pInfo` specifies the acceleration structure to get memory requirements for.

- `pMemoryRequirements` returns the requested acceleration structure memory requirements.

## Description

Valid Usage (Implicit)

- `device` must be a valid VkDevice handle

- `pInfo` must be a valid pointer to a valid VkAccelerationStructureMemoryRequirementsInfoKHR structure

- `pMemoryRequirements` must be a valid pointer to a VkMemoryRequirements2 structure

## See Also

VkAccelerationStructureMemoryRequirementsInfoKHR, VkDevice, VkMemoryRequirements2

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