Index: src/gpu/gl/GrGLCaps.cpp |
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp |
index 73bf6f0ee6aaf6fc2a0e90dfcc572ed49e0cce48..b0634a16646aafdb0589a97b6f1d6eb45b0a3e1e 100644 |
--- a/src/gpu/gl/GrGLCaps.cpp |
+++ b/src/gpu/gl/GrGLCaps.cpp |
@@ -306,6 +306,19 @@ bool GrGLCaps::init(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli) { |
fStencilWrapOpsSupport = true; |
} |
+ // GL_KHR_blend_equation_advanced is a proper subset of GL_NV_blend_equation_advanced, with all |
+ // the same enums, but we still check for the NV variants to support legacy drivers that didn't |
+ // export the KHR extension yet. |
+ if (ctxInfo.hasExtension("GL_KHR_blend_equation_advanced_coherent") || |
+ ctxInfo.hasExtension("GL_NV_blend_equation_advanced_coherent")) { |
+ fBlendEquationSupport = kAdvancedCoherent_BlendEquationSupport; |
+ } else if (ctxInfo.hasExtension("GL_KHR_blend_equation_advanced") || |
+ ctxInfo.hasExtension("GL_NV_blend_equation_advanced")) { |
+ fBlendEquationSupport = kAdvanced_BlendEquationSupport; |
+ } else { |
+ fBlendEquationSupport = kBasic_BlendEquationSupport; |
+ } |
+ |
if (kGL_GrGLStandard == standard) { |
fMapBufferFlags = kCanMap_MapFlag; // we require VBO support and the desktop VBO |
// extension includes glMapBuffer. |