diff options
author | bunnei <bunneidev@gmail.com> | 2021-10-29 02:57:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-29 02:57:53 +0200 |
commit | 60e79d50f8e30c7c498f3fc391348764d9fec7de (patch) | |
tree | 55335efdec32183b45346b3969a8213eea2b3e64 | |
parent | Merge pull request #7245 from Morph1984/compile-opt-desc (diff) | |
parent | gl_device: Force GLASM on NVIDIA drivers 495-496 (diff) | |
download | yuzu-60e79d50f8e30c7c498f3fc391348764d9fec7de.tar yuzu-60e79d50f8e30c7c498f3fc391348764d9fec7de.tar.gz yuzu-60e79d50f8e30c7c498f3fc391348764d9fec7de.tar.bz2 yuzu-60e79d50f8e30c7c498f3fc391348764d9fec7de.tar.lz yuzu-60e79d50f8e30c7c498f3fc391348764d9fec7de.tar.xz yuzu-60e79d50f8e30c7c498f3fc391348764d9fec7de.tar.zst yuzu-60e79d50f8e30c7c498f3fc391348764d9fec7de.zip |
-rw-r--r-- | src/video_core/renderer_opengl/gl_device.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_device.cpp b/src/video_core/renderer_opengl/gl_device.cpp index 1e1d1d020..0764ea6e0 100644 --- 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) { + LOG_WARNING(Render_OpenGL, "NVIDIA drivers 495 and later 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)); |