D3D12_DISPATCH_RAYS_DESC structure (d3d12.h)

Describes the properties of a ray dispatch operation initiated with a call to ID3D12GraphicsCommandList4::DispatchRays.

Syntax

typedef struct D3D12_DISPATCH_RAYS_DESC {
  D3D12_GPU_VIRTUAL_ADDRESS_RANGE            RayGenerationShaderRecord;
  D3D12_GPU_VIRTUAL_ADDRESS_RANGE_AND_STRIDE MissShaderTable;
  D3D12_GPU_VIRTUAL_ADDRESS_RANGE_AND_STRIDE HitGroupTable;
  D3D12_GPU_VIRTUAL_ADDRESS_RANGE_AND_STRIDE CallableShaderTable;
  UINT                                       Width;
  UINT                                       Height;
  UINT                                       Depth;
} D3D12_DISPATCH_RAYS_DESC;

Members

RayGenerationShaderRecord

The shader record for the ray generation shader to use.

The memory pointed to must be in state D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE.

The address must be aligned to 64 bytes, defined as D3D12_RAYTRACING_SHADER_TABLE_BYTE_ALIGNMENT, and in the range [0...4096] bytes.

MissShaderTable

The shader table for miss shaders.

The stride is record stride, and must be aligned to 32 bytes, defined as D3D12_RAYTRACING_SHADER_RECORD_BYTE_ALIGNMENT, and in the range [0...4096] bytes. 0 is allowed.

The memory pointed to must be in state D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE.

The address must be aligned to 64 bytes, defined as D3D12_RAYTRACING_SHADER_TABLE_BYTE_ALIGNMENT.

HitGroupTable

The shader table for hit groups.

The stride is record stride, and must be aligned to 32 bytes, defined as D3D12_RAYTRACING_SHADER_RECORD_BYTE_ALIGNMENT, and in the range [0...4096] bytes. 0 is allowed.

The memory pointed to must be in state D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE.

The address must be aligned to 64 bytes, defined as D3D12_RAYTRACING_SHADER_TABLE_BYTE_ALIGNMENT.

CallableShaderTable

The shader table for callable shaders.

The stride is record stride, and must be aligned to 32 bytes, defined as D3D12_RAYTRACING_SHADER_RECORD_BYTE_ALIGNMENT. 0 is allowed.

The memory pointed to must be in state D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE.

The address must be aligned to 64 bytes, defined as D3D12_RAYTRACING_SHADER_TABLE_BYTE_ALIGNMENT.

Width

The width of the generation shader thread grid.

Height

The height of the generation shader thread grid.

Depth

The depth of the generation shader thread grid.

Requirements

Requirement Value
Header d3d12.h