summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorameerj <52414509+ameerj@users.noreply.github.com>2021-06-25 02:14:31 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:39 +0200
commit00fa09dc45936005b2c27d858ab70213c7e1482d (patch)
tree4214c5ddfcaa4e21826f2057f3fda1d798ca63d5
parentglsl: Add passthrough geometry shader support (diff)
downloadyuzu-00fa09dc45936005b2c27d858ab70213c7e1482d.tar
yuzu-00fa09dc45936005b2c27d858ab70213c7e1482d.tar.gz
yuzu-00fa09dc45936005b2c27d858ab70213c7e1482d.tar.bz2
yuzu-00fa09dc45936005b2c27d858ab70213c7e1482d.tar.lz
yuzu-00fa09dc45936005b2c27d858ab70213c7e1482d.tar.xz
yuzu-00fa09dc45936005b2c27d858ab70213c7e1482d.tar.zst
yuzu-00fa09dc45936005b2c27d858ab70213c7e1482d.zip
-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
EmitCode(ctx, program);
const std::string version{fmt::format("#version 450{}\n", GlslVersionSpecifier(ctx))};
ctx.header.insert(0, version);
- if (program.local_memory_size > 0) {
- ctx.header += fmt::format("uint lmem[{}];", Common::AlignUp(program.local_memory_size, 4));
- }
if (program.shared_memory_size > 0) {
ctx.header +=
fmt::format("shared uint smem[{}];", Common::AlignUp(program.shared_memory_size, 4));
}
ctx.header += "void main(){\n";
+ if (program.local_memory_size > 0) {
+ ctx.header += fmt::format("uint lmem[{}];", Common::AlignUp(program.local_memory_size, 4));
+ }
DefineVariables(ctx, ctx.header);
if (ctx.uses_cc_carry) {
ctx.header += "uint carry;";