From 354fbe701e99c1b9cd0bb5463e9a15ca374c12d7 Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Fri, 5 Jun 2020 21:18:22 -0300 Subject: renderer_opengl: Only enable DEBUG_OUTPUT when graphics debugging is enabled Avoids logging when it's not relevant. This can potentially reduce driver's internal thread overhead. --- src/video_core/renderer_opengl/renderer_opengl.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/video_core') diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp index e7952924a..6214fcbc3 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.cpp +++ b/src/video_core/renderer_opengl/renderer_opengl.cpp @@ -751,11 +751,9 @@ void RendererOpenGL::RenderScreenshot() { } bool RendererOpenGL::Init() { - if (GLAD_GL_KHR_debug) { + if (Settings::values.renderer_debug && GLAD_GL_KHR_debug) { glEnable(GL_DEBUG_OUTPUT); - if (Settings::values.renderer_debug) { - glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS); - } + glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS); glDebugMessageCallback(DebugHandler, nullptr); } -- cgit v1.2.3