From 29f91e4986183c0556b0340e40c2aaa6d3644fd0 Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Fri, 29 Oct 2021 02:37:03 +0200 Subject: [PATCH] early-access version 2162 --- README.md | 2 +- src/video_core/renderer_opengl/gl_device.cpp | 15 +++++++++++++++ src/yuzu/main.cpp | 4 ---- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 40fc39626..ac10764c6 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 2161. +This is the source code for early-access 2162. ## Legal Notice diff --git a/src/video_core/renderer_opengl/gl_device.cpp b/src/video_core/renderer_opengl/gl_device.cpp index 1e1d1d020..de523e4e8 100755 --- a/src/video_core/renderer_opengl/gl_device.cpp +++ b/src/video_core/renderer_opengl/gl_device.cpp @@ -181,6 +181,21 @@ Device::Device() { LOG_ERROR(Render_OpenGL, "Assembly shaders enabled but not supported"); shader_backend = Settings::ShaderBackend::GLSL; } + + if (shader_backend == Settings::ShaderBackend::GLSL && is_nvidia && + !Settings::values.renderer_debug) { + const std::string_view driver_version = version.substr(13); + const int version_major = + std::atoi(driver_version.substr(0, driver_version.find(".")).data()); + + if (version_major >= 495 && version_major <= 496) { + LOG_WARNING(Render_OpenGL, "NVIDIA drivers 495 through 496 causes significant problems " + "with yuzu. Forcing GLASM as a mitigation."); + shader_backend = Settings::ShaderBackend::GLASM; + use_assembly_shaders = true; + } + } + // Blocks AMD and Intel OpenGL drivers on Windows from using asynchronous shader compilation. use_asynchronous_shaders = Settings::values.use_asynchronous_shaders.GetValue() && !(is_amd || (is_intel && !is_linux)); diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 65b832ec0..2ada228e0 100755 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -372,10 +372,6 @@ GMainWindow::~GMainWindow() { if (render_window->parent() == nullptr) { delete render_window; } - -#if defined(HAVE_SDL2) && !defined(_WIN32) - SDL_QuitSubSystem(SDL_INIT_VIDEO); -#endif } void GMainWindow::RegisterMetaTypes() {