Index: src/gpu/gl/GrGLCaps.cpp |
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp |
index f3e494acb90cfd2e1d1fd8003dd18ba395357988..c110e2a8f26780cdb63e7fa611a46e7c25e4627c 100644 |
--- a/src/gpu/gl/GrGLCaps.cpp |
+++ b/src/gpu/gl/GrGLCaps.cpp |
@@ -681,9 +681,12 @@ void GrGLCaps::initGLSL(const GrGLContextInfo& ctxInfo) { |
} |
} |
- if (glslCaps->fSampleVariablesSupport) { |
+ if (glslCaps->fSampleVariablesSupport && |
+ ctxInfo.hasExtension("GL_NV_sample_mask_override_coverage")) { |
+ // Pre-361 NVIDIA has a bug with NV_sample_mask_override_coverage. |
glslCaps->fSampleMaskOverrideCoverageSupport = |
- ctxInfo.hasExtension("GL_NV_sample_mask_override_coverage"); |
+ kNVIDIA_GrGLDriver != ctxInfo.driver() || |
+ ctxInfo.driverVersion() >= GR_GL_DRIVER_VER(361,00); |
} |
// Adreno GPUs have a tendency to drop tiles when there is a divide-by-zero in a shader |