From d509758b6f5797d14e2d6addb766c9ca254fd5be Mon Sep 17 00:00:00 2001 From: fzurita Date: Sun, 1 Nov 2020 09:12:48 -0500 Subject: [PATCH] Disable dual source blending for Adreno, it causes GPU driver crashes --- src/Graphics/OpenGLContext/opengl_GLInfo.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Graphics/OpenGLContext/opengl_GLInfo.cpp b/src/Graphics/OpenGLContext/opengl_GLInfo.cpp index 877d6df6..fc986725 100644 --- a/src/Graphics/OpenGLContext/opengl_GLInfo.cpp +++ b/src/Graphics/OpenGLContext/opengl_GLInfo.cpp @@ -45,6 +45,8 @@ void GLInfo::init() { LOG(LOG_VERBOSE, "OpenGL vendor: %s", glGetString(GL_VENDOR)); const char * strRenderer = reinterpret_cast(glGetString(GL_RENDERER)); + bool isAnyAdreno = strstr(strRenderer, "Adreno") != nullptr; + if (std::regex_match(std::string(strRenderer), std::regex("Adreno.*530"))) renderer = Renderer::Adreno530; else if (std::regex_match(std::string(strRenderer), std::regex("Adreno.*540")) || @@ -162,7 +164,7 @@ void GLInfo::init() { ext_fetch = Utils::isExtensionSupported(*this, "GL_EXT_shader_framebuffer_fetch") && !isGLES2 && (!isGLESX || ext_draw_buffers_indexed) && !imageTexturesInterlock; eglImage = (Utils::isEGLExtensionSupported("EGL_KHR_image_base") || Utils::isEGLExtensionSupported("EGL_KHR_image")); - dual_source_blending = !(isGLESX) || Utils::isExtensionSupported(*this, "GL_EXT_blend_func_extended"); + dual_source_blending = !isGLESX || (Utils::isExtensionSupported(*this, "GL_EXT_blend_func_extended") && !isAnyAdreno); #ifdef OS_ANDROID eglImage = eglImage &&