Skip to content

Commit

Permalink
Specify dispatchIndirect behavior when exceeding limit (gpuweb#2417)
Browse files Browse the repository at this point in the history
The rest of the behavior of this command isn't specified yet, but this
gets this into the spec so we can close the issue and edit later.

Fixes gpuweb#323
  • Loading branch information
kainino0x authored Dec 16, 2021
1 parent 77b139b commit 4586d8a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions spec/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -6856,7 +6856,7 @@ dictionary GPUComputePassDescriptor : GPUObjectDescriptorBase {
<div class=validusage>
- [$Validate encoder bind groups$](|this|, |this|.{{GPUComputePassEncoder/[[pipeline]]}})
is `true`.
- all of |x|, |y| and |z| are less than
- all of |x|, |y| and |z| are less than or equal to
|this|.device.limits.{{supported limits/maxComputeWorkgroupsPerDimension}}.
</div>

Expand All @@ -6879,8 +6879,8 @@ dictionary GPUComputePassDescriptor : GPUObjectDescriptorBase {
See [[#computing-operations]] for the detailed specification.

The <dfn dfn for=>indirect dispatch parameters</dfn> encoded in the buffer must be a tightly
packed block of **three 32-bit unsigned integer values (12 bytes total)**, given in the same
order as the arguments for {{GPUComputePassEncoder/dispatch()}}. For example:
packed block of **three 32-bit unsigned integer values (12 bytes total)**,
given in the same order as the arguments for {{GPUComputePassEncoder/dispatch()}}. For example:

<pre highlight="js">
let dispatchIndirectParameters = new Uint32Array(3);
Expand Down Expand Up @@ -6915,7 +6915,9 @@ dictionary GPUComputePassDescriptor : GPUObjectDescriptorBase {
1. Add |indirectBuffer| to the [=usage scope=] as {{GPUBufferUsage/INDIRECT}}.
</div>

Issue: add some validation related to {{supported limits/maxComputeWorkgroupsPerDimension}}.
If any of the dispatch parameters (x, y, or z) is greater than
|this|.device.limits.{{supported limits/maxComputeWorkgroupsPerDimension}},
no workgroups will be dispatched.
</div>
</dl>

Expand Down

0 comments on commit 4586d8a

Please sign in to comment.