## 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 specifies the acceleration structure to get memory requirements for.

• pMemoryRequirements returns the requested acceleration structure memory requirements.

## Description

Valid Usage (Implicit)