[graphite] Introduce DispatchGroup and DispatchGroup::Builder

DispatchGroup represents a unit of sequentially executed compute
dispatches which share resources. Each dispatch is an invocation of a
ComputeStep instance over a common draw operation (represented by
common DrawParams).

A DispatchGroup is intended as the new building block for a ComputeTask.
It is the compute analog of a DrawPass, and handles pipeline creation,
resource tracking, and interacts with command encoding in a similar way.

ComputeSteps can be accummulated into a DispatchGroup using a
DispatchGroup::Builder which in particular handles the buffer allocation
and sharing among individual dispatches, using the resource layouts
described by the ComputeSteps.

Bug: b/238793429, b/240604614
Change-Id: Ie9ab3361420b63d6314b613cbf03f80320f1cbf9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/644559
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
4 files changed