summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvo van Dongen <info@ivovandongen.nl>2017-10-20 12:44:02 -0700
committerIvo van Dongen <info@ivovandongen.nl>2017-10-26 13:10:42 +0300
commit7f52a9d0808283fe12e77275c1ce4d61a9cdca8b (patch)
tree4521cf561801d1cd7ed8e4a2ae7babc83304674c
parent91eb595463cf42c85edc7fe5b47023f8d7b75828 (diff)
downloadqtlocation-mapboxgl-upstream/ivd-cp-10253.tar.gz
[core] blacklist VAO usage on adreno 3xxupstream/ivd-cp-10253
- 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;