From cd3261ac65b579bf8555973362e58629b7adda6b Mon Sep 17 00:00:00 2001 From: Brian Osman Date: Tue, 16 Jan 2018 13:52:29 +0000 Subject: Revert "Revert "Added SkSL workaround for devices which cannot safely access gl_FragCoord"" This reverts commit 9d6929cccfc3e64e75e6ef5b37f284b01b68fb28. Reason for revert: Re-landing, backfill reveals none of the red was related to this CL. Original change's description: > Revert "Added SkSL workaround for devices which cannot safely access gl_FragCoord" > > This reverts commit 1001f843a45e95f6df1d44242b6b06c77898e870. > > Reason for revert: Many failures. > > Original change's description: > > Added SkSL workaround for devices which cannot safely access gl_FragCoord > > > > This is the root cause of https://github.com/flutter/flutter/issues/13216 > > I've got a GM that demonstrates the bug, but only in Viewer. > > > > Bug: skia:7410 > > Change-Id: Iaa1f27b10166aa09e4dc5949e5a6ca1bd14c99ac > > Reviewed-on: https://skia-review.googlesource.com/93920 > > Reviewed-by: Brian Salomon > > Commit-Queue: Brian Osman > > TBR=bsalomon@google.com,brianosman@google.com,ethannicholas@google.com > > Change-Id: I2a2edc0a8fa11fe9dac1045dc79ae91106518b02 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia:7410 > Reviewed-on: https://skia-review.googlesource.com/94281 > Reviewed-by: Brian Osman > Commit-Queue: Brian Osman TBR=bsalomon@google.com,brianosman@google.com,ethannicholas@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Bug: skia:7410 Change-Id: Ib22bda7ff25bb7c8630cc6fa6dc809bf628ea853 Reviewed-on: https://skia-review.googlesource.com/94800 Reviewed-by: Brian Osman Commit-Queue: Brian Osman --- include/gpu/GrShaderCaps.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/gpu/GrShaderCaps.h b/include/gpu/GrShaderCaps.h index b56694c7dc..66e7d42306 100644 --- a/include/gpu/GrShaderCaps.h +++ b/include/gpu/GrShaderCaps.h @@ -121,6 +121,9 @@ public: // the shader. bool mustDoOpBetweenFloorAndAbs() const { return fMustDoOpBetweenFloorAndAbs; } + // If false, SkSL uses a workaround so that sk_FragCoord doesn't actually query gl_FragCoord + bool canUseFragCoord() const { return fCanUseFragCoord; } + bool requiresLocalOutputColorForFBFetch() const { return fRequiresLocalOutputColorForFBFetch; } bool mustObfuscateUniformColor() const { return fMustObfuscateUniformColor; } @@ -275,6 +278,7 @@ private: bool fRequiresLocalOutputColorForFBFetch : 1; bool fMustObfuscateUniformColor : 1; bool fMustGuardDivisionEvenAfterExplicitZeroCheck : 1; + bool fCanUseFragCoord : 1; const char* fVersionDeclString; -- cgit v1.2.3