From 7b4019577d5575ba6faf6ac1213c4ed1cc17e1d5 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Wed, 12 Feb 2020 21:04:42 +0000 Subject: [PATCH] Force disable glDebugMessageCallback on Linux+AMD. --- OpenRA.Platforms.Default/OpenGL.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/OpenRA.Platforms.Default/OpenGL.cs b/OpenRA.Platforms.Default/OpenGL.cs index ca9dc43a8e..cac9ba785b 100644 --- a/OpenRA.Platforms.Default/OpenGL.cs +++ b/OpenRA.Platforms.Default/OpenGL.cs @@ -501,6 +501,14 @@ namespace OpenRA.Platforms.Default if (Features.HasFlag(GLFeatures.DebugMessagesCallback) && Game.Settings.Graphics.DisableGLDebugMessageCallback) Features ^= GLFeatures.DebugMessagesCallback; + // Force disable the debug message callback feature on Linux + AMD GPU to work around a startup freeze + if (Features.HasFlag(GLFeatures.DebugMessagesCallback) && Platform.CurrentPlatform == PlatformType.Linux) + { + var renderer = glGetString(GL_RENDERER); + if (renderer.Contains("AMD") || renderer.Contains("Radeon")) + Features ^= GLFeatures.DebugMessagesCallback; + } + if (!Features.HasFlag(GLFeatures.Core)) { WriteGraphicsLog("Unsupported OpenGL version: " + glGetString(GL_VERSION));