diff options
Diffstat (limited to 'src/shader_recompiler/backend/glsl/emit_glsl.cpp')
| -rw-r--r-- | src/shader_recompiler/backend/glsl/emit_glsl.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl.cpp b/src/shader_recompiler/backend/glsl/emit_glsl.cpp index a8e53cf66..35dbe19ec 100644 --- a/src/shader_recompiler/backend/glsl/emit_glsl.cpp +++ b/src/shader_recompiler/backend/glsl/emit_glsl.cpp | |||
| @@ -113,7 +113,7 @@ void PrecolorInst(IR::Inst& phi) { | |||
| 113 | if (arg.IsImmediate()) { | 113 | if (arg.IsImmediate()) { |
| 114 | ir.PhiMove(phi, arg); | 114 | ir.PhiMove(phi, arg); |
| 115 | } else { | 115 | } else { |
| 116 | ir.PhiMove(phi, IR::Value{&RegAlloc::AliasInst(*arg.Inst())}); | 116 | ir.PhiMove(phi, IR::Value{&*arg.InstRecursive()}); |
| 117 | } | 117 | } |
| 118 | } | 118 | } |
| 119 | for (size_t i = 0; i < num_args; ++i) { | 119 | for (size_t i = 0; i < num_args; ++i) { |
| @@ -157,7 +157,7 @@ void EmitCode(EmitContext& ctx, const IR::Program& program) { | |||
| 157 | break; | 157 | break; |
| 158 | case IR::AbstractSyntaxNode::Type::Return: | 158 | case IR::AbstractSyntaxNode::Type::Return: |
| 159 | case IR::AbstractSyntaxNode::Type::Unreachable: | 159 | case IR::AbstractSyntaxNode::Type::Unreachable: |
| 160 | ctx.Add("return;\n}}"); | 160 | ctx.Add("return;"); |
| 161 | break; | 161 | break; |
| 162 | case IR::AbstractSyntaxNode::Type::Loop: | 162 | case IR::AbstractSyntaxNode::Type::Loop: |
| 163 | case IR::AbstractSyntaxNode::Type::Repeat: | 163 | case IR::AbstractSyntaxNode::Type::Repeat: |
| @@ -175,6 +175,8 @@ std::string EmitGLSL(const Profile& profile, const RuntimeInfo&, IR::Program& pr | |||
| 175 | EmitContext ctx{program, bindings, profile}; | 175 | EmitContext ctx{program, bindings, profile}; |
| 176 | Precolor(program); | 176 | Precolor(program); |
| 177 | EmitCode(ctx, program); | 177 | EmitCode(ctx, program); |
| 178 | ctx.code += "}"; | ||
| 179 | fmt::print("\n{}\n", ctx.code); | ||
| 178 | return ctx.code; | 180 | return ctx.code; |
| 179 | } | 181 | } |
| 180 | 182 | ||