Disable buffer mapping on Galaxy J5
Bug: skia:6309
Change-Id: Ieaf5bbc36c7fa7dee0cc07b480046bb0f190b138
Reviewed-on: https://skia-review.googlesource.com/19053
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index 9b8b2c9..8467909 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -439,6 +439,16 @@
}
}
+ // We found that the Galaxy J5 with an Adreno 306 running 6.0.1 has a bug where
+ // GL_INVALID_OPERATION thrown by glDrawArrays when using a buffer that was mapped. The same bug
+ // did not reproduce on a Nexus7 2013 with a 320 running Android M with driver 127.0. It's
+ // unclear whether this really affects a wide range of devices.
+ if (ctxInfo.renderer() == kAdreno3xx_GrGLRenderer && ctxInfo.driver() == kQualcomm_GrGLDriver &&
+ ctxInfo.driverVersion() > GR_GL_DRIVER_VER(127, 0)) {
+ fMapBufferType = kNone_MapBufferType;
+ fMapBufferFlags = kNone_MapFlags;
+ }
+
if (kGL_GrGLStandard == standard) {
if (version >= GR_GL_VER(3, 0) || ctxInfo.hasExtension("GL_ARB_pixel_buffer_object")) {
fTransferBufferType = kPBO_TransferBufferType;