summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorlat9nq <lat9nq@gmail.com>2021-10-29 01:04:06 +0200
committerlat9nq <lat9nq@gmail.com>2021-10-29 01:38:49 +0200
commit61121d1b22cd4aa6537fcc212d08a2e2314ca39c (patch)
tree54bf4ac092c30fa94d53bf8e329f5d7a5ec1bb52 /src/video_core
parentMerge pull request #7186 from MightyCreak/fix-crash-configure-window (diff)
downloadyuzu-61121d1b22cd4aa6537fcc212d08a2e2314ca39c.tar
yuzu-61121d1b22cd4aa6537fcc212d08a2e2314ca39c.tar.gz
yuzu-61121d1b22cd4aa6537fcc212d08a2e2314ca39c.tar.bz2
yuzu-61121d1b22cd4aa6537fcc212d08a2e2314ca39c.tar.lz
yuzu-61121d1b22cd4aa6537fcc212d08a2e2314ca39c.tar.xz
yuzu-61121d1b22cd4aa6537fcc212d08a2e2314ca39c.tar.zst
yuzu-61121d1b22cd4aa6537fcc212d08a2e2314ca39c.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/renderer_opengl/gl_device.cpp15
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));