mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-12-18 08:46:10 +00:00
glsl: Declare local memory in main
This commit is contained in:
parent
f7352411f0
commit
00fa09dc45
|
@ -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;";
|
||||
|
|
Loading…
Reference in a new issue