Index: src/gpu/glsl/GrGLSLCaps.h |
diff --git a/src/gpu/glsl/GrGLSLCaps.h b/src/gpu/glsl/GrGLSLCaps.h |
index e703fb852384c7b4193b6fb66d6e5fa7ad9e2c8a..68e91b6666599f543eedbc461649e98a4ecb02a5 100755 |
--- a/src/gpu/glsl/GrGLSLCaps.h |
+++ b/src/gpu/glsl/GrGLSLCaps.h |
@@ -74,6 +74,10 @@ public: |
bool forceHighPrecisionNDSTransform() const { return fForceHighPrecisionNDSTransform; } |
+ bool canUseMinAndAbsTogether() const { return fCanUseMinAndAbsTogether; } |
+ |
+ bool mustForceNegatedAtanParamToFloat() const { return fMustForceNegatedAtanParamToFloat; } |
+ |
// 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. |
@@ -81,6 +85,22 @@ public: |
SkASSERT(this->shaderDerivativeSupport()); |
return fShaderDerivativeExtensionString; |
} |
+ |
+ // Returns the string of an extension that will do all necessary coord transfomations needed |
+ // when reading the fragment position. If such an extension does not exisits, this function |
+ // returns a nullptr, and all transforms of the frag position must be done manually in the |
+ // shader. |
+ const char* fragCoordConventionsExtensionString() const { |
+ return fFragCoordConventionsExtensionString; |
+ } |
+ |
+ // This returns the name of an extension that must be enabled in the shader, if such a thing is |
+ // required in order to use a secondary output in the shader. This returns a nullptr if no such |
+ // extension is required. However, the return value of this function does not say whether dual |
+ // source blending is supported. |
+ const char* secondaryOutputExtensionString() const { |
+ return fSecondaryOutputExtensionString; |
+ } |
bool mustSwizzleInShader() const { return fMustSwizzleInShader; } |
@@ -111,9 +131,15 @@ private: |
bool fCanUseAnyFunctionInShader : 1; |
bool fForceHighPrecisionNDSTransform : 1; |
+ // Used for specific driver bug work arounds |
+ bool fCanUseMinAndAbsTogether : 1; |
+ bool fMustForceNegatedAtanParamToFloat : 1; |
+ |
const char* fVersionDeclString; |
const char* fShaderDerivativeExtensionString; |
+ const char* fFragCoordConventionsExtensionString; |
+ const char* fSecondaryOutputExtensionString; |
const char* fFBFetchColorName; |
const char* fFBFetchExtensionString; |