From 5326a18fdfe520ed424d9d7c811191cfb55aeb08 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Fri, 31 Mar 2017 21:55:26 +1000 Subject: [PATCH] OGL: Fix MSAA being forced to 1x This was a regression from the remove-everything-static-from-renderer PR. As the comment indicates, it would be nice to move all of this logic out of the Renderer constructor, but this is a much larger change. --- Source/Core/VideoBackends/OGL/Render.cpp | 4 ++++ Source/Core/VideoBackends/OGL/main.cpp | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Core/VideoBackends/OGL/Render.cpp b/Source/Core/VideoBackends/OGL/Render.cpp index 69554269cb..198dc7f05f 100644 --- a/Source/Core/VideoBackends/OGL/Render.cpp +++ b/Source/Core/VideoBackends/OGL/Render.cpp @@ -580,6 +580,10 @@ Renderer::Renderer() g_Config.backend_info.bSupportsEarlyZ = g_ogl_config.bSupportsEarlyFragmentTests || g_ogl_config.bSupportsConservativeDepth; + glGetIntegerv(GL_MAX_SAMPLES, &g_ogl_config.max_samples); + if (g_ogl_config.max_samples < 1 || !g_ogl_config.bSupportsMSAA) + g_ogl_config.max_samples = 1; + if (g_ogl_config.bSupportsDebug) { if (GLExtensions::Supports("GL_KHR_debug")) diff --git a/Source/Core/VideoBackends/OGL/main.cpp b/Source/Core/VideoBackends/OGL/main.cpp index c1cf73f413..300d096978 100644 --- a/Source/Core/VideoBackends/OGL/main.cpp +++ b/Source/Core/VideoBackends/OGL/main.cpp @@ -170,10 +170,6 @@ bool VideoBackend::FillBackendInfo() return false; } - glGetIntegerv(GL_MAX_SAMPLES, &g_ogl_config.max_samples); - if (g_ogl_config.max_samples < 1 || !g_ogl_config.bSupportsMSAA) - g_ogl_config.max_samples = 1; - // TODO: Move the remaining fields from the Renderer constructor here. return true; }