summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnder Conselvan de Oliveira <ander.deoliveira@mapbox.com>2018-08-28 14:32:30 +0300
committerAnder Conselvan de Oliveira <ander.deoliveira@mapbox.com>2018-09-14 15:26:45 +0300
commit68d463ec2819a2c1e34159c717cfc0166b8ecb02 (patch)
treee574e2f6a461b00a6be685ff0b82cbf1c2326d03
parent1c53dc9ca8d90111c215643322114de2e7040e9c (diff)
downloadqtlocation-mapboxgl-68d463ec2819a2c1e34159c717cfc0166b8ecb02.tar.gz
[core] Disable debugging extension when running on ANGLE over Direct3D
The ANGLE implementation of GL_KHR_debug on Direct3D seems to be broken leading to a bad_alloc being thrown when running with a debug build, so disable it in that platform.
-rw-r--r--src/mbgl/gl/context.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mbgl/gl/context.cpp b/src/mbgl/gl/context.cpp
index 1909504525..cf7b80741f 100644
--- a/src/mbgl/gl/context.cpp
+++ b/src/mbgl/gl/context.cpp
@@ -127,7 +127,11 @@ void Context::initializeExtensions(const std::function<gl::ProcAddress(const cha
const std::string renderer = reinterpret_cast<const char*>(MBGL_CHECK_ERROR(glGetString(GL_RENDERER)));
Log::Info(Event::General, "GPU Identifier: %s", renderer.c_str());
- debugging = std::make_unique<extension::Debugging>(fn);
+ // Block ANGLE on Direct3D since the debugging extension is causing crashes
+ if (!(renderer.find("ANGLE") != std::string::npos
+ && renderer.find("Direct3D") != std::string::npos)) {
+ debugging = std::make_unique<extension::Debugging>(fn);
+ }
// Block Adreno 2xx, 3xx as it crashes on glBuffer(Sub)Data
// Block ARM Mali-T720 (in some MT8163 chipsets) as it crashes on glBindVertexArray