Calculates the number of workgroups to dispatch, clamped to the device's maxComputeWorkgroupsPerDimension limit (default 65535 across most devices).
maxComputeWorkgroupsPerDimension
rows
dispatchWorkgroups(n)
cols
{ x, y }
dispatchWorkgroups(x, y)
row count (1D: element count)
Optional
column count; omit for a 1D dispatch
GPUSupportedLimits (maxComputeWorkgroupsPerDimension)
Calculates the number of workgroups to dispatch, clamped to the device's
maxComputeWorkgroupsPerDimensionlimit (default 65535 across most devices).rows): returns a single count fordispatchWorkgroups(n).rowsandcols): returns{ x, y }fordispatchWorkgroups(x, y).rowsmaps to the y dimension andcolsmaps to the x dimension.