summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar lat9nq2021-10-28 19:04:06 -0400
committerGravatar lat9nq2021-10-28 19:38:49 -0400
commit61121d1b22cd4aa6537fcc212d08a2e2314ca39c (patch)
tree54bf4ac092c30fa94d53bf8e329f5d7a5ec1bb52 /src
parentMerge pull request #7186 from MightyCreak/fix-crash-configure-window (diff)
downloadyuzu-61121d1b22cd4aa6537fcc212d08a2e2314ca39c.tar.gz
yuzu-61121d1b22cd4aa6537fcc212d08a2e2314ca39c.tar.xz
yuzu-61121d1b22cd4aa6537fcc212d08a2e2314ca39c.zip
gl_device: Force GLASM on NVIDIA drivers 495-496
GLSL shaders currently do not render correctly on the recent NVIDIA drivers. This adds a check that forces assembly shaders for these drivers since they seem unaffected and adds a warning informing of the decision. Developers can disable the check by enabling graphics debugging.
Diffstat (limited to '')
-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() {
181 LOG_ERROR(Render_OpenGL, "Assembly shaders enabled but not supported"); 181 LOG_ERROR(Render_OpenGL, "Assembly shaders enabled but not supported");
182 shader_backend = Settings::ShaderBackend::GLSL; 182 shader_backend = Settings::ShaderBackend::GLSL;
183 } 183 }
184
185 if (shader_backend == Settings::ShaderBackend::GLSL && is_nvidia &&
186 !Settings::values.renderer_debug) {
187 const std::string_view driver_version = version.substr(13);
188 const int version_major =
189 std::atoi(driver_version.substr(0, driver_version.find(".")).data());
190
191 if (version_major >= 495) {
192 LOG_WARNING(Render_OpenGL, "NVIDIA drivers 495 and later causes significant problems "
193 "with yuzu. Forcing GLASM as a mitigation.");
194 shader_backend = Settings::ShaderBackend::GLASM;
195 use_assembly_shaders = true;
196 }
197 }
198
184 // Blocks AMD and Intel OpenGL drivers on Windows from using asynchronous shader compilation. 199 // Blocks AMD and Intel OpenGL drivers on Windows from using asynchronous shader compilation.
185 use_asynchronous_shaders = Settings::values.use_asynchronous_shaders.GetValue() && 200 use_asynchronous_shaders = Settings::values.use_asynchronous_shaders.GetValue() &&
186 !(is_amd || (is_intel && !is_linux)); 201 !(is_amd || (is_intel && !is_linux));