aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLCaps.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/gl/GrGLCaps.cpp')
-rw-r--r--src/gpu/gl/GrGLCaps.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index 3b401e65a1..088e5cbbdd 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -62,6 +62,7 @@ GrGLCaps::GrGLCaps(const GrContextOptions& contextOptions,
fRequiresCullFaceEnableDisableWhenDrawingLinesAfterNonLines = false;
fBlitFramebufferFlags = kNoSupport_BlitFramebufferFlag;
+ fMaxInstancesPerDrawArraysWithoutCrashing = 0;
fShaderCaps.reset(new GrShaderCaps(contextOptions));
@@ -595,6 +596,12 @@ void GrGLCaps::init(const GrContextOptions& contextOptions,
fRequiresCullFaceEnableDisableWhenDrawingLinesAfterNonLines = true;
}
+ // Our Chromebook with kPowerVRRogue_GrGLRenderer seems to crash when glDrawArraysInstanced is
+ // given 1 << 15 or more instances.
+ if (kPowerVRRogue_GrGLRenderer == ctxInfo.renderer()) {
+ fMaxInstancesPerDrawArraysWithoutCrashing = 0x7fff;
+ }
+
// Texture uploads sometimes seem to be ignored to textures bound to FBOS on Tegra3.
if (kTegra3_GrGLRenderer == ctxInfo.renderer()) {
fDisallowTexSubImageForUnormConfigTexturesEverBoundToFBO = true;
@@ -1374,6 +1381,8 @@ void GrGLCaps::onDumpJSON(SkJSONWriter* writer) const {
fDisallowTexSubImageForUnormConfigTexturesEverBoundToFBO);
writer->appendBool("Intermediate texture for all updates of textures bound to FBOs",
fUseDrawInsteadOfAllRenderTargetWrites);
+ writer->appendBool("Max instances per glDrawArraysInstanced without crashing (or zero)",
+ fMaxInstancesPerDrawArraysWithoutCrashing);
writer->beginArray("configs");