From 520849f5811389c4cee8cf3d5117ecdca9af045b Mon Sep 17 00:00:00 2001 From: Ander Conselvan de Oliveira Date: Tue, 28 Aug 2018 14:32:30 +0300 Subject: [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. --- src/mbgl/gl/context.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mbgl/gl/context.cpp b/src/mbgl/gl/context.cpp index 0b40cef613..5fb249c802 100644 --- a/src/mbgl/gl/context.cpp +++ b/src/mbgl/gl/context.cpp @@ -127,7 +127,11 @@ void Context::initializeExtensions(const std::function(MBGL_CHECK_ERROR(glGetString(GL_RENDERER))); Log::Info(Event::General, "GPU Identifier: %s", renderer.c_str()); - debugging = std::make_unique(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(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 -- cgit v1.2.1