aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLCaps.cpp
diff options
context:
space:
mode:
authorGravatar cdalton <cdalton@nvidia.com>2015-11-03 09:33:21 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-11-03 09:33:21 -0800
commit98cad6219b430eddf5528473311279f21dbd2e10 (patch)
treef916fd04a62011942b8ac0e7dec371d90fd789c1 /src/gpu/gl/GrGLCaps.cpp
parent4036674952f341dab0695c3b054fefa5bb8cdec1 (diff)
Fix setColocatedSampleLocations on ES and GL < 4.5
Updates setColocatedSampleLocations to use glFramebufferParameteri when the DSA version glNamedFramebufferParameteri is not present. BUG=skia: Review URL: https://codereview.chromium.org/1415503008
Diffstat (limited to 'src/gpu/gl/GrGLCaps.cpp')
-rw-r--r--src/gpu/gl/GrGLCaps.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index 86ff54e830..de7fcd5c57 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -324,9 +324,17 @@ void GrGLCaps::init(const GrContextOptions& contextOptions,
fDiscardRenderTargetSupport = false;
fInvalidateFBType = kNone_InvalidateFBType;
}
- glslCaps->fProgrammableSampleLocationsSupport =
- ctxInfo.hasExtension("GL_NV_sample_locations") ||
- ctxInfo.hasExtension("GL_ARB_sample_locations");
+
+ if (kGL_GrGLStandard == standard) {
+ glslCaps->fProgrammableSampleLocationsSupport =
+ ctxInfo.version() >= GR_GL_VER(4, 3) &&
+ (ctxInfo.hasExtension("GL_ARB_sample_locations") ||
+ ctxInfo.hasExtension("GL_NV_sample_locations"));
+ } else {
+ glslCaps->fProgrammableSampleLocationsSupport =
+ ctxInfo.version() >= GR_GL_VER(3, 1) &&
+ ctxInfo.hasExtension("GL_NV_sample_locations");
+ }
/**************************************************************************
* GrCaps fields