Increase QuadEdge precision on all platforms

Bug: skia:10594

Change-Id: I853f05f12c0a3b8e25948c51c11fa9bd01cc67f6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343422
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
This commit is contained in:
Jim Van Verth 2020-12-11 11:01:10 -05:00 committed by Skia Commit-Bot
parent 8c56f3494a
commit 4b6f54aaa5

View File

@ -568,12 +568,9 @@ public:
// emit attributes
varyingHandler->emitAttributes(qe);
#if defined(SK_BUILD_FOR_IOS)
// GL on iOS 14 needs more precision for the quadedge attributes
// We might as well enable it everywhere
GrGLSLVarying v(kFloat4_GrSLType);
#else
GrGLSLVarying v(kHalf4_GrSLType);
#endif
varyingHandler->addVarying("QuadEdge", &v);
vertBuilder->codeAppendf("%s = %s;", v.vsOut(), qe.fInQuadEdge.name());
@ -650,12 +647,8 @@ private:
, fUsesLocalCoords(usesLocalCoords) {
fInPosition = {"inPosition", kFloat2_GrVertexAttribType, kFloat2_GrSLType};
fInColor = MakeColorAttribute("inColor", wideColor);
#if defined(SK_BUILD_FOR_IOS)
// GL on iOS 14 needs more precision for the quadedge attributes
fInQuadEdge = {"inQuadEdge", kFloat4_GrVertexAttribType, kFloat4_GrSLType};
#else
fInQuadEdge = {"inQuadEdge", kFloat4_GrVertexAttribType, kHalf4_GrSLType};
#endif
this->setVertexAttributes(&fInPosition, 3);
}