summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2019-11-22 04:59:18 -0300
committerGravatar ReinUsesLisp2019-11-22 21:28:49 -0300
commit894ad74b8776687bdf9699b53c75659fbc757941 (patch)
tree12fbe0e6097c72a5d95ccdd56cdec589c2984e60 /src
parentgl_shader_decompiler: Normalize image bindings (diff)
downloadyuzu-894ad74b8776687bdf9699b53c75659fbc757941.tar.gz
yuzu-894ad74b8776687bdf9699b53c75659fbc757941.tar.xz
yuzu-894ad74b8776687bdf9699b53c75659fbc757941.zip
gl_shader_cache: Hack shared memory size
The current shared memory size seems to be smaller than what the game actually uses. This makes Nvidia's driver consistently blow up; in the case of FE3H it made it explode on Qt's SwapBuffers while SDL2 worked just fine. For now keep this hack since it's still progress over the previous hardcoded shared memory size.
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_opengl/gl_shader_cache.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_cache.cpp b/src/video_core/renderer_opengl/gl_shader_cache.cpp
index 41ca005a1..370bdf052 100644
--- a/src/video_core/renderer_opengl/gl_shader_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_cache.cpp
@@ -279,8 +279,9 @@ CachedProgram BuildShader(const Device& device, u64 unique_identifier, ShaderTyp
279 variant.block_x, variant.block_y, variant.block_z); 279 variant.block_x, variant.block_y, variant.block_z);
280 280
281 if (variant.shared_memory_size > 0) { 281 if (variant.shared_memory_size > 0) {
282 source += fmt::format("shared uint smem[{}];", 282 // TODO(Rodrigo): We should divide by four here, but having a larger shared memory pool
283 Common::AlignUp(variant.shared_memory_size, 4) / 4); 283 // avoids out of bound stores. Find out why shared memory size is being invalid.
284 source += fmt::format("shared uint smem[{}];", variant.shared_memory_size);
284 } 285 }
285 286
286 if (variant.local_memory_size > 0) { 287 if (variant.local_memory_size > 0) {