| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 bool bindlessTextureSupport() const { return fBindlessTextureSupport; } | 47 bool bindlessTextureSupport() const { return fBindlessTextureSupport; } |
| 48 | 48 |
| 49 const char* versionDeclString() const { return fVersionDeclString; } | 49 const char* versionDeclString() const { return fVersionDeclString; } |
| 50 | 50 |
| 51 const char* fbFetchColorName() const { return fFBFetchColorName; } | 51 const char* fbFetchColorName() const { return fFBFetchColorName; } |
| 52 | 52 |
| 53 const char* fbFetchExtensionString() const { return fFBFetchExtensionString;
} | 53 const char* fbFetchExtensionString() const { return fFBFetchExtensionString;
} |
| 54 | 54 |
| 55 bool dropsTileOnZeroDivide() const { return fDropsTileOnZeroDivide; } | 55 bool dropsTileOnZeroDivide() const { return fDropsTileOnZeroDivide; } |
| 56 | 56 |
| 57 bool sampleVariablesSupport() const { return fSampleVariablesSupport; } |
| 58 |
| 59 bool sampleMaskOverrideCoverageSupport() const { return fSampleMaskOverrideC
overageSupport; } |
| 60 |
| 57 bool flatInterpolationSupport() const { return fFlatInterpolationSupport; } | 61 bool flatInterpolationSupport() const { return fFlatInterpolationSupport; } |
| 58 | 62 |
| 59 bool noperspectiveInterpolationSupport() const { return fNoPerspectiveInterp
olationSupport; } | 63 bool noperspectiveInterpolationSupport() const { return fNoPerspectiveInterp
olationSupport; } |
| 60 | 64 |
| 61 AdvBlendEqInteraction advBlendEqInteraction() const { return fAdvBlendEqInte
raction; } | 65 AdvBlendEqInteraction advBlendEqInteraction() const { return fAdvBlendEqInte
raction; } |
| 62 | 66 |
| 63 bool mustEnableAdvBlendEqs() const { | 67 bool mustEnableAdvBlendEqs() const { |
| 64 return fAdvBlendEqInteraction >= kGeneralEnable_AdvBlendEqInteraction; | 68 return fAdvBlendEqInteraction >= kGeneralEnable_AdvBlendEqInteraction; |
| 65 } | 69 } |
| 66 | 70 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 81 | 85 |
| 82 bool mustForceNegatedAtanParamToFloat() const { return fMustForceNegatedAtan
ParamToFloat; } | 86 bool mustForceNegatedAtanParamToFloat() const { return fMustForceNegatedAtan
ParamToFloat; } |
| 83 | 87 |
| 84 // Returns the string of an extension that must be enabled in the shader to
support | 88 // Returns the string of an extension that must be enabled in the shader to
support |
| 85 // derivatives. If nullptr is returned then no extension needs to be enabled
. Before calling | 89 // derivatives. If nullptr is returned then no extension needs to be enabled
. Before calling |
| 86 // this function, the caller should check that shaderDerivativeSupport exist
s. | 90 // this function, the caller should check that shaderDerivativeSupport exist
s. |
| 87 const char* shaderDerivativeExtensionString() const { | 91 const char* shaderDerivativeExtensionString() const { |
| 88 SkASSERT(this->shaderDerivativeSupport()); | 92 SkASSERT(this->shaderDerivativeSupport()); |
| 89 return fShaderDerivativeExtensionString; | 93 return fShaderDerivativeExtensionString; |
| 90 } | 94 } |
| 95 |
| 96 const char* sampleVariablesExtensionString() const { |
| 97 SkASSERT(this->sampleVariablesSupport()); |
| 98 return fSampleVariablesExtensionString; |
| 99 } |
| 91 | 100 |
| 92 // Returns the string of an extension that will do all necessary coord trans
fomations needed | 101 // Returns the string of an extension that will do all necessary coord trans
fomations needed |
| 93 // when reading the fragment position. If such an extension does not exisits
, this function | 102 // when reading the fragment position. If such an extension does not exisits
, this function |
| 94 // returns a nullptr, and all transforms of the frag position must be done m
anually in the | 103 // returns a nullptr, and all transforms of the frag position must be done m
anually in the |
| 95 // shader. | 104 // shader. |
| 96 const char* fragCoordConventionsExtensionString() const { | 105 const char* fragCoordConventionsExtensionString() const { |
| 97 return fFragCoordConventionsExtensionString; | 106 return fFragCoordConventionsExtensionString; |
| 98 } | 107 } |
| 99 | 108 |
| 100 // This returns the name of an extension that must be enabled in the shader,
if such a thing is | 109 // This returns the name of an extension that must be enabled in the shader,
if such a thing is |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 void onApplyOptionsOverrides(const GrContextOptions& options) override; | 148 void onApplyOptionsOverrides(const GrContextOptions& options) override; |
| 140 | 149 |
| 141 GrGLSLGeneration fGLSLGeneration; | 150 GrGLSLGeneration fGLSLGeneration; |
| 142 | 151 |
| 143 bool fDropsTileOnZeroDivide : 1; | 152 bool fDropsTileOnZeroDivide : 1; |
| 144 bool fFBFetchSupport : 1; | 153 bool fFBFetchSupport : 1; |
| 145 bool fFBFetchNeedsCustomOutput : 1; | 154 bool fFBFetchNeedsCustomOutput : 1; |
| 146 bool fBindlessTextureSupport : 1; | 155 bool fBindlessTextureSupport : 1; |
| 147 bool fUsesPrecisionModifiers : 1; | 156 bool fUsesPrecisionModifiers : 1; |
| 148 bool fCanUseAnyFunctionInShader : 1; | 157 bool fCanUseAnyFunctionInShader : 1; |
| 158 bool fSampleVariablesSupport : 1; |
| 159 bool fSampleMaskOverrideCoverageSupport : 1; |
| 149 bool fFlatInterpolationSupport : 1; | 160 bool fFlatInterpolationSupport : 1; |
| 150 bool fNoPerspectiveInterpolationSupport : 1; | 161 bool fNoPerspectiveInterpolationSupport : 1; |
| 151 | 162 |
| 152 // Used for specific driver bug work arounds | 163 // Used for specific driver bug work arounds |
| 153 bool fCanUseMinAndAbsTogether : 1; | 164 bool fCanUseMinAndAbsTogether : 1; |
| 154 bool fMustForceNegatedAtanParamToFloat : 1; | 165 bool fMustForceNegatedAtanParamToFloat : 1; |
| 155 | 166 |
| 156 const char* fVersionDeclString; | 167 const char* fVersionDeclString; |
| 157 | 168 |
| 158 const char* fShaderDerivativeExtensionString; | 169 const char* fShaderDerivativeExtensionString; |
| 170 const char* fSampleVariablesExtensionString; |
| 159 const char* fFragCoordConventionsExtensionString; | 171 const char* fFragCoordConventionsExtensionString; |
| 160 const char* fSecondaryOutputExtensionString; | 172 const char* fSecondaryOutputExtensionString; |
| 161 const char* fExternalTextureExtensionString; | 173 const char* fExternalTextureExtensionString; |
| 162 const char* fNoPerspectiveInterpolationExtensionString; | 174 const char* fNoPerspectiveInterpolationExtensionString; |
| 163 | 175 |
| 164 const char* fFBFetchColorName; | 176 const char* fFBFetchColorName; |
| 165 const char* fFBFetchExtensionString; | 177 const char* fFBFetchExtensionString; |
| 166 | 178 |
| 167 AdvBlendEqInteraction fAdvBlendEqInteraction; | 179 AdvBlendEqInteraction fAdvBlendEqInteraction; |
| 168 | 180 |
| 169 GrSwizzle fConfigTextureSwizzle[kGrPixelConfigCnt]; | 181 GrSwizzle fConfigTextureSwizzle[kGrPixelConfigCnt]; |
| 170 GrSwizzle fConfigOutputSwizzle[kGrPixelConfigCnt]; | 182 GrSwizzle fConfigOutputSwizzle[kGrPixelConfigCnt]; |
| 171 | 183 |
| 172 friend class GrGLCaps; // For initialization. | 184 friend class GrGLCaps; // For initialization. |
| 173 friend class GrVkCaps; | 185 friend class GrVkCaps; |
| 174 | 186 |
| 175 typedef GrShaderCaps INHERITED; | 187 typedef GrShaderCaps INHERITED; |
| 176 }; | 188 }; |
| 177 | 189 |
| 178 #endif | 190 #endif |
| OLD | NEW |