summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvo van Dongen <info@ivovandongen.nl>2017-10-20 12:44:02 -0700
committerIvo van Dongen <ivovandongen@users.noreply.github.com>2017-10-26 18:14:45 +0200
commitbf9c1fb1b3f6121d4c939757ee043a70bef560e4 (patch)
tree4521cf561801d1cd7ed8e4a2ae7babc83304674c
parent91eb595463cf42c85edc7fe5b47023f8d7b75828 (diff)
downloadqtlocation-mapboxgl-bf9c1fb1b3f6121d4c939757ee043a70bef560e4.tar.gz
[core] blacklist VAO usage on adreno 3xx
- Causes crashes on usage of glBuffer(Sub)Data
-rw-r--r--src/mbgl/gl/context.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mbgl/gl/context.cpp b/src/mbgl/gl/context.cpp
index d0c538efb0..22b446e6d0 100644
--- a/src/mbgl/gl/context.cpp
+++ b/src/mbgl/gl/context.cpp
@@ -248,7 +248,14 @@ UniqueTexture Context::createTexture() {
}
bool Context::supportsVertexArrays() const {
- return vertexArray &&
+ static bool blacklisted = []() {
+ // Blacklist Adreno 3xx as it crashes on glBuffer(Sub)Data
+ const std::string renderer = reinterpret_cast<const char*>(glGetString(GL_RENDERER));
+ return renderer.find("Adreno (TM) 3") != std::string::npos;
+ }();
+
+ return !blacklisted &&
+ vertexArray &&
vertexArray->genVertexArrays &&
vertexArray->bindVertexArray &&
vertexArray->deleteVertexArrays;