> ## 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_DISPATCH_RAYS_DESC (XBOX Series consoles)

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

Describes the properties of a ray dispatch operation initiated with a call to [ID3D12GraphicsCommandList4::DispatchRays](/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist4/methods/id3d12graphicscommandlist4_dispatchrays_public).

## Syntax

```cpp theme={null}
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*\
Type: D3D12\_GPU\_VIRTUAL\_ADDRESS\_RANGE

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](/reference/graphics/d3d12_x/enums/d3d12_resource_states).

The address must be aligned to 64 bytes, defined as [D3D12\_RAYTRACING\_SHADER\_TABLE\_BYTE\_ALIGNMENT](https://learn.microsoft.com/en-us/windows/desktop/direct3d12/constants), and in the range \[0...4096] bytes.

*MissShaderTable*\
Type: D3D12\_GPU\_VIRTUAL\_ADDRESS\_RANGE\_AND\_STRIDE

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](https://learn.microsoft.com/en-us/windows/desktop/direct3d12/constants), 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](/reference/graphics/d3d12_x/enums/d3d12_resource_states).

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

*HitGroupTable*\
Type: D3D12\_GPU\_VIRTUAL\_ADDRESS\_RANGE\_AND\_STRIDE

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](https://learn.microsoft.com/en-us/windows/desktop/direct3d12/constants), 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](/reference/graphics/d3d12_x/enums/d3d12_resource_states).

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

*CallableShaderTable*\
Type: D3D12\_GPU\_VIRTUAL\_ADDRESS\_RANGE\_AND\_STRIDE

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](https://learn.microsoft.com/en-us/windows/desktop/direct3d12/constants). 0 is allowed.

The memory pointed to must be in state [D3D12\_RESOURCE\_STATE\_NON\_PIXEL\_SHADER\_RESOURCE](/reference/graphics/d3d12_x/enums/d3d12_resource_states).

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

*Width*\
Type: UINT

The width of the generation shader thread grid.

*Height*\
Type: UINT

The height of the generation shader thread grid.

*Depth*\
Type: UINT

The depth of the generation shader thread grid.

## Requirements

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


## Related topics

- [DispatchRays (XBOX Series consoles)](/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist4/methods/id3d12graphicscommandlist4_dispatchrays_public.md)
- [D3D12_RAYTRACING_GEOMETRY_DESC (XBOX Series consoles)](/reference/graphics/d3d12/structs/d3d12_raytracing_geometry_desc_public.md)
- [D3D12_RAYTRACING_INSTANCE_DESC (XBOX Series consoles)](/reference/graphics/d3d12/structs/d3d12_raytracing_instance_desc_public.md)
- [D3D12_RAYTRACING_GEOMETRY_AABBS_DESC (XBOX Series consoles)](/reference/graphics/d3d12/structs/d3d12_raytracing_geometry_aabbs_desc_public.md)
- [D3D12_RAYTRACING_GEOMETRY_FLAGS (XBOX Series consoles)](/reference/graphics/d3d12/enums/d3d12_raytracing_geometry_flags_public.md)
