aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLCaps.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/gl/GrGLCaps.cpp')
-rw-r--r--src/gpu/gl/GrGLCaps.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index b9eee088e0..8c4330312d 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -54,6 +54,7 @@ GrGLCaps::GrGLCaps(const GrContextOptions& contextOptions,
fSRGBDecodeDisableSupport = false;
fSRGBDecodeDisableAffectsMipmaps = false;
fClearToBoundaryValuesIsBroken = false;
+ fClearTextureSupport = false;
fDrawArraysBaseVertexIsBroken = false;
fBlitFramebufferFlags = kNoSupport_BlitFramebufferFlag;
@@ -252,6 +253,22 @@ void GrGLCaps::init(const GrContextOptions& contextOptions,
// vis-versa.
fRGBAToBGRAReadbackConversionsAreSlow = isMESA || isMAC;
+ if (kGL_GrGLStandard == standard) {
+ if (version >= GR_GL_VER(4,4) || ctxInfo.hasExtension("GL_ARB_clear_texture")) {
+ // glClearTexImage seems to have a bug in NVIDIA drivers that was fixed sometime between
+ // 340.96 and 367.57.
+ if (ctxInfo.driver() != kNVIDIA_GrGLDriver ||
+ ctxInfo.driverVersion() >= GR_GL_DRIVER_VER(367, 57)) {
+ fClearTextureSupport = true;
+ }
+ }
+ } else if (ctxInfo.hasExtension("GL_EXT_clear_texture")) {
+ // Calling glClearTexImage crashes on the NexusPlayer.
+ if (kPowerVRRogue_GrGLRenderer != ctxInfo.renderer()) {
+ fClearTextureSupport = true;
+ }
+ }
+
/**************************************************************************
* GrShaderCaps fields
**************************************************************************/