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 12:00:11 +0200
commit45dc313009de80da3b4ba988b133c69b6057bec1 (patch)
tree64402370639a70c930b6669020aa3cd7248f4447
parent424ba0d9dec06b17741a8ac386e1ca77fc41a4d5 (diff)
downloadqtlocation-mapboxgl-45dc313009de80da3b4ba988b133c69b6057bec1.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;