summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/backend/glsl
diff options
context:
space:
mode:
Diffstat (limited to 'src/shader_recompiler/backend/glsl')
-rw-r--r--src/shader_recompiler/backend/glsl/emit_glsl.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl.cpp b/src/shader_recompiler/backend/glsl/emit_glsl.cpp
index 8deaf5760..46d72963d 100644
--- a/src/shader_recompiler/backend/glsl/emit_glsl.cpp
+++ b/src/shader_recompiler/backend/glsl/emit_glsl.cpp
@@ -217,14 +217,14 @@ std::string EmitGLSL(const Profile& profile, const RuntimeInfo& runtime_info, IR
217 EmitCode(ctx, program); 217 EmitCode(ctx, program);
218 const std::string version{fmt::format("#version 450{}\n", GlslVersionSpecifier(ctx))}; 218 const std::string version{fmt::format("#version 450{}\n", GlslVersionSpecifier(ctx))};
219 ctx.header.insert(0, version); 219 ctx.header.insert(0, version);
220 if (program.local_memory_size > 0) {
221 ctx.header += fmt::format("uint lmem[{}];", Common::AlignUp(program.local_memory_size, 4));
222 }
223 if (program.shared_memory_size > 0) { 220 if (program.shared_memory_size > 0) {
224 ctx.header += 221 ctx.header +=
225 fmt::format("shared uint smem[{}];", Common::AlignUp(program.shared_memory_size, 4)); 222 fmt::format("shared uint smem[{}];", Common::AlignUp(program.shared_memory_size, 4));
226 } 223 }
227 ctx.header += "void main(){\n"; 224 ctx.header += "void main(){\n";
225 if (program.local_memory_size > 0) {
226 ctx.header += fmt::format("uint lmem[{}];", Common::AlignUp(program.local_memory_size, 4));
227 }
228 DefineVariables(ctx, ctx.header); 228 DefineVariables(ctx, ctx.header);
229 if (ctx.uses_cc_carry) { 229 if (ctx.uses_cc_carry) {
230 ctx.header += "uint carry;"; 230 ctx.header += "uint carry;";