| 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 GrGLCaps_DEFINED | 9 #ifndef GrGLCaps_DEFINED |
| 10 #define GrGLCaps_DEFINED | 10 #define GrGLCaps_DEFINED |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 | 214 |
| 215 /// Is GL_ARB_IMAGING supported | 215 /// Is GL_ARB_IMAGING supported |
| 216 bool imagingSupport() const { return fImagingSupport; } | 216 bool imagingSupport() const { return fImagingSupport; } |
| 217 | 217 |
| 218 /// Is GL_ARB_fragment_coord_conventions supported? | 218 /// Is GL_ARB_fragment_coord_conventions supported? |
| 219 bool fragCoordConventionsSupport() const { return fFragCoordsConventionSuppo
rt; } | 219 bool fragCoordConventionsSupport() const { return fFragCoordsConventionSuppo
rt; } |
| 220 | 220 |
| 221 /// Is there support for Vertex Array Objects? | 221 /// Is there support for Vertex Array Objects? |
| 222 bool vertexArrayObjectSupport() const { return fVertexArrayObjectSupport; } | 222 bool vertexArrayObjectSupport() const { return fVertexArrayObjectSupport; } |
| 223 | 223 |
| 224 /// Is there support for glDraw*Instanced and glVertexAttribDivisor? | |
| 225 bool instancedDrawingSupport() const { return fInstancedDrawingSupport; } | |
| 226 | |
| 227 /// Is there support for GL_EXT_direct_state_access? | |
| 228 bool directStateAccessSupport() const { return fDirectStateAccessSupport; } | |
| 229 | |
| 230 /// Is there support for GL_KHR_debug? | |
| 231 bool debugSupport() const { return fDebugSupport; } | |
| 232 | |
| 233 /// Is there support for ES2 compatability? | 224 /// Is there support for ES2 compatability? |
| 234 bool ES2CompatibilitySupport() const { return fES2CompatibilitySupport; } | 225 bool ES2CompatibilitySupport() const { return fES2CompatibilitySupport; } |
| 235 | 226 |
| 236 /// Can we call glDisable(GL_MULTISAMPLE)? | 227 /// Can we call glDisable(GL_MULTISAMPLE)? |
| 237 bool multisampleDisableSupport() const { return fMultisampleDisableSupport;
} | 228 bool multisampleDisableSupport() const { return fMultisampleDisableSupport;
} |
| 238 | 229 |
| 239 /// Use indices or vertices in CPU arrays rather than VBOs for dynamic conte
nt. | 230 /// Use indices or vertices in CPU arrays rather than VBOs for dynamic conte
nt. |
| 240 bool useNonVBOVertexAndIndexDynamicData() const { | 231 bool useNonVBOVertexAndIndexDynamicData() const { |
| 241 return fUseNonVBOVertexAndIndexDynamicData; | 232 return fUseNonVBOVertexAndIndexDynamicData; |
| 242 } | 233 } |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 bool fUnpackFlipYSupport : 1; | 337 bool fUnpackFlipYSupport : 1; |
| 347 bool fPackRowLengthSupport : 1; | 338 bool fPackRowLengthSupport : 1; |
| 348 bool fPackFlipYSupport : 1; | 339 bool fPackFlipYSupport : 1; |
| 349 bool fTextureUsageSupport : 1; | 340 bool fTextureUsageSupport : 1; |
| 350 bool fTexStorageSupport : 1; | 341 bool fTexStorageSupport : 1; |
| 351 bool fTextureRedSupport : 1; | 342 bool fTextureRedSupport : 1; |
| 352 bool fImagingSupport : 1; | 343 bool fImagingSupport : 1; |
| 353 bool fTwoFormatLimit : 1; | 344 bool fTwoFormatLimit : 1; |
| 354 bool fFragCoordsConventionSupport : 1; | 345 bool fFragCoordsConventionSupport : 1; |
| 355 bool fVertexArrayObjectSupport : 1; | 346 bool fVertexArrayObjectSupport : 1; |
| 356 bool fInstancedDrawingSupport : 1; | |
| 357 bool fDirectStateAccessSupport : 1; | |
| 358 bool fDebugSupport : 1; | |
| 359 bool fES2CompatibilitySupport : 1; | 347 bool fES2CompatibilitySupport : 1; |
| 360 bool fMultisampleDisableSupport : 1; | 348 bool fMultisampleDisableSupport : 1; |
| 361 bool fUseNonVBOVertexAndIndexDynamicData : 1; | 349 bool fUseNonVBOVertexAndIndexDynamicData : 1; |
| 362 bool fIsCoreProfile : 1; | 350 bool fIsCoreProfile : 1; |
| 363 bool fFullClearIsFree : 1; | 351 bool fFullClearIsFree : 1; |
| 364 bool fFBMixedSamplesSupport : 1; | 352 bool fFBMixedSamplesSupport : 1; |
| 365 | 353 |
| 366 struct ReadPixelsSupportedFormat { | 354 struct ReadPixelsSupportedFormat { |
| 367 GrGLenum fFormat; | 355 GrGLenum fFormat; |
| 368 GrGLenum fType; | 356 GrGLenum fType; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 | 393 |
| 406 /** | 394 /** |
| 407 * Some helper functions for encapsulating various extensions to read FB Buf
fer on openglES | 395 * Some helper functions for encapsulating various extensions to read FB Buf
fer on openglES |
| 408 * | 396 * |
| 409 * TODO(joshualitt) On desktop opengl 4.2+ we can achieve something similar
to this effect | 397 * TODO(joshualitt) On desktop opengl 4.2+ we can achieve something similar
to this effect |
| 410 */ | 398 */ |
| 411 bool fbFetchSupport() const { return fFBFetchSupport; } | 399 bool fbFetchSupport() const { return fFBFetchSupport; } |
| 412 | 400 |
| 413 bool fbFetchNeedsCustomOutput() const { return fFBFetchNeedsCustomOutput; } | 401 bool fbFetchNeedsCustomOutput() const { return fFBFetchNeedsCustomOutput; } |
| 414 | 402 |
| 415 bool bindlessTextureSupport() const { return fBindlessTextureSupport; } | |
| 416 | |
| 417 const char* fbFetchColorName() const { return fFBFetchColorName; } | 403 const char* fbFetchColorName() const { return fFBFetchColorName; } |
| 418 | 404 |
| 419 const char* fbFetchExtensionString() const { return fFBFetchExtensionString;
} | 405 const char* fbFetchExtensionString() const { return fFBFetchExtensionString;
} |
| 420 | 406 |
| 421 bool dropsTileOnZeroDivide() const { return fDropsTileOnZeroDivide; } | 407 bool dropsTileOnZeroDivide() const { return fDropsTileOnZeroDivide; } |
| 422 | 408 |
| 423 AdvBlendEqInteraction advBlendEqInteraction() const { return fAdvBlendEqInte
raction; } | 409 AdvBlendEqInteraction advBlendEqInteraction() const { return fAdvBlendEqInte
raction; } |
| 424 | 410 |
| 425 bool mustEnableAdvBlendEqs() const { | 411 bool mustEnableAdvBlendEqs() const { |
| 426 return fAdvBlendEqInteraction >= kGeneralEnable_AdvBlendEqInteraction; | 412 return fAdvBlendEqInteraction >= kGeneralEnable_AdvBlendEqInteraction; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 443 | 429 |
| 444 private: | 430 private: |
| 445 // Must be called after fGeometryShaderSupport is initialized. | 431 // Must be called after fGeometryShaderSupport is initialized. |
| 446 void initShaderPrecisionTable(const GrGLContextInfo&, const GrGLInterface*); | 432 void initShaderPrecisionTable(const GrGLContextInfo&, const GrGLInterface*); |
| 447 | 433 |
| 448 GrGLSLGeneration fGLSLGeneration; | 434 GrGLSLGeneration fGLSLGeneration; |
| 449 | 435 |
| 450 bool fDropsTileOnZeroDivide : 1; | 436 bool fDropsTileOnZeroDivide : 1; |
| 451 bool fFBFetchSupport : 1; | 437 bool fFBFetchSupport : 1; |
| 452 bool fFBFetchNeedsCustomOutput : 1; | 438 bool fFBFetchNeedsCustomOutput : 1; |
| 453 bool fBindlessTextureSupport : 1; | |
| 454 | 439 |
| 455 const char* fFBFetchColorName; | 440 const char* fFBFetchColorName; |
| 456 const char* fFBFetchExtensionString; | 441 const char* fFBFetchExtensionString; |
| 457 | 442 |
| 458 AdvBlendEqInteraction fAdvBlendEqInteraction; | 443 AdvBlendEqInteraction fAdvBlendEqInteraction; |
| 459 | 444 |
| 460 friend class GrGLCaps; // For initialization. | 445 friend class GrGLCaps; // For initialization. |
| 461 | 446 |
| 462 typedef GrShaderCaps INHERITED; | 447 typedef GrShaderCaps INHERITED; |
| 463 }; | 448 }; |
| 464 | 449 |
| 465 | 450 |
| 466 #endif | 451 #endif |
| OLD | NEW |