Nikolai
Nikolai

Reputation: 1173

What are WEBGPU workgroup_size limits?

I have simple compute shader like:

@compute @workgroup_size(x, y, z)
fn main(@builtin(global_invocation_id) global_id : vec3<u32>) {
    ...
}

where x, y and z are some integers. But I suppose the size of a data, I want to handle will be super large. So what is the maximum value I can specify for x, y and z? If it is system-dependent, so how I can determine it programmatically? How can I handle data, that is out of these limits?

Upvotes: 1

Views: 1478

Answers (1)

dj2
dj2

Reputation: 9618

The maximum values are listed in the spec with:

  • Maximum X - 256
  • Maximum Y - 256
  • Maximum Z - 64

With an overall maximum of (X * Y * Z of 65535)

Upvotes: -1

Related Questions