Index: src/gpu/gl/GrGLInterface.cpp |
diff --git a/src/gpu/gl/GrGLInterface.cpp b/src/gpu/gl/GrGLInterface.cpp |
index 2e3dd1f039b5bb178eb420680bb2bf6da9610327..89f1f9ba65cda6671eff1ee548483b9ecb8c85ee 100644 |
--- a/src/gpu/gl/GrGLInterface.cpp |
+++ b/src/gpu/gl/GrGLInterface.cpp |
@@ -114,8 +114,9 @@ bool GrGLInterface::validate() const { |
NULL == fFunctions.fBindAttribLocation || |
NULL == fFunctions.fBindBuffer || |
NULL == fFunctions.fBindTexture || |
+ NULL == fFunctions.fBlendColor || // -> GL >= 1.4 or extension, ES >= 2.0 |
+ NULL == fFunctions.fBlendEquation || // -> GL >= 1.4 or extension, ES >= 2.0 |
NULL == fFunctions.fBlendFunc || |
- NULL == fFunctions.fBlendColor || // -> GL >= 1.4, ES >= 2.0 or extension |
NULL == fFunctions.fBufferData || |
NULL == fFunctions.fBufferSubData || |
NULL == fFunctions.fClear || |
@@ -306,6 +307,28 @@ bool GrGLInterface::validate() const { |
} |
} |
+ // glTextureBarrier is part of desktop 4.5. There are also ARB and NV extensions. |
+ if (kGL_GrGLStandard == fStandard) { |
+ if (glVer >= GR_GL_VER(4,5) || |
+ fExtensions.has("GL_ARB_texture_barrier") || |
+ fExtensions.has("GL_NV_texture_barrier")) { |
+ if (NULL == fFunctions.fTextureBarrier) { |
+ RETURN_FALSE_INTERFACE |
+ } |
+ } |
+ } else if (fExtensions.has("GL_NV_texture_barrier")) { |
+ if (NULL == fFunctions.fTextureBarrier) { |
+ RETURN_FALSE_INTERFACE |
+ } |
+ } |
+ |
+ if (fExtensions.has("GL_KHR_blend_equation_advanced") || |
+ fExtensions.has("GL_NV_blend_equation_advanced")) { |
+ if (NULL == fFunctions.fBlendBarrier) { |
+ RETURN_FALSE_INTERFACE |
+ } |
+ } |
+ |
if (fExtensions.has("GL_EXT_discard_framebuffer")) { |
// FIXME: Remove this once Chromium is updated to provide this function |
#if 0 |