<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLDispatchThreadgroupsIndirectArguments",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:@SA@MTLDispatchThreadgroupsIndirectArguments"
  },
  "title" : "MTLDispatchThreadgroupsIndirectArguments"
}
-->

# MTLDispatchThreadgroupsIndirectArguments

The data layout required for arguments needed to specify the size of threadgroups.

```
struct MTLDispatchThreadgroupsIndirectArguments
```

## Topics

### Creating dispatch arguments

### Specifying the size of the threadgroup

[`init()`](/documentation/Metal/MTLDispatchThreadgroupsIndirectArguments/init())

Returns a new data layout for dispatching threadgroups over indirect buffer calls.

[`init(threadgroupsPerGrid:)`](/documentation/Metal/MTLDispatchThreadgroupsIndirectArguments/init(threadgroupsPerGrid:))

Returns a new data layout for dispatching threadgroups over indirect buffer calls, with specified threadgroups per grid.

[`threadgroupsPerGrid`](/documentation/Metal/MTLDispatchThreadgroupsIndirectArguments/threadgroupsPerGrid)

The number of threadgroups for the grid, in each dimension.

## See Also

[`dispatchThreadgroups(indirectBuffer:indirectBufferOffset:threadsPerThreadgroup:)`](/documentation/Metal/MTLComputeCommandEncoder/dispatchThreadgroups(indirectBuffer:indirectBufferOffset:threadsPerThreadgroup:))

Encodes a dispatch call for a compute pass, using an indirect buffer that defines the size of a grid that aligns to threadgroup boundaries.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)