Support GL_EXT_draw_buffers
Change-Id: I078aa7c42de4368602b0ef43bd7e18efbfd1e049
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212182
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
diff --git a/src/gpu/gl/GrGLInterfaceAutogen.cpp b/src/gpu/gl/GrGLInterfaceAutogen.cpp
index c2c8a5e..a404ee6 100644
--- a/src/gpu/gl/GrGLInterfaceAutogen.cpp
+++ b/src/gpu/gl/GrGLInterfaceAutogen.cpp
@@ -220,11 +220,21 @@
if (GR_IS_GR_GL(fStandard) ||
(GR_IS_GR_GL_ES(fStandard) && (
+ (glVer >= GR_GL_VER(3,0)) ||
+ fExtensions.has("GL_EXT_draw_buffers"))) ||
+ (GR_IS_GR_WEBGL(fStandard) && (
+ (glVer >= GR_GL_VER(2,0))))) {
+ if (!fFunctions.fDrawBuffers) {
+ RETURN_FALSE_INTERFACE;
+ }
+ }
+
+ if (GR_IS_GR_GL(fStandard) ||
+ (GR_IS_GR_GL_ES(fStandard) && (
(glVer >= GR_GL_VER(3,0)))) ||
(GR_IS_GR_WEBGL(fStandard) && (
(glVer >= GR_GL_VER(2,0))))) {
- if (!fFunctions.fDrawBuffers ||
- !fFunctions.fReadBuffer) {
+ if (!fFunctions.fReadBuffer) {
RETURN_FALSE_INTERFACE;
}
}