Adds a module that performs instanced rendering and starts using it
for a select subset of draws on Mac GL platforms. The instance
processor can currently handle rects, ovals, round rects, and double
round rects. It can generalize shapes as round rects in order to
improve batching. The instance processor also employs new drawing
algorithms, irrespective of instanced rendering, that improve GPU-side
performance (e.g. sample mask, different triangle layouts, etc.).
This change only scratches the surface of instanced rendering. The
majority of draws still only have one instance. Future work may
include:
* Passing coord transforms through the texel buffer.
* Sending FP uniforms through instanced vertex attribs.
* Using instanced rendering for more draws (stencil writes,
drawAtlas, etc.).
* Adding more shapes to the instance processor’s repertoire.
* Batching draws that have mismatched scissors (analyzing draw
bounds, inserting clip planes, etc.).
* Bindless textures.
* Uber shaders.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2066993003
Committed: https://skia.googlesource.com/skia/+/42eafa4bc00354b132ad114d22ed6b95d8849891
Review-Url: https://codereview.chromium.org/2066993003
This patch adds a new markdown file describing the new debugger along
with instructions on running it locally and a sweet screenshot. The
screenshot has been sized to not be clipped when viewed in production.
The old documentation for the qt-based debugger has been marked as
deprecated and all docs referencing the old debugger have been updated.
BUG=skia:5493
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2121673002
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=2121673002
Review-Url: https://codereview.chromium.org/2121673002
Reason for revert:
This caused static initializer regressions in Chromium (crbug.com/625728).
Relevant build logs here:
Linux:
https://build.chromium.org/p/chromium/builders/Linux%20x64/builds/21849
Mac:
https://build.chromium.org/p/chromium/builders/Mac/builds/17350
Relevant lines from the error log:
Linux:
# InstanceProcessor.cpp GrUniqueKey::GenerateDomain()
# InstanceProcessor.cpp gr_instanced::kShapeBufferDomain
FAILED linux-release-64/sizes/nacl_helper-si/initializers: actual 8, expected 7, better lower
FAILED linux-release-64/sizes/chrome-si/initializers: actual 8, expected 7, better lower
Mac:
FAILED mac-release/sizes/chrome-si/initializers: actual 2, expected 0, better lower
Original issue's description:
> Begin instanced rendering for simple shapes
>
> Adds a module that performs instanced rendering and starts using it
> for a select subset of draws on Mac GL platforms. The instance
> processor can currently handle rects, ovals, round rects, and double
> round rects. It can generalize shapes as round rects in order to
> improve batching. The instance processor also employs new drawing
> algorithms, irrespective of instanced rendering, that improve GPU-side
> performance (e.g. sample mask, different triangle layouts, etc.).
>
> This change only scratches the surface of instanced rendering. The
> majority of draws still only have one instance. Future work may
> include:
>
> * Passing coord transforms through the texel buffer.
> * Sending FP uniforms through instanced vertex attribs.
> * Using instanced rendering for more draws (stencil writes,
> drawAtlas, etc.).
> * Adding more shapes to the instance processor’s repertoire.
> * Batching draws that have mismatched scissors (analyzing draw
> bounds, inserting clip planes, etc.).
> * Bindless textures.
> * Uber shaders.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2066993003
>
> Committed: https://skia.googlesource.com/skia/+/42eafa4bc00354b132ad114d22ed6b95d8849891
NOTREECHECKS=true
TBR=bsalomon@google.com,egdaniel@google.com,robertphillips@google.com,csmartdalton@google.com
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=skia:
Review-Url: https://codereview.chromium.org/2123693002
The original caching logic for sample locations wishfully assumed that
the GPU would always use the same sample pattern for render targets
that had the same number of samples. It turns out we can't rely on
that. This change improves the caching logic to handle mismatched
simple patterns with the same count, and adds a unit test that
emulates different sample patterns observed on real hardware.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2111423002
Review-Url: https://codereview.chromium.org/2111423002
Reason for revert:
I believe this is causing the Chromium DEPS roll to fail due to linux_blink_rel. Reverting for now to get the roll going again.
Original issue's description:
> Increase batching for AA fill rects.
>
> This allows batching of rects provided without a local matrix when local coords are required and when the view matrix changes.
>
> It also allows batching of rects with a local matrix with rects without a local matrix.
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2116823002
>
> Committed: https://skia.googlesource.com/skia/+/e525ecaf63f225f1da6e9834f7a291c06ad44d23TBR=robertphillips@google.com,bsalomon@google.com
NOTREECHECKS=true
# Not skipping CQ checks because original CL landed more than 1 days ago.
Review-Url: https://codereview.chromium.org/2124603002