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

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

Issue 1266773003: Implement support for dual source blending in ES (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 5 months 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/GrGLCaps.cpp ('k') | src/gpu/gl/builders/GrGLFragmentShaderBuilder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLInterface.cpp
diff --git a/src/gpu/gl/GrGLInterface.cpp b/src/gpu/gl/GrGLInterface.cpp
index 9f58c732216c4bef9ea31197a07331c80e4e4b90..ffc2ea0bcb056b60ca6b6463c03dd458e9e6c2cc 100644
--- a/src/gpu/gl/GrGLInterface.cpp
+++ b/src/gpu/gl/GrGLInterface.cpp
@@ -390,13 +390,22 @@ bool GrGLInterface::validate() const {
}
// Dual source blending
- if (kGL_GrGLStandard == fStandard &&
- (glVer >= GR_GL_VER(3,3) || fExtensions.has("GL_ARB_blend_func_extended"))) {
- if (NULL == fFunctions.fBindFragDataLocationIndexed) {
- RETURN_FALSE_INTERFACE
+ if (kGL_GrGLStandard == fStandard) {
+ if (glVer >= GR_GL_VER(3,3) || fExtensions.has("GL_ARB_blend_func_extended")) {
+ if (NULL == fFunctions.fBindFragDataLocationIndexed) {
+ RETURN_FALSE_INTERFACE
+ }
+ }
+ } else {
+ if (glVer >= GR_GL_VER(3,0) && fExtensions.has("GL_EXT_blend_func_extended")) {
+ if (NULL == fFunctions.fBindFragDataLocation ||
+ NULL == fFunctions.fBindFragDataLocationIndexed) {
+ RETURN_FALSE_INTERFACE
+ }
}
}
+
// glGetStringi was added in version 3.0 of both desktop and ES.
if (glVer >= GR_GL_VER(3, 0)) {
if (NULL == fFunctions.fGetStringi) {
« no previous file with comments | « src/gpu/gl/GrGLCaps.cpp ('k') | src/gpu/gl/builders/GrGLFragmentShaderBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698