Reland "Disable tessellation when we don't have indirect draw support"
This is a reland of b05571f0b8
Original change's description:
> Disable tessellation when we don't have indirect draw support
>
> Avoids the polyfill that uses looping instanced draws. This has led to
> perf regressions on android.
>
> Bug: skia:11138 skia:11139 chromium:1163441
> Change-Id: I129bf96c6d8a3eaadc79bfca496c7d50189f737e
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/350738
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
Bug: skia:11138 skia:11139 chromium:1163441 skia:11152
Change-Id: I416dfd1f85aad78786a31ca6390ff40bbe906a19
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/352095
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This commit is contained in:
parent
5045de33e7
commit
8f282f5d9f
src/gpu
@ -36,7 +36,12 @@ constexpr static auto kAtlasAlgorithm = GrDynamicAtlas::RectanizerAlgorithm::kPo
|
||||
constexpr static int kMaxAtlasPathHeight = 128;
|
||||
|
||||
bool GrTessellationPathRenderer::IsSupported(const GrCaps& caps) {
|
||||
return caps.drawInstancedSupport() &&
|
||||
return !caps.avoidStencilBuffers() &&
|
||||
caps.drawInstancedSupport() &&
|
||||
// We see perf regressions on platforms that don't have native support for indirect
|
||||
// draws. Disable while we investigate.
|
||||
// (crbug.com/1163441, skbug.com/11138, skbug.com/11139)
|
||||
caps.nativeDrawIndirectSupport() &&
|
||||
caps.shaderCaps()->vertexIDSupport() &&
|
||||
!caps.disableTessellationPathRenderer();
|
||||
}
|
||||
@ -127,8 +132,7 @@ void GrTessellationPathRenderer::initAtlasFlags(GrRecordingContext* rContext) {
|
||||
GrPathRenderer::CanDrawPath GrTessellationPathRenderer::onCanDrawPath(
|
||||
const CanDrawPathArgs& args) const {
|
||||
const GrStyledShape& shape = *args.fShape;
|
||||
if (args.fCaps->avoidStencilBuffers() ||
|
||||
shape.style().hasPathEffect() ||
|
||||
if (shape.style().hasPathEffect() ||
|
||||
args.fViewMatrix->hasPerspective() ||
|
||||
shape.style().strokeRec().getStyle() == SkStrokeRec::kStrokeAndFill_Style ||
|
||||
shape.inverseFilled() ||
|
||||
|
@ -426,6 +426,11 @@ void GrVkCaps::init(const GrContextOptions& contextOptions, const GrVkInterface*
|
||||
fMaxPushConstantsSize = 0;
|
||||
}
|
||||
|
||||
if (kQualcomm_VkVendor == properties.vendorID) {
|
||||
// Indirect draws seem slow on QC. Disable until we can investigate. http://skbug.com/11139
|
||||
fNativeDrawIndirectSupport = false;
|
||||
}
|
||||
|
||||
if (kARM_VkVendor == properties.vendorID) {
|
||||
// ARM seems to do better with more fine triangles as opposed to using the sample mask.
|
||||
// (At least in our current round rect op.)
|
||||
|
Loading…
Reference in New Issue
Block a user