소스 검색

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.
ReinUsesLisp 6 년 전
부모
커밋
894ad74b87
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      src/video_core/renderer_opengl/gl_shader_cache.cpp

+ 3 - 2
src/video_core/renderer_opengl/gl_shader_cache.cpp

@@ -279,8 +279,9 @@ CachedProgram BuildShader(const Device& device, u64 unique_identifier, ShaderTyp
                         variant.block_x, variant.block_y, variant.block_z);
 
         if (variant.shared_memory_size > 0) {
-            source += fmt::format("shared uint smem[{}];",
-                                  Common::AlignUp(variant.shared_memory_size, 4) / 4);
+            // TODO(Rodrigo): We should divide by four here, but having a larger shared memory pool
+            // avoids out of bound stores. Find out why shared memory size is being invalid.
+            source += fmt::format("shared uint smem[{}];", variant.shared_memory_size);
         }
 
         if (variant.local_memory_size > 0) {