Compute passes with shared usage scope #2659
Labels
area: performance
How fast things go
help required
We need community help to make this happen.
type: enhancement
New feature or request
Is your feature request related to a problem? Please describe.
Right now, wgpu automatically inserts barriers between any two compute shader dispatches that write to the same buffer. This is necessary in the general case because the programmer may be relying on the dispatches happening sequentially. However, if it is safe to run the dispatches in parallel (say because they write to different regions of the buffer, or use atomics to avoid conflicting with one another) then this can be very wasteful.
Describe the solution you'd like
A field on
ComputePassDescriptor
to indicate whether the whole pass should be one usage scope, instead of the current statregy of a usage scope per dispatch.Describe alternatives you've considered
The user can accept reduced performance or devise potentially complicated schemes to merge all their dispatches into one.
The text was updated successfully, but these errors were encountered: