Revert "Disable tessellation when we don't have indirect draw support"

This reverts commit b05571f0b8.

Reason for revert: Android crash

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>

TBR=bsalomon@google.com,csmartdalton@google.com

Change-Id: Iebb473211ff618c1988aa5b7306e3e39efa353f5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11138 skia:11139 chromium:1163441
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/351216
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This commit is contained in:
Chris Dalton 2021-01-07 15:15:45 +00:00 committed by Skia Commit-Bot
parent f710147302
commit dc8ed8fb8b
2 changed files with 3 additions and 12 deletions

View File

@ -36,12 +36,7 @@ constexpr static auto kAtlasAlgorithm = GrDynamicAtlas::RectanizerAlgorithm::kPo
constexpr static int kMaxAtlasPathHeight = 128;
bool GrTessellationPathRenderer::IsSupported(const GrCaps& caps) {
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() &&
return caps.drawInstancedSupport() &&
caps.shaderCaps()->vertexIDSupport() &&
!caps.disableTessellationPathRenderer();
}
@ -132,7 +127,8 @@ void GrTessellationPathRenderer::initAtlasFlags(GrRecordingContext* rContext) {
GrPathRenderer::CanDrawPath GrTessellationPathRenderer::onCanDrawPath(
const CanDrawPathArgs& args) const {
const GrStyledShape& shape = *args.fShape;
if (shape.style().hasPathEffect() ||
if (args.fCaps->avoidStencilBuffers() ||
shape.style().hasPathEffect() ||
args.fViewMatrix->hasPerspective() ||
shape.style().strokeRec().getStyle() == SkStrokeRec::kStrokeAndFill_Style ||
shape.inverseFilled() ||

View File

@ -424,11 +424,6 @@ 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.)