10c9f36bdd
The important aspect is that it allows knowing the uniforms that will be used by a set of processors without having to create ProgramImpls. GrProcessor subclasses specify uniforms at creation time in a similar style to how GrGeometryProcessors already specify attributes. That is, they initialize a span of structs describing the uniform which may contain void uniforms that are skipped. Unlike attributes, the struct contains an offset into the processor where the data is stored. GrUniformAggregator is used to collect the uniforms from all processors that compose a draw and mangle their names. The ProgramImpl subclasses query the aggregator for their uniform names when emitting code. The old system for uniforms is left intact and only three processors, one GP, one FP, and one XP, are updated to use the new system. Some pieces that are missing before everything can be moved over: -support for uniforms not owned by GrProcessor (e.g. rt-adjust) -support for samplers -helpers for common patterns (e.g. GrGeometryProcessor::ProgramImpl::setupUniformColor(), and the various matrix helpers on ProgramImpl) Bug: skia:12182 Change-Id: I21c1b7a8940eb9b8aad003f5a2569e43977a33d2 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440841 Reviewed-by: Michael Ludwig <michaelludwig@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com> |
||
---|---|---|
.. | ||
android | ||
c | ||
codec | ||
config | ||
core | ||
docs | ||
effects | ||
encode | ||
gpu | ||
pathops | ||
ports | ||
private | ||
sksl | ||
svg | ||
third_party | ||
utils |