Skip to main content
Defines the inputs for a raytracing acceleration structure build operation. This structure is used by ID3D12GraphicsCommandList4::BuildRaytracingAccelerationStructure and ID3D12Device5::GetRaytracingAccelerationStructurePrebuildInfo.

Syntax

Members

Type
Type: D3D12_RAYTRACING_ACCELERATION_STRUCTURE_TYPE
The type of acceleration structure to build. Flags
Type: D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAGS
The build flags. NumDescs
Type: UINT
If Type is D3D12_RAYTRACING_ACCELERATION_STRUCTURE_TOP_LEVEL, this value is the number of instances, laid out based on DescsLayout. If Type is D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BOTTOM_LEVEL, this value is the number of elements referred to by pGeometryDescs or ppGeometryDescs. Which of these fields is used depends on DescsLayout. DescsLayout
Type: D3D12_ELEMENTS_LAYOUT
How geometry descriptions are specified; either an array of descriptions or an array of pointers to descriptions. InstanceDescs
Type: D3D12_GPU_VIRTUAL_ADDRESS
If Type is D3D12_RAYTRACING_ACCELERATION_STRUCTURE_TOP_LEVEL, this refers to NumDescsD3D12_RAYTRACING_INSTANCE_DESC structures in GPU memory describing instances. Each instance must be aligned to 16 bytes, defined as D3D12_RAYTRACING_INSTANCE_DESC_BYTE_ALIGNMENT. If Type is not D3D12_RAYTRACING_ACCELERATION_STRUCTURE_TOP_LEVEL, this parameter is unused. If DescLayout is D3D12_ELEMENTS_LAYOUT_ARRAY, InstanceDescs points to an array of instance descriptions in GPU memory. If DescLayout is D3D12_ELEMENTS_LAYOUT_ARRAY_OF_POINTERS, InstanceDescs points to an array in GPU memory of D3D12_GPU_VIRTUAL_ADDRESS pointers to instance descriptions. The memory pointed to must be in state D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE. pGeometryDescs
Type: const D3D12_RAYTRACING_GEOMETRY_DESC *
If Type is D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BOTTOM_LEVEL, and DescsLayout is D3D12_ELEMENTS_LAYOUT_ARRAY, this field is used and points to NumDescs contiguous D3D12_RAYTRACING_GEOMETRY_DESC structures on the CPU, describing individual geometries. If Type is not D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BOTTOM_LEVEL or DescsLayout is not D3D12_ELEMENTS_LAYOUT_ARRAY, this parameter is unused. ppGeometryDescs
Type: const D3D12_RAYTRACING_GEOMETRY_DESC *const *
If Type is D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BOTTOM_LEVEL, and DescsLayout is D3D12_ELEMENTS_LAYOUT_ARRAY_OF_POINTERS, this field is used and points to an array of NumDescs pointers to D3D12_RAYTRACING_GEOMETRY_DESC structures on the CPU, describing individual geometries.

Remarks

When used with GetRaytracingAccelerationStructurePrebuildInfo, which actually perform a build, any parameter that is referenced via D3D12_GPU_VIRTUAL_ADDRESS (an address in GPU memory), like InstanceDescs, will not be accessed by the operation. So this memory does not need to be initialized yet or be in a particular resource state. Whether GPU addresses are null or not can be inspected by the operation, even though the pointers are not dereferenced.

Requirements

Header: d3d12_xs.h
Library: d3d12_xs.lib
Supported Platforms: XBOX Series consoles
Last modified on August 20, 2026