[graphite] Support uniform buffers in ComputeSteps
* Introduced the `ComptueStep::prepareUniformBuffer()` method which is
invoked with a `UniformManager` pointer to handle the field encoding with
the correct layout constraints.
* Unlike RenderSteps, ComputeSteps do not use a PipelineDataGatherer nor
to they need to declare their uniforms using the `Uniform` POD type,
since ComputeSteps are not assembled from snippets. However, they
still need to call `UniformManager::setExpectedUniforms` to satisfy
UniformManager's debug validation assertions.
* Renamed `ComputeStep::prepareBuffer()` to `prepareStorageBuffer()` as
this is now exclusively used for internally allocated storage buffers.
Change-Id: I7e30a4402a5aeb6cd4eafd5abde2f999e431eb76
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/665584
Commit-Queue: Arman Uguray <armansito@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
4 files changed