diff options
| author | 2021-05-26 21:18:17 -0400 | |
|---|---|---|
| committer | 2021-07-22 21:51:36 -0400 | |
| commit | d171083d53e106c8c5131522fdc81d51360c562d (patch) | |
| tree | 282cbd1306616e969166e9ddc926bc51c1c15803 /src/shader_recompiler/backend/glsl/emit_glsl.cpp | |
| parent | glsl: Implement some attribute getters and setters (diff) | |
| download | yuzu-d171083d53e106c8c5131522fdc81d51360c562d.tar.gz yuzu-d171083d53e106c8c5131522fdc81d51360c562d.tar.xz yuzu-d171083d53e106c8c5131522fdc81d51360c562d.zip | |
glsl: textures wip
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 | ||