Force disable glDebugMessageCallback on Linux+AMD.

This commit is contained in:
Paul Chote
2020-02-12 21:04:42 +00:00
committed by Matthias Mailänder
parent 52f4e24e22
commit 7b4019577d

View File

@@ -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));