From 19f4921ca78d6c8d789647da2a73477e592ea4a7 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Wed, 14 Oct 2020 18:49:49 +1000 Subject: [PATCH] GPU/OpenGL: Fix crash on non-dual-source-blend drivers --- src/core/gpu_hw_opengl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/gpu_hw_opengl.cpp b/src/core/gpu_hw_opengl.cpp index bb843d97f..c0797cafb 100644 --- a/src/core/gpu_hw_opengl.cpp +++ b/src/core/gpu_hw_opengl.cpp @@ -219,7 +219,8 @@ void GPU_HW_OpenGL::SetCapabilities(HostDisplay* host_display) int max_dual_source_draw_buffers = 0; glGetIntegerv(GL_MAX_DUAL_SOURCE_DRAW_BUFFERS, &max_dual_source_draw_buffers); - m_supports_dual_source_blend = (max_dual_source_draw_buffers > 0); + m_supports_dual_source_blend = + (max_dual_source_draw_buffers > 0) && (GLAD_GL_VERSION_3_3 || GLAD_GL_ARB_blend_func_extended); if (!m_supports_dual_source_blend) Log_WarningPrintf("Dual-source blending is not supported, this may break some mask effects.");