| 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 | 84 |
| 85 bool usesPrecisionModifiers() const { return fUsesPrecisionModifiers; } | 85 bool usesPrecisionModifiers() const { return fUsesPrecisionModifiers; } |
| 86 | 86 |
| 87 // Returns whether we can use the glsl funciton any() in our shader code. | 87 // Returns whether we can use the glsl funciton any() in our shader code. |
| 88 bool canUseAnyFunctionInShader() const { return fCanUseAnyFunctionInShader;
} | 88 bool canUseAnyFunctionInShader() const { return fCanUseAnyFunctionInShader;
} |
| 89 | 89 |
| 90 bool canUseMinAndAbsTogether() const { return fCanUseMinAndAbsTogether; } | 90 bool canUseMinAndAbsTogether() const { return fCanUseMinAndAbsTogether; } |
| 91 | 91 |
| 92 bool mustForceNegatedAtanParamToFloat() const { return fMustForceNegatedAtan
ParamToFloat; } | 92 bool mustForceNegatedAtanParamToFloat() const { return fMustForceNegatedAtan
ParamToFloat; } |
| 93 | 93 |
| 94 bool requiresLocalOutputColorForFBFetch() const { return fRequiresLocalOutpu
tColorForFBFetch; } |
| 95 |
| 94 // Returns the string of an extension that must be enabled in the shader to
support | 96 // Returns the string of an extension that must be enabled in the shader to
support |
| 95 // derivatives. If nullptr is returned then no extension needs to be enabled
. Before calling | 97 // derivatives. If nullptr is returned then no extension needs to be enabled
. Before calling |
| 96 // this function, the caller should check that shaderDerivativeSupport exist
s. | 98 // this function, the caller should check that shaderDerivativeSupport exist
s. |
| 97 const char* shaderDerivativeExtensionString() const { | 99 const char* shaderDerivativeExtensionString() const { |
| 98 SkASSERT(this->shaderDerivativeSupport()); | 100 SkASSERT(this->shaderDerivativeSupport()); |
| 99 return fShaderDerivativeExtensionString; | 101 return fShaderDerivativeExtensionString; |
| 100 } | 102 } |
| 101 | 103 |
| 102 // Returns the string of an extension that will do all necessary coord trans
fomations needed | 104 // Returns the string of an extension that will do all necessary coord trans
fomations needed |
| 103 // when reading the fragment position. If such an extension does not exisits
, this function | 105 // when reading the fragment position. If such an extension does not exisits
, this function |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 bool fNoPerspectiveInterpolationSupport : 1; | 194 bool fNoPerspectiveInterpolationSupport : 1; |
| 193 bool fMultisampleInterpolationSupport : 1; | 195 bool fMultisampleInterpolationSupport : 1; |
| 194 bool fSampleVariablesSupport : 1; | 196 bool fSampleVariablesSupport : 1; |
| 195 bool fSampleMaskOverrideCoverageSupport : 1; | 197 bool fSampleMaskOverrideCoverageSupport : 1; |
| 196 bool fExternalTextureSupport : 1; | 198 bool fExternalTextureSupport : 1; |
| 197 bool fTexelFetchSupport : 1; | 199 bool fTexelFetchSupport : 1; |
| 198 | 200 |
| 199 // Used for specific driver bug work arounds | 201 // Used for specific driver bug work arounds |
| 200 bool fCanUseMinAndAbsTogether : 1; | 202 bool fCanUseMinAndAbsTogether : 1; |
| 201 bool fMustForceNegatedAtanParamToFloat : 1; | 203 bool fMustForceNegatedAtanParamToFloat : 1; |
| 204 bool fRequiresLocalOutputColorForFBFetch : 1; |
| 202 | 205 |
| 203 const char* fVersionDeclString; | 206 const char* fVersionDeclString; |
| 204 | 207 |
| 205 const char* fShaderDerivativeExtensionString; | 208 const char* fShaderDerivativeExtensionString; |
| 206 const char* fFragCoordConventionsExtensionString; | 209 const char* fFragCoordConventionsExtensionString; |
| 207 const char* fSecondaryOutputExtensionString; | 210 const char* fSecondaryOutputExtensionString; |
| 208 const char* fExternalTextureExtensionString; | 211 const char* fExternalTextureExtensionString; |
| 209 const char* fTexelBufferExtensionString; | 212 const char* fTexelBufferExtensionString; |
| 210 const char* fNoPerspectiveInterpolationExtensionString; | 213 const char* fNoPerspectiveInterpolationExtensionString; |
| 211 const char* fMultisampleInterpolationExtensionString; | 214 const char* fMultisampleInterpolationExtensionString; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 226 | 229 |
| 227 uint8_t fSamplerPrecisions[(1 << kGrShaderTypeCount)][kGrPixelConfigCnt]; | 230 uint8_t fSamplerPrecisions[(1 << kGrShaderTypeCount)][kGrPixelConfigCnt]; |
| 228 | 231 |
| 229 friend class GrGLCaps; // For initialization. | 232 friend class GrGLCaps; // For initialization. |
| 230 friend class GrVkCaps; | 233 friend class GrVkCaps; |
| 231 | 234 |
| 232 typedef GrShaderCaps INHERITED; | 235 typedef GrShaderCaps INHERITED; |
| 233 }; | 236 }; |
| 234 | 237 |
| 235 #endif | 238 #endif |
| OLD | NEW |