summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/backend/glsl/emit_glsl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/shader_recompiler/backend/glsl/emit_glsl.cpp')
-rw-r--r--src/shader_recompiler/backend/glsl/emit_glsl.cpp10
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
85void EmitInst(EmitContext& ctx, IR::Inst* inst) { 85void 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);