Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[android] Disable program caching on Adreno 3xx, 4xx, and 5xx GPUs du…
Browse files Browse the repository at this point in the history
…e to known bugs
  • Loading branch information
jfirebaugh committed Jul 21, 2017
1 parent b83d797 commit a908d7e
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/mbgl/gl/context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>>
Expand Down

0 comments on commit a908d7e

Please sign in to comment.