D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_DESC structure (d3d12.h)
Describes a raytracing acceleration structure. Pass this structure into ID3D12GraphicsCommandList4::BuildRaytracingAccelerationStructure to describe the acceleration structure to be built.
Syntax
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
Location to store resulting acceleration structure. ID3D12Device5::GetRaytracingAccelerationStructurePrebuildInfo 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.
Important
The memory must be in state D3D12_RESOURCE_STATE_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
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 in the Flags parameter. Otherwise this address must be NULL.
If this address is the same as DestAccelerationStructureData, 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, 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.
Important
The memory must be in state D3D12_RESOURCE_STATE_RAYTRACING_ACCELERATION_STRUCTURE.
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.
Important
The memory must be in state D3D12_RESOURCE_STATE_UNORDERED_ACCESS.
ScratchAccelerationStructureData
Requirements
Requirement | Value |
---|---|
Header | d3d12.h |