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

# D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_DESC

> Describes a raytracing acceleration structure. Pass this structure into ID3D12GraphicsCommandList4::BuildRaytracingAccelerationStructure to describe the.

Describes a raytracing acceleration structure. Pass this structure into [ID3D12GraphicsCommandList4::BuildRaytracingAccelerationStructure](/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist4/methods/id3d12graphicscommandlist4_buildraytracingaccelerationstructure_public) to describe the acceleration structure to be built.

## Syntax

```cpp theme={null}
typedef struct D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_DESC
{
    D3D12_GPU_VIRTUAL_ADDRESS DestAccelerationStructureData;
    D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_INPUTS Inputs;
    D3D12_GPU_VIRTUAL_ADDRESS SourceAccelerationStructureData;
    D3D12_GPU_VIRTUAL_ADDRESS ScratchAccelerationStructureData;
} D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_DESC
```

### Members

*DestAccelerationStructureData*\
Type: D3D12\_GPU\_VIRTUAL\_ADDRESS

Location to store resulting acceleration structure.  [ID3D12Device5::GetRaytracingAccelerationStructurePrebuildInfo](/reference/graphics/d3d12/interfaces/id3d12device5/methods/id3d12device5_getraytracingaccelerationstructureprebuildinfo_public) reports the amount of memory required for the result here given a set of acceleration structure build parameters.

The address must be aligned to 256 bytes, defined as [D3D12\_RAYTRACING\_ACCELERATION\_STRUCTURE\_BYTE\_ALIGNMENT](https://learn.microsoft.com/en-us/windows/desktop/direct3d12/constants).

<Info>
  The memory must be in state [**D3D12\_RESOURCE\_STATE\_RAYTRACING\_ACCELERATION\_STRUCTURE**](/reference/graphics/d3d12_x/enums/d3d12_resource_states).
</Info>

*Inputs*\
Type: D3D12\_BUILD\_RAYTRACING\_ACCELERATION\_STRUCTURE\_INPUTS

Description of the input data for the acceleration structure build.  This is data is stored in a separate structure because it is also used with **GetRaytracingAccelerationStructurePrebuildInfo**.

*SourceAccelerationStructureData*\
Type: D3D12\_GPU\_VIRTUAL\_ADDRESS

Address of an existing acceleration structure if an acceleration structure update (an incremental build) is being requested, by setting  [D3D12\_RAYTRACING\_ACCELERATION\_STRUCTURE\_BUILD\_FLAG\_PERFORM\_UPDATE](/reference/graphics/d3d12/enums/d3d12_raytracing_acceleration_structure_build_flags_public) in the Flags parameter.  Otherwise this address must be NULL.

If this address is the same as <i>DestAccelerationStructureData</i>, the update is to be performed in-place.  Any other form of overlap of the source and destination memory is invalid and produces undefined behavior.

The address must be aligned to 256 bytes, defined as [D3D12\_RAYTRACING\_ACCELERATION\_STRUCTURE\_BYTE\_ALIGNMENT](https://learn.microsoft.com/en-us/windows/desktop/direct3d12/constants), which should automatically be the case because any existing acceleration structure passed in here would have already been required to be placed with such alignment.

<Info>
  The memory must be in state [**D3D12\_RESOURCE\_STATE\_RAYTRACING\_ACCELERATION\_STRUCTURE**](/reference/graphics/d3d12_x/enums/d3d12_resource_states).
</Info>

#### ScratchAccelerationStructureData

Location where the build will store temporary data.  **GetRaytracingAccelerationStructurePrebuildInfo** reports the amount of scratch memory the implementation will need for a given set of acceleration structure build parameters.

<Info>
  The memory must be in state [**D3D12\_RESOURCE\_STATE\_UNORDERED\_ACCESS**](/reference/graphics/d3d12_x/enums/d3d12_resource_states).
</Info>

*ScratchAccelerationStructureData*\
Type: D3D12\_GPU\_VIRTUAL\_ADDRESS

## Requirements

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


## Related topics

- [BuildRaytracingAccelerationStructure (XBOX Series consoles)](/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist4/methods/id3d12graphicscommandlist4_buildraytracingaccelerationstructure_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_DESC](/reference/graphics/d3d12/structs/d3d12_raytracing_acceleration_structure_postbuild_info_desc_public.md)
- [D3D12_RAYTRACING_GEOMETRY_DESC (XBOX Series consoles)](/reference/graphics/d3d12/structs/d3d12_raytracing_geometry_desc_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)
