diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/shader_recompiler/backend/glsl/emit_glsl.cpp | 6 |
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 46d72963d..ffdc6dbba 100644 --- a/src/shader_recompiler/backend/glsl/emit_glsl.cpp +++ b/src/shader_recompiler/backend/glsl/emit_glsl.cpp | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | #include <ranges> | 5 | #include <ranges> |
| 6 | #include <string> | 6 | #include <string> |
| 7 | 7 | ||
| 8 | #include "common/alignment.h" | 8 | #include "common/div_ceil.h" |
| 9 | #include "common/settings.h" | 9 | #include "common/settings.h" |
| 10 | #include "shader_recompiler/backend/glsl/emit_context.h" | 10 | #include "shader_recompiler/backend/glsl/emit_context.h" |
| 11 | #include "shader_recompiler/backend/glsl/emit_glsl.h" | 11 | #include "shader_recompiler/backend/glsl/emit_glsl.h" |
| @@ -219,11 +219,11 @@ std::string EmitGLSL(const Profile& profile, const RuntimeInfo& runtime_info, IR | |||
| 219 | ctx.header.insert(0, version); | 219 | ctx.header.insert(0, version); |
| 220 | if (program.shared_memory_size > 0) { | 220 | if (program.shared_memory_size > 0) { |
| 221 | ctx.header += | 221 | ctx.header += |
| 222 | fmt::format("shared uint smem[{}];", Common::AlignUp(program.shared_memory_size, 4)); | 222 | fmt::format("shared uint smem[{}];", Common::DivCeil(program.shared_memory_size, 4U)); |
| 223 | } | 223 | } |
| 224 | ctx.header += "void main(){\n"; | 224 | ctx.header += "void main(){\n"; |
| 225 | if (program.local_memory_size > 0) { | 225 | if (program.local_memory_size > 0) { |
| 226 | ctx.header += fmt::format("uint lmem[{}];", Common::AlignUp(program.local_memory_size, 4)); | 226 | ctx.header += fmt::format("uint lmem[{}];", Common::DivCeil(program.local_memory_size, 4U)); |
| 227 | } | 227 | } |
| 228 | DefineVariables(ctx, ctx.header); | 228 | DefineVariables(ctx, ctx.header); |
| 229 | if (ctx.uses_cc_carry) { | 229 | if (ctx.uses_cc_carry) { |