D3D12_DISPATCH_ARGUMENTS structure (d3d12.h)

Describes dispatch parameters, for use by the compute shader.

Syntax

typedef struct D3D12_DISPATCH_ARGUMENTS {
  UINT ThreadGroupCountX;
  UINT ThreadGroupCountY;
  UINT ThreadGroupCountZ;
} D3D12_DISPATCH_ARGUMENTS;

Members

ThreadGroupCountX

The size, in thread groups, of the x-dimension of the thread-group grid.

ThreadGroupCountY

The size, in thread groups, of the y-dimension of the thread-group grid.

ThreadGroupCountZ

The size, in thread groups, of the z-dimension of the thread-group grid.

Remarks

The members of this structure serve the same purpose as the parameters of Dispatch.

A compiled compute shader defines the set of instructions to execute per thread and the number of threads to run per group. The thread-group parameters indicate how many thread groups to execute. Each thread group contains the same number of threads, as defined by the compiled compute shader. The thread groups are organized in a three-dimensional grid. The total number of thread groups that the compiled compute shader executes is determined by the following calculation:

ThreadGroupCountX * ThreadGroupCountY * ThreadGroupCountZ

In particular, if any of the values in the thread-group parameters are 0, nothing will happen.

The maximum size of any dimension is 65535.

Requirements

Requirement Value
Header d3d12.h

See also

Core Structures