skia /
skia /
e727b91ec444203aa559f16e7f55d8fc9cc53c5a [graphite][compute] Buffer clear at DispatchGroup granularity
When storage buffers get requested from DrawBufferManager with the
`Cleared::kYes` argument, DrawBufferManager adds a buffer clear
record to a list. The list gets transfered to a Recording as a single
`ClearBuffersTask` which precedes compute and render tasks.
This doesn't work if a buffer gets reused across two DispatchGroups
under the same Recording, s.t. the first DispatchGroup writes to it
and the second group requires to be cleared to 0.
This CL addresses this issue by having each DispatchGroup maintain its
own separate buffer clear list. When the DispatchGroups get snapped to a
ComputeTask, the clears become individual child tasks that must be
interleaved with compute passes according to their dependency.
Bug: b/301139790
Change-Id: If8f3be6a076a799a827b482f9bf70c3370415f35
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/828477
Commit-Queue: Arman Uguray <armansito@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: James Godfrey-Kittle <jamesgk@google.com>
13 files changed