Fix tessellation checks for "usesVaryingCoords"
We can't use our hardware tessellation back door if any FPs in the
program have varyings. Before this CL, we were forgetting to check the
clip FP for strokes, and weren't checking any FPs yet for fills.
Bug: skia:10419
Change-Id: Ica631ab3cf0407fb359c02c6d53f88f5f301cddc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/417237
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
diff --git a/samplecode/SamplePathTessellators.cpp b/samplecode/SamplePathTessellators.cpp
index 18e8f2f..e154694 100644
--- a/samplecode/SamplePathTessellators.cpp
+++ b/samplecode/SamplePathTessellators.cpp
@@ -74,30 +74,34 @@
const GrCaps& caps = flushState->caps();
int numVerbsToGetMiddleOut = 0;
int numVerbsToGetTessellation = caps.minPathVerbsForHwTessellation();
+ auto pipeline = GrSimpleMeshDrawOpHelper::CreatePipeline(flushState, std::move(fProcessors),
+ fPipelineFlags);
switch (fMode) {
using DrawInnerFan = GrPathCurveTessellator::DrawInnerFan;
case Mode::kWedgeMiddleOut:
fTessellator = GrPathWedgeTessellator::Make(alloc, fMatrix, kCyan,
- numVerbsToGetMiddleOut, caps);
+ numVerbsToGetMiddleOut, *pipeline,
+ caps);
break;
case Mode::kCurveMiddleOut:
fTessellator = GrPathCurveTessellator::Make(alloc, fMatrix, kCyan,
DrawInnerFan::kYes,
- numVerbsToGetMiddleOut, caps);
+ numVerbsToGetMiddleOut, *pipeline,
+ caps);
break;
case Mode::kWedgeTessellate:
fTessellator = GrPathWedgeTessellator::Make(alloc, fMatrix, kCyan,
- numVerbsToGetTessellation, caps);
+ numVerbsToGetTessellation, *pipeline,
+ caps);
break;
case Mode::kCurveTessellate:
fTessellator = GrPathCurveTessellator::Make(alloc, fMatrix, kCyan,
DrawInnerFan::kYes,
- numVerbsToGetTessellation, caps);
+ numVerbsToGetTessellation, *pipeline,
+ caps);
break;
}
fTessellator->prepare(flushState, this->bounds(), fPath);
- auto pipeline = GrSimpleMeshDrawOpHelper::CreatePipeline(flushState, std::move(fProcessors),
- fPipelineFlags);
fProgram = GrTessellationShader::MakeProgram({alloc, flushState->writeView(),
&flushState->dstProxyView(),
flushState->renderPassBarriers(),