diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2017-07-20 16:54:10 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2017-07-21 09:31:16 -0700 |
commit | cebc3c8d4bac9df72983807c856def5d8954b212 (patch) | |
tree | 6f24ba94d9617dcb547bdfb801386b5112734a5a /src | |
parent | b83d79708185f0d8def1d3638fcc702305cd3fab (diff) | |
download | qtlocation-mapboxgl-cebc3c8d4bac9df72983807c856def5d8954b212.tar.gz |
[android] Disable program caching on Adreno 3xx, 4xx, and 5xx GPUs due to known bugs
Diffstat (limited to 'src')
-rw-r--r-- | src/mbgl/gl/context.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/mbgl/gl/context.cpp b/src/mbgl/gl/context.cpp index 1a8d5c0775..55dde604d3 100644 --- a/src/mbgl/gl/context.cpp +++ b/src/mbgl/gl/context.cpp @@ -255,7 +255,21 @@ bool Context::supportsVertexArrays() const { #if MBGL_HAS_BINARY_PROGRAMS bool Context::supportsProgramBinaries() const { - return programBinary && programBinary->programBinary && programBinary->getProgramBinary; + if (!programBinary || !programBinary->programBinary || !programBinary->getProgramBinary) { + return false; + } + + // Blacklist Adreno 3xx, 4xx, and 5xx GPUs due to known bugs: + // https://bugs.chromium.org/p/chromium/issues/detail?id=510637 + // https://chromium.googlesource.com/chromium/src/gpu/+/master/config/gpu_driver_bug_list.json#2316 + const std::string renderer = reinterpret_cast<const char*>(glGetString(GL_RENDERER)); + if (renderer.find("Adreno (TM) 3") != std::string::npos + || renderer.find("Adreno (TM) 4") != std::string::npos + || renderer.find("Adreno (TM) 5") != std::string::npos) { + return false; + } + + return true; } optional<std::pair<BinaryProgramFormat, std::string>> |