> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GetRaytracingAccelerationStructurePrebuildInfo

> Query the driver for resource requirements to build an acceleration structure.

Query the driver for resource requirements to build an acceleration structure.

## Syntax

```cpp theme={null}
void GetRaytracingAccelerationStructurePrebuildInfo(
    const D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_INPUTS  pDesc,
    D3D12_RAYTRACING_ACCELERATION_STRUCTURE_PREBUILD_INFO  pInfo
)
```

### Parameters

*pDesc \[in]*\
Type: const D3D12\_BUILD\_RAYTRACING\_ACCELERATION\_STRUCTURE\_INPUTS \*

Description of the acceleration structure build. This structure is shared with [BuildRaytracingAccelerationStructure](/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist4/methods/id3d12graphicscommandlist4_buildraytracingaccelerationstructure_public).  For more information, see [D3D12\_BUILD\_RAYTRACING\_ACCELERATION\_STRUCTURE\_INPUTS](/reference/graphics/d3d12/structs/d3d12_build_raytracing_acceleration_structure_inputs_public).

The implementation is allowed to look at all the CPU parameters in this struct and nested structs.  It may not inspect/dereference any GPU virtual addresses, other than to check to see if a pointer is NULL or not, such as the optional transform in [D3D12\_RAYTRACING\_GEOMETRY\_TRIANGLES\_DESC](/reference/graphics/d3d12/structs/d3d12_raytracing_geometry_triangles_desc_public), without dereferencing it. In other words, the calculation of resource requirements for the acceleration structure does not depend on the actual geometry data (such as vertex positions), rather it can only depend on overall properties, such as the number of triangles, number of instances etc.

*pInfo \[out]*\
Type: D3D12\_RAYTRACING\_ACCELERATION\_STRUCTURE\_PREBUILD\_INFO \*

The result of the query.

### Return value

Type: void

None.

## Remarks

The input acceleration structure description is the same as what goes into [BuildRaytracingAccelerationStructure](/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist4/methods/id3d12graphicscommandlist4_buildraytracingaccelerationstructure_public). The result of this function lets the application provide the correct amount of output storage and scratch storage to **BuildRaytracingAccelerationStructure** given the same geometry.

Builds can also be done with the same configuration passed to **GetAccelerationStructurePrebuildInfo** overall except equal or smaller counts for the number of geometries/instances or the  number of vertices/indices/AABBs in any given geometry.  In this case the storage requirements reported with the original sizes passed to **GetRaytracingAccelerationStructurePrebuildInfo** will be valid - the build may actually consume less space but not more.  This is handy for app scenarios where having conservatively large storage allocated for acceleration structures is fine.

This method is on the device interface as opposed to command list on the assumption that drivers must be able to calculate resource requirements for an acceleration structure build from only looking at the CPU-visible portions of the call, without having to dereference any pointers to GPU memory containing actual vertex data, index data, etc.

## Requirements

**Header:** d3d12\_xs.h\
**Library:** d3d12\_xs.lib\
**Supported Platforms**: XBOX Series consoles

## See Also

[ID3D12Device5](/reference/graphics/d3d12/interfaces/id3d12device5/id3d12device5_public)


## Related topics

- [D3D12_RAYTRACING_ACCELERATION_STRUCTURE_PREBUILD_INFO](/reference/graphics/d3d12/structs/d3d12_raytracing_acceleration_structure_prebuild_info_public.md)
- [D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_INPUTS](/reference/graphics/d3d12/structs/d3d12_build_raytracing_acceleration_structure_inputs_public.md)
- [D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_CURRENT_SIZE_DESC (XBOX Series consoles)](/reference/graphics/d3d12/structs/d3d12_raytracing_acceleration_structure_postbuild_info_current_size_desc_public.md)
- [D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_DESC](/reference/graphics/d3d12/structs/d3d12_build_raytracing_acceleration_structure_desc_public.md)
- [D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_COMPACTED_SIZE_DESC (XBOX Series consoles)](/reference/graphics/d3d12/structs/d3d12_raytracing_acceleration_structure_postbuild_info_compacted_size_desc_public.md)
