Disable draw instanced support on virgl.

Bug: b/188410972
Change-Id: Ic2f6daf4b919efa76c8136345e763bfa17bb1050
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420716
Auto-Submit: Tao Wu <lepton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This commit is contained in:
Tao Wu 2021-06-22 22:50:17 -07:00 committed by Skia Commit-Bot
parent a8ac441411
commit ad77b4db8d
3 changed files with 10 additions and 0 deletions

View File

@ -3792,6 +3792,11 @@ void GrGLCaps::applyDriverCorrectnessWorkarounds(const GrGLContextInfo& ctxInfo,
fDrawArraysBaseVertexIsBroken = true;
}
// https://b.corp.google.com/issues/188410972
if (ctxInfo.renderer() == GrGLRenderer::kVirgl) {
fDrawInstancedSupport = false;
}
// http://anglebug.com/4538
if (fBaseVertexBaseInstanceSupport && !fDrawInstancedSupport) {
fBaseVertexBaseInstanceSupport = false;

View File

@ -339,6 +339,9 @@ static GrGLRenderer get_renderer(const char* rendererString, const GrGLExtension
if (strstr(rendererString, "llvmpipe")) {
return GrGLRenderer::kGalliumLLVM;
}
if (strstr(rendererString, "virgl")) {
return GrGLRenderer::kVirgl;
}
static const char kMaliGStr[] = "Mali-G";
if (0 == strncmp(rendererString, kMaliGStr, SK_ARRAY_COUNT(kMaliGStr) - 1)) {
return GrGLRenderer::kMaliG;

View File

@ -188,6 +188,8 @@ enum class GrGLRenderer {
kGalliumLLVM,
kVirgl,
kMali4xx,
/** G-3x, G-5x, or G-7x */
kMaliG,