From 2e777ead127b03a06ccc7dfc983e1b28e1aa2f86 Mon Sep 17 00:00:00 2001 From: csmartdalton Date: Wed, 15 Feb 2017 10:41:27 -0700 Subject: 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 Reviewed-by: Brian Salomon Commit-Queue: Chris Dalton --- 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 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; -- cgit v1.2.3