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

# BuildRaytracingAccelerationStructure (XBOX Series consoles)

> Performs a raytracing acceleration structure build on the GPU and optionally outputs post-build information immediately after the build.

Performs a raytracing acceleration structure build on the GPU and optionally outputs post-build information immediately after the build.

## Syntax

```cpp theme={null}
void BuildRaytracingAccelerationStructure(
    const D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_DESC  pDesc,
    UINT NumPostbuildInfoDescs,
    const D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_DESC  pPostbuildInfoDescs
)
```

### Parameters

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

Description of the acceleration structure to build.

*NumPostbuildInfoDescs \[in]*\
Type: UINT

Size of the <i>pPostbuildInfoDescs</i> array.  Set to 0 if no post-build info is needed.

*pPostbuildInfoDescs \[in]*\
Type: const D3D12\_RAYTRACING\_ACCELERATION\_STRUCTURE\_POSTBUILD\_INFO\_DESC \*

Optional array of descriptions for post-build info to generate describing properties of the acceleration structure that was built.

### Return value

Type: void

None.

## Remarks

This method can be called on graphics or compute command lists but not from bundles.

Post-build information can also be obtained separately from an already built acceleration structure by calling [EmitRaytracingAccelerationStructurePostbuildInfo](/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist4/methods/id3d12graphicscommandlist4_emitraytracingaccelerationstructurepostbuildinfo_public).  The advantage of generating post-build info along with a build is that a barrier isn't needed in between the build completing and requesting post-build information, enabling scenarios where the app needs the post-build info right away.

## Requirements

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

## See Also

[ID3D12GraphicsCommandList4](/reference/graphics/d3d12_xs/interfaces/ID3D12GraphicsCommandList4/id3d12graphicscommandlist4)


## Related topics

- [D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_TOOLS_VISUALIZATION_HEADER (XBOX Series consoles)](/reference/graphics/d3d12/structs/d3d12_build_raytracing_acceleration_structure_tools_visualization_header_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)
- [CopyRaytracingAccelerationStructure (XBOX Series consoles)](/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist4/methods/id3d12graphicscommandlist4_copyraytracingaccelerationstructure_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_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_SERIALIZATION_DESC (XBOX Series consoles)](/reference/graphics/d3d12/structs/d3d12_raytracing_acceleration_structure_postbuild_info_serialization_desc_public.md)
