Index: src/gpu/gl/GrGLCaps.cpp |
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp |
index 22fd053c1d46ab92c9db192302c2a9a87a864443..2ef2f3cc3900c5dfbbda82cf516ed166c3af0e0e 100644 |
--- a/src/gpu/gl/GrGLCaps.cpp |
+++ b/src/gpu/gl/GrGLCaps.cpp |
@@ -448,6 +448,20 @@ void GrGLCaps::init(const GrContextOptions& contextOptions, |
fOversizedStencilSupport = ctxInfo.version() >= GR_GL_VER(3, 0); |
} |
+ if (kGL_GrGLStandard == standard) { |
+ // 3.1 has draw_instanced but not instanced_arrays, for the time being we only care about |
+ // instanced arrays, but we could make this more granular if we wanted |
+ fSupportsInstancedDraws = |
+ version >= GR_GL_VER(3, 2) || |
+ (ctxInfo.hasExtension("GL_ARB_draw_instanced") && |
+ ctxInfo.hasExtension("GL_ARB_instanced_arrays")); |
+ } else { |
+ fSupportsInstancedDraws = |
+ version >= GR_GL_VER(3, 0) || |
+ (ctxInfo.hasExtension("GL_EXT_draw_instanced") && |
+ ctxInfo.hasExtension("GL_EXT_instanced_arrays")); |
+ } |
+ |
this->initConfigTexturableTable(ctxInfo, gli); |
this->initConfigRenderableTable(ctxInfo); |
this->initShaderPrecisionTable(ctxInfo, gli, glslCaps); |