diff options
| author | 2021-05-29 20:19:24 -0400 | |
|---|---|---|
| committer | 2021-07-22 21:51:36 -0400 | |
| commit | 80eec858678abeec988ca6390cb2e0636cfcdc98 (patch) | |
| tree | b7f864bc31f934a14d1d210124d5427d5c686336 /src/shader_recompiler/backend/glsl/emit_glsl.cpp | |
| parent | glsl: minor cleanup (diff) | |
| download | yuzu-80eec858678abeec988ca6390cb2e0636cfcdc98.tar.gz yuzu-80eec858678abeec988ca6390cb2e0636cfcdc98.tar.xz yuzu-80eec858678abeec988ca6390cb2e0636cfcdc98.zip | |
glsl: Fix GetAttribute return values
fixes font rendering issues as these were used to index into the ssbos
Diffstat (limited to 'src/shader_recompiler/backend/glsl/emit_glsl.cpp')
| -rw-r--r-- | src/shader_recompiler/backend/glsl/emit_glsl.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl.cpp b/src/shader_recompiler/backend/glsl/emit_glsl.cpp index 8705daeee..f9ad71f92 100644 --- a/src/shader_recompiler/backend/glsl/emit_glsl.cpp +++ b/src/shader_recompiler/backend/glsl/emit_glsl.cpp | |||
| @@ -83,7 +83,7 @@ void Invoke(EmitContext& ctx, IR::Inst* inst) { | |||
| 83 | } | 83 | } |
| 84 | 84 | ||
| 85 | void EmitInst(EmitContext& ctx, IR::Inst* inst) { | 85 | void EmitInst(EmitContext& ctx, IR::Inst* inst) { |
| 86 | // ctx.Add("/* {} */", inst->GetOpcode()); | 86 | // ctx.Add("/* $ {} $ */", inst->GetOpcode()); |
| 87 | switch (inst->GetOpcode()) { | 87 | switch (inst->GetOpcode()) { |
| 88 | #define OPCODE(name, result_type, ...) \ | 88 | #define OPCODE(name, result_type, ...) \ |
| 89 | case IR::Opcode::name: \ | 89 | case IR::Opcode::name: \ |
| @@ -183,11 +183,13 @@ std::string EmitGLSL(const Profile& profile, const RuntimeInfo& runtime_info, IR | |||
| 183 | for (size_t index = 0; index < ctx.reg_alloc.num_used_registers; ++index) { | 183 | for (size_t index = 0; index < ctx.reg_alloc.num_used_registers; ++index) { |
| 184 | ctx.header += fmt::format("{} R{};", ctx.reg_alloc.reg_types[index], index); | 184 | ctx.header += fmt::format("{} R{};", ctx.reg_alloc.reg_types[index], index); |
| 185 | } | 185 | } |
| 186 | // TODO: track usage | 186 | if (ctx.uses_cc_carry) { |
| 187 | ctx.header += "uint carry;"; | 187 | ctx.header += "uint carry;"; |
| 188 | } | ||
| 188 | if (program.info.uses_subgroup_shuffles) { | 189 | if (program.info.uses_subgroup_shuffles) { |
| 189 | ctx.header += "bool shfl_in_bounds;\n"; | 190 | ctx.header += "bool shfl_in_bounds;"; |
| 190 | } | 191 | } |
| 192 | ctx.header += "\n"; | ||
| 191 | ctx.code.insert(0, ctx.header); | 193 | ctx.code.insert(0, ctx.header); |
| 192 | ctx.code += "}"; | 194 | ctx.code += "}"; |
| 193 | // fmt::print("\n{}\n", ctx.code); | 195 | // fmt::print("\n{}\n", ctx.code); |