Browse Source

shader: Mark blocks with no end branch as unreachable

nce_cpp
ReinUsesLisp 5 years ago
committed by ameerj
parent
commit
31835567f2
  1. 9
      src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp

9
src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp

@ -816,8 +816,13 @@ private:
throw NotImplementedException("Statement type {}", stmt.type);
}
}
if (current_block && continue_block) {
IR::IREmitter{*current_block}.Branch(continue_block);
if (current_block) {
IR::IREmitter ir{*current_block};
if (continue_block) {
ir.Branch(continue_block);
} else {
ir.Unreachable();
}
}
}

Loading…
Cancel
Save