summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2020-01-23 15:08:45 +0100
committerGitHub <noreply@github.com>2020-01-23 15:08:45 +0100
commit9c6b5cae681a517b3e8e7b6cf0c374911b3f6588 (patch)
tree35cb3c5ce9c352d6336d9950648aafbf19798ca1 /src
parentMerge pull request #3324 from FearlessTobi/port-5037 (diff)
parentgl_shader_cache: Disable fastmath on Nvidia (diff)
downloadyuzu-9c6b5cae681a517b3e8e7b6cf0c374911b3f6588.tar
yuzu-9c6b5cae681a517b3e8e7b6cf0c374911b3f6588.tar.gz
yuzu-9c6b5cae681a517b3e8e7b6cf0c374911b3f6588.tar.bz2
yuzu-9c6b5cae681a517b3e8e7b6cf0c374911b3f6588.tar.lz
yuzu-9c6b5cae681a517b3e8e7b6cf0c374911b3f6588.tar.xz
yuzu-9c6b5cae681a517b3e8e7b6cf0c374911b3f6588.tar.zst
yuzu-9c6b5cae681a517b3e8e7b6cf0c374911b3f6588.zip
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_opengl/gl_shader_cache.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_cache.cpp b/src/video_core/renderer_opengl/gl_shader_cache.cpp
index a4acb3796..3c5bdd377 100644
--- a/src/video_core/renderer_opengl/gl_shader_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_cache.cpp
@@ -260,6 +260,10 @@ CachedProgram BuildShader(const Device& device, u64 unique_identifier, ShaderTyp
"#extension GL_NV_shader_thread_group : require\n"
"#extension GL_NV_shader_thread_shuffle : require\n";
}
+ // This pragma stops Nvidia's driver from over optimizing math (probably using fp16 operations)
+ // on places where we don't want to.
+ // Thanks to Ryujinx for finding this workaround.
+ source += "#pragma optionNV(fastmath off)\n";
if (shader_type == ShaderType::Geometry) {
const auto [glsl_topology, max_vertices] = GetPrimitiveDescription(variant.primitive_mode);