aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl
diff options
context:
space:
mode:
authorGravatar csmartdalton <csmartdalton@google.com>2016-06-15 12:42:13 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-06-15 12:42:14 -0700
commitf848c9c456cc70045818a16fa4893a932f494d73 (patch)
tree99c36e0b9c4f5dd66e6ed4dcbac4c5b1b20209cc /src/gpu/gl
parent04d35bd80dde7cace866781037cbbdcab14ab683 (diff)
Workaround NVIDIA driver bug with NV_sample_mask_override_coverage
Diffstat (limited to 'src/gpu/gl')
-rw-r--r--src/gpu/gl/GrGLCaps.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index 5370f792c6..9dd0fbe36e 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -696,9 +696,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