From 48e16c4c496474793da36fde89a3f0d5c5f69b28 Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Tue, 10 Dec 2019 23:49:43 -0300 Subject: gl_shader_cache: Add missing new-line on emitted GLSL Add missing new-line. This caused shaders using local memory and shared memory to inject a preprocessor GLSL line after an expression (resulting in invalid code). It looked like this: shared uint smem[8];#define LOCAL_MEMORY_SIZE 16 It should look like this (addressed by this commit): shared uint smem[8]; \#define LOCAL_MEMORY_SIZE 16 --- src/video_core/renderer_opengl/gl_shader_cache.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/video_core') diff --git a/src/video_core/renderer_opengl/gl_shader_cache.cpp b/src/video_core/renderer_opengl/gl_shader_cache.cpp index 370bdf052..270a9dc2b 100644 --- a/src/video_core/renderer_opengl/gl_shader_cache.cpp +++ b/src/video_core/renderer_opengl/gl_shader_cache.cpp @@ -281,11 +281,11 @@ CachedProgram BuildShader(const Device& device, u64 unique_identifier, ShaderTyp if (variant.shared_memory_size > 0) { // 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); + source += fmt::format("shared uint smem[{}];\n", variant.shared_memory_size); } if (variant.local_memory_size > 0) { - source += fmt::format("#define LOCAL_MEMORY_SIZE {}", + source += fmt::format("#define LOCAL_MEMORY_SIZE {}\n", Common::AlignUp(variant.local_memory_size, 4) / 4); } } -- cgit v1.2.3