diff options
| author | 2020-01-23 10:08:45 -0400 | |
|---|---|---|
| committer | 2020-01-23 10:08:45 -0400 | |
| commit | 9c6b5cae681a517b3e8e7b6cf0c374911b3f6588 (patch) | |
| tree | 35cb3c5ce9c352d6336d9950648aafbf19798ca1 /src | |
| parent | Merge pull request #3324 from FearlessTobi/port-5037 (diff) | |
| parent | gl_shader_cache: Disable fastmath on Nvidia (diff) | |
| download | yuzu-9c6b5cae681a517b3e8e7b6cf0c374911b3f6588.tar.gz yuzu-9c6b5cae681a517b3e8e7b6cf0c374911b3f6588.tar.xz yuzu-9c6b5cae681a517b3e8e7b6cf0c374911b3f6588.zip | |
Merge pull request #3338 from ReinUsesLisp/no-fastmath
gl_shader_cache: Disable fastmath on Nvidia
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_shader_cache.cpp | 4 |
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 | |||
| 260 | "#extension GL_NV_shader_thread_group : require\n" | 260 | "#extension GL_NV_shader_thread_group : require\n" |
| 261 | "#extension GL_NV_shader_thread_shuffle : require\n"; | 261 | "#extension GL_NV_shader_thread_shuffle : require\n"; |
| 262 | } | 262 | } |
| 263 | // This pragma stops Nvidia's driver from over optimizing math (probably using fp16 operations) | ||
| 264 | // on places where we don't want to. | ||
| 265 | // Thanks to Ryujinx for finding this workaround. | ||
| 266 | source += "#pragma optionNV(fastmath off)\n"; | ||
| 263 | 267 | ||
| 264 | if (shader_type == ShaderType::Geometry) { | 268 | if (shader_type == ShaderType::Geometry) { |
| 265 | const auto [glsl_topology, max_vertices] = GetPrimitiveDescription(variant.primitive_mode); | 269 | const auto [glsl_topology, max_vertices] = GetPrimitiveDescription(variant.primitive_mode); |