aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar csmartdalton <csmartdalton@google.com>2017-02-15 10:41:27 -0700
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-02-17 17:29:23 +0000
commit2e777ead127b03a06ccc7dfc983e1b28e1aa2f86 (patch)
treee7577081a11a7b303d65f5f19087d66417edf345 /include
parente14349a7545e7bd1e93f4c3095db8f481939b053 (diff)
Add a workaround for platforms with broken geo shader invocations
BUG=skia: Change-Id: I9105b65b522d9ffac5a90ca7126bfd4ae88f8069 Reviewed-on: https://skia-review.googlesource.com/8422 Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
Diffstat (limited to 'include')
-rw-r--r--include/gpu/GrShaderCaps.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/gpu/GrShaderCaps.h b/include/gpu/GrShaderCaps.h
index 918138c878..36ab3c3c35 100644
--- a/include/gpu/GrShaderCaps.h
+++ b/include/gpu/GrShaderCaps.h
@@ -176,6 +176,9 @@ public:
bool requiresLocalOutputColorForFBFetch() const { return fRequiresLocalOutputColorForFBFetch; }
+ // On MacBook, geometry shaders break if they have more than one invocation.
+ bool mustImplementGSInvocationsWithLoop() const { return fMustImplementGSInvocationsWithLoop; }
+
// Returns the string of an extension that must be enabled in the shader to support
// derivatives. If nullptr is returned then no extension needs to be enabled. Before calling
// this function, the caller should check that shaderDerivativeSupport exists.
@@ -304,6 +307,7 @@ private:
bool fMustForceNegatedAtanParamToFloat : 1;
bool fAtan2ImplementedAsAtanYOverX : 1;
bool fRequiresLocalOutputColorForFBFetch : 1;
+ bool fMustImplementGSInvocationsWithLoop : 1;
PrecisionInfo fFloatPrecisions[kGrShaderTypeCount][kGrSLPrecisionCount];
int fPixelLocalStorageSize;