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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 bool noperspectiveInterpolationSupport() const { return fNoPerspectiveInterp
olationSupport; } | 59 bool noperspectiveInterpolationSupport() const { return fNoPerspectiveInterp
olationSupport; } |
60 | 60 |
61 bool multisampleInterpolationSupport() const { return fMultisampleInterpolat
ionSupport; } | 61 bool multisampleInterpolationSupport() const { return fMultisampleInterpolat
ionSupport; } |
62 | 62 |
63 bool sampleVariablesSupport() const { return fSampleVariablesSupport; } | 63 bool sampleVariablesSupport() const { return fSampleVariablesSupport; } |
64 | 64 |
65 bool sampleMaskOverrideCoverageSupport() const { return fSampleMaskOverrideC
overageSupport; } | 65 bool sampleMaskOverrideCoverageSupport() const { return fSampleMaskOverrideC
overageSupport; } |
66 | 66 |
67 bool externalTextureSupport() const { return fExternalTextureSupport; } | 67 bool externalTextureSupport() const { return fExternalTextureSupport; } |
68 | 68 |
69 bool bufferTextureSupport() const { return fBufferTextureSupport; } | 69 bool texelFetchSupport() const { return fTexelFetchSupport; } |
70 | 70 |
71 AdvBlendEqInteraction advBlendEqInteraction() const { return fAdvBlendEqInte
raction; } | 71 AdvBlendEqInteraction advBlendEqInteraction() const { return fAdvBlendEqInte
raction; } |
72 | 72 |
73 bool mustEnableAdvBlendEqs() const { | 73 bool mustEnableAdvBlendEqs() const { |
74 return fAdvBlendEqInteraction >= kGeneralEnable_AdvBlendEqInteraction; | 74 return fAdvBlendEqInteraction >= kGeneralEnable_AdvBlendEqInteraction; |
75 } | 75 } |
76 | 76 |
77 bool mustEnableSpecificAdvBlendEqs() const { | 77 bool mustEnableSpecificAdvBlendEqs() const { |
78 return fAdvBlendEqInteraction == kSpecificEnables_AdvBlendEqInteraction; | 78 return fAdvBlendEqInteraction == kSpecificEnables_AdvBlendEqInteraction; |
79 } | 79 } |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 // source blending is supported. | 113 // source blending is supported. |
114 const char* secondaryOutputExtensionString() const { | 114 const char* secondaryOutputExtensionString() const { |
115 return fSecondaryOutputExtensionString; | 115 return fSecondaryOutputExtensionString; |
116 } | 116 } |
117 | 117 |
118 const char* externalTextureExtensionString() const { | 118 const char* externalTextureExtensionString() const { |
119 SkASSERT(this->externalTextureSupport()); | 119 SkASSERT(this->externalTextureSupport()); |
120 return fExternalTextureExtensionString; | 120 return fExternalTextureExtensionString; |
121 } | 121 } |
122 | 122 |
123 const char* bufferTextureExtensionString() const { | 123 const char* texelBufferExtensionString() const { |
124 SkASSERT(this->bufferTextureSupport()); | 124 SkASSERT(this->texelBufferSupport()); |
125 return fBufferTextureExtensionString; | 125 return fTexelBufferExtensionString; |
126 } | 126 } |
127 | 127 |
128 const char* noperspectiveInterpolationExtensionString() const { | 128 const char* noperspectiveInterpolationExtensionString() const { |
129 SkASSERT(this->noperspectiveInterpolationSupport()); | 129 SkASSERT(this->noperspectiveInterpolationSupport()); |
130 return fNoPerspectiveInterpolationExtensionString; | 130 return fNoPerspectiveInterpolationExtensionString; |
131 } | 131 } |
132 | 132 |
133 const char* multisampleInterpolationExtensionString() const { | 133 const char* multisampleInterpolationExtensionString() const { |
134 SkASSERT(this->multisampleInterpolationSupport()); | 134 SkASSERT(this->multisampleInterpolationSupport()); |
135 return fMultisampleInterpolationExtensionString; | 135 return fMultisampleInterpolationExtensionString; |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 bool fFBFetchNeedsCustomOutput : 1; | 187 bool fFBFetchNeedsCustomOutput : 1; |
188 bool fBindlessTextureSupport : 1; | 188 bool fBindlessTextureSupport : 1; |
189 bool fUsesPrecisionModifiers : 1; | 189 bool fUsesPrecisionModifiers : 1; |
190 bool fCanUseAnyFunctionInShader : 1; | 190 bool fCanUseAnyFunctionInShader : 1; |
191 bool fFlatInterpolationSupport : 1; | 191 bool fFlatInterpolationSupport : 1; |
192 bool fNoPerspectiveInterpolationSupport : 1; | 192 bool fNoPerspectiveInterpolationSupport : 1; |
193 bool fMultisampleInterpolationSupport : 1; | 193 bool fMultisampleInterpolationSupport : 1; |
194 bool fSampleVariablesSupport : 1; | 194 bool fSampleVariablesSupport : 1; |
195 bool fSampleMaskOverrideCoverageSupport : 1; | 195 bool fSampleMaskOverrideCoverageSupport : 1; |
196 bool fExternalTextureSupport : 1; | 196 bool fExternalTextureSupport : 1; |
197 bool fBufferTextureSupport : 1; | 197 bool fTexelFetchSupport : 1; |
198 | 198 |
199 // Used for specific driver bug work arounds | 199 // Used for specific driver bug work arounds |
200 bool fCanUseMinAndAbsTogether : 1; | 200 bool fCanUseMinAndAbsTogether : 1; |
201 bool fMustForceNegatedAtanParamToFloat : 1; | 201 bool fMustForceNegatedAtanParamToFloat : 1; |
202 | 202 |
203 const char* fVersionDeclString; | 203 const char* fVersionDeclString; |
204 | 204 |
205 const char* fShaderDerivativeExtensionString; | 205 const char* fShaderDerivativeExtensionString; |
206 const char* fFragCoordConventionsExtensionString; | 206 const char* fFragCoordConventionsExtensionString; |
207 const char* fSecondaryOutputExtensionString; | 207 const char* fSecondaryOutputExtensionString; |
208 const char* fExternalTextureExtensionString; | 208 const char* fExternalTextureExtensionString; |
209 const char* fBufferTextureExtensionString; | 209 const char* fTexelBufferExtensionString; |
210 const char* fNoPerspectiveInterpolationExtensionString; | 210 const char* fNoPerspectiveInterpolationExtensionString; |
211 const char* fMultisampleInterpolationExtensionString; | 211 const char* fMultisampleInterpolationExtensionString; |
212 const char* fSampleVariablesExtensionString; | 212 const char* fSampleVariablesExtensionString; |
213 | 213 |
214 const char* fFBFetchColorName; | 214 const char* fFBFetchColorName; |
215 const char* fFBFetchExtensionString; | 215 const char* fFBFetchExtensionString; |
216 | 216 |
217 uint8_t fMaxVertexSamplers; | 217 uint8_t fMaxVertexSamplers; |
218 uint8_t fMaxGeometrySamplers; | 218 uint8_t fMaxGeometrySamplers; |
219 uint8_t fMaxFragmentSamplers; | 219 uint8_t fMaxFragmentSamplers; |
220 uint8_t fMaxCombinedSamplers; | 220 uint8_t fMaxCombinedSamplers; |
221 | 221 |
222 AdvBlendEqInteraction fAdvBlendEqInteraction; | 222 AdvBlendEqInteraction fAdvBlendEqInteraction; |
223 | 223 |
224 GrSwizzle fConfigTextureSwizzle[kGrPixelConfigCnt]; | 224 GrSwizzle fConfigTextureSwizzle[kGrPixelConfigCnt]; |
225 GrSwizzle fConfigOutputSwizzle[kGrPixelConfigCnt]; | 225 GrSwizzle fConfigOutputSwizzle[kGrPixelConfigCnt]; |
226 | 226 |
227 uint8_t fSamplerPrecisions[(1 << kGrShaderTypeCount)][kGrPixelConfigCnt]; | 227 uint8_t fSamplerPrecisions[(1 << kGrShaderTypeCount)][kGrPixelConfigCnt]; |
228 | 228 |
229 friend class GrGLCaps; // For initialization. | 229 friend class GrGLCaps; // For initialization. |
230 friend class GrVkCaps; | 230 friend class GrVkCaps; |
231 | 231 |
232 typedef GrShaderCaps INHERITED; | 232 typedef GrShaderCaps INHERITED; |
233 }; | 233 }; |
234 | 234 |
235 #endif | 235 #endif |
OLD | NEW |