Browse Source

emit_spirv: Jump to loop body with local variable

Silence unused variable warning
ReinUsesLisp 5 years ago
parent
commit
38e7b8c805
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/shader_recompiler/backend/spirv/emit_spirv.cpp

+ 1 - 1
src/shader_recompiler/backend/spirv/emit_spirv.cpp

@@ -136,7 +136,7 @@ void Traverse(EmitContext& ctx, IR::Program& program) {
             const Id endloop_label{node.loop.merge->Definition<Id>()};
             const Id endloop_label{node.loop.merge->Definition<Id>()};
 
 
             ctx.OpLoopMerge(endloop_label, continue_label, spv::LoopControlMask::MaskNone);
             ctx.OpLoopMerge(endloop_label, continue_label, spv::LoopControlMask::MaskNone);
-            ctx.OpBranch(node.loop.body->Definition<Id>());
+            ctx.OpBranch(body_label);
             break;
             break;
         }
         }
         case IR::AbstractSyntaxNode::Type::Break: {
         case IR::AbstractSyntaxNode::Type::Break: {