| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 | 8 |
| 9 #ifndef GrGLSLCaps_DEFINED | 9 #ifndef GrGLSLCaps_DEFINED |
| 10 #define GrGLSLCaps_DEFINED | 10 #define GrGLSLCaps_DEFINED |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 | 65 |
| 66 bool mustDeclareFragmentShaderOutput() const { | 66 bool mustDeclareFragmentShaderOutput() const { |
| 67 return fGLSLGeneration > k110_GrGLSLGeneration; | 67 return fGLSLGeneration > k110_GrGLSLGeneration; |
| 68 } | 68 } |
| 69 | 69 |
| 70 bool usesPrecisionModifiers() const { return fUsesPrecisionModifiers; } | 70 bool usesPrecisionModifiers() const { return fUsesPrecisionModifiers; } |
| 71 | 71 |
| 72 // Returns whether we can use the glsl funciton any() in our shader code. | 72 // Returns whether we can use the glsl funciton any() in our shader code. |
| 73 bool canUseAnyFunctionInShader() const { return fCanUseAnyFunctionInShader;
} | 73 bool canUseAnyFunctionInShader() const { return fCanUseAnyFunctionInShader;
} |
| 74 | 74 |
| 75 bool forceHighPrecisionNDSTransform() const { return fForceHighPrecisionNDST
ransform; } | |
| 76 | |
| 77 bool canUseMinAndAbsTogether() const { return fCanUseMinAndAbsTogether; } | 75 bool canUseMinAndAbsTogether() const { return fCanUseMinAndAbsTogether; } |
| 78 | 76 |
| 79 bool mustForceNegatedAtanParamToFloat() const { return fMustForceNegatedAtan
ParamToFloat; } | 77 bool mustForceNegatedAtanParamToFloat() const { return fMustForceNegatedAtan
ParamToFloat; } |
| 80 | 78 |
| 81 // Returns the string of an extension that must be enabled in the shader to
support | 79 // Returns the string of an extension that must be enabled in the shader to
support |
| 82 // derivatives. If nullptr is returned then no extension needs to be enabled
. Before calling | 80 // derivatives. If nullptr is returned then no extension needs to be enabled
. Before calling |
| 83 // this function, the caller should check that shaderDerivativeSupport exist
s. | 81 // this function, the caller should check that shaderDerivativeSupport exist
s. |
| 84 const char* shaderDerivativeExtensionString() const { | 82 const char* shaderDerivativeExtensionString() const { |
| 85 SkASSERT(this->shaderDerivativeSupport()); | 83 SkASSERT(this->shaderDerivativeSupport()); |
| 86 return fShaderDerivativeExtensionString; | 84 return fShaderDerivativeExtensionString; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 void onApplyOptionsOverrides(const GrContextOptions& options) override; | 124 void onApplyOptionsOverrides(const GrContextOptions& options) override; |
| 127 | 125 |
| 128 GrGLSLGeneration fGLSLGeneration; | 126 GrGLSLGeneration fGLSLGeneration; |
| 129 | 127 |
| 130 bool fDropsTileOnZeroDivide : 1; | 128 bool fDropsTileOnZeroDivide : 1; |
| 131 bool fFBFetchSupport : 1; | 129 bool fFBFetchSupport : 1; |
| 132 bool fFBFetchNeedsCustomOutput : 1; | 130 bool fFBFetchNeedsCustomOutput : 1; |
| 133 bool fBindlessTextureSupport : 1; | 131 bool fBindlessTextureSupport : 1; |
| 134 bool fUsesPrecisionModifiers : 1; | 132 bool fUsesPrecisionModifiers : 1; |
| 135 bool fCanUseAnyFunctionInShader : 1; | 133 bool fCanUseAnyFunctionInShader : 1; |
| 136 bool fForceHighPrecisionNDSTransform : 1; | |
| 137 | 134 |
| 138 // Used for specific driver bug work arounds | 135 // Used for specific driver bug work arounds |
| 139 bool fCanUseMinAndAbsTogether : 1; | 136 bool fCanUseMinAndAbsTogether : 1; |
| 140 bool fMustForceNegatedAtanParamToFloat : 1; | 137 bool fMustForceNegatedAtanParamToFloat : 1; |
| 141 | 138 |
| 142 const char* fVersionDeclString; | 139 const char* fVersionDeclString; |
| 143 | 140 |
| 144 const char* fShaderDerivativeExtensionString; | 141 const char* fShaderDerivativeExtensionString; |
| 145 const char* fFragCoordConventionsExtensionString; | 142 const char* fFragCoordConventionsExtensionString; |
| 146 const char* fSecondaryOutputExtensionString; | 143 const char* fSecondaryOutputExtensionString; |
| 147 const char* fExternalTextureExtensionString; | 144 const char* fExternalTextureExtensionString; |
| 148 | 145 |
| 149 const char* fFBFetchColorName; | 146 const char* fFBFetchColorName; |
| 150 const char* fFBFetchExtensionString; | 147 const char* fFBFetchExtensionString; |
| 151 | 148 |
| 152 AdvBlendEqInteraction fAdvBlendEqInteraction; | 149 AdvBlendEqInteraction fAdvBlendEqInteraction; |
| 153 | 150 |
| 154 bool fMustSwizzleInShader; | 151 bool fMustSwizzleInShader; |
| 155 const char* fConfigSwizzle[kGrPixelConfigCnt]; | 152 const char* fConfigSwizzle[kGrPixelConfigCnt]; |
| 156 | 153 |
| 157 friend class GrGLCaps; // For initialization. | 154 friend class GrGLCaps; // For initialization. |
| 158 | 155 |
| 159 typedef GrShaderCaps INHERITED; | 156 typedef GrShaderCaps INHERITED; |
| 160 }; | 157 }; |
| 161 | 158 |
| 162 | 159 |
| 163 #endif | 160 #endif |
| OLD | NEW |