# DeviceLimits

`import { DeviceLimits } from "destack:compute";`

Portable compute limits for one device.

```ds title="DeviceLimits"
export struct DeviceLimits {
    maxBufferBytes: usize;
    minBufferAlignment: usize;
    maxWorkgroupsX: uint32;
    maxWorkgroupsY: uint32;
    maxWorkgroupsZ: uint32;
    maxWorkgroupSizeX: uint32;
    maxWorkgroupSizeY: uint32;
    maxWorkgroupSizeZ: uint32;
    maxWorkgroupInvocations: uint32;
    maxWorkgroupMemoryBytes: usize;
}
```

[language/library/src/compute/capability.ds:35:65](https://github.com/destack-sh/destack/blob/main/language/library/src/compute/capability.ds#L35-L65)

## Members

### `maxBufferBytes: usize`

Maximum bytes in one buffer.

### `minBufferAlignment: usize`

Minimum byte alignment for buffer offsets.

### `maxWorkgroupsX: uint32`

Maximum workgroups in x.

### `maxWorkgroupsY: uint32`

Maximum workgroups in y.

### `maxWorkgroupsZ: uint32`

Maximum workgroups in z.

### `maxWorkgroupSizeX: uint32`

Maximum workgroup size in x.

### `maxWorkgroupSizeY: uint32`

Maximum workgroup size in y.

### `maxWorkgroupSizeZ: uint32`

Maximum workgroup size in z.

### `maxWorkgroupInvocations: uint32`

Maximum invocations in one workgroup.

### `maxWorkgroupMemoryBytes: usize`

Maximum bytes of workgroup memory.
