From 4cff5dd1940cf8eded9daa445c16c90c89720a4a Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Sun, 17 May 2020 21:24:44 -0400 Subject: OpenGL: Enable Debug Context and Synchronous debugging when graphics debugging is enabled. This commit aims to help easing debugging of driver crashes without having to modify existing code. --- src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/yuzu_cmd') diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp index 411e7e647..09cc0a3b5 100644 --- a/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp +++ b/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp @@ -98,6 +98,9 @@ EmuWindow_SDL2_GL::EmuWindow_SDL2_GL(Core::System& system, bool fullscreen) SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8); SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 0); SDL_GL_SetAttribute(SDL_GL_SHARE_WITH_CURRENT_CONTEXT, 1); + if (Settings::values.renderer_debug) { + SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_DEBUG_FLAG); + } SDL_GL_SetSwapInterval(0); std::string window_title = fmt::format("yuzu {} | {}-{}", Common::g_build_fullname, -- cgit v1.2.3