Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(515)

Unified Diff: src/gpu/gl/GrGLCaps.cpp

Issue 1415503008: Fix setColocatedSampleLocations on ES and GL < 4.5 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: address comments Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/gl/GrGLAssembleInterface.cpp ('k') | src/gpu/gl/GrGLGpu.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLCaps.cpp
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index 1d25a2ca2f47eba5fcf1d4362387f9467983b1c4..1ce961e37d4e7810ce7c3e914c9ef6f9ebc0675b 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -331,9 +331,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
« no previous file with comments | « src/gpu/gl/GrGLAssembleInterface.cpp ('k') | src/gpu/gl/GrGLGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698