From: Jason Ekstrand Date: Sun, 14 Feb 2016 01:14:27 +0000 (-0800) Subject: nir/builder: Add a helper for inserting jump instructions X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=18b01667493bd61c9c3eafd0848322b23da20efd;p=mesa.git nir/builder: Add a helper for inserting jump instructions Reviewed-by: Jordan Justen --- diff --git a/src/compiler/nir/nir_builder.h b/src/compiler/nir/nir_builder.h index 64d7b43aa58..de5b6cee581 100644 --- a/src/compiler/nir/nir_builder.h +++ b/src/compiler/nir/nir_builder.h @@ -393,4 +393,11 @@ nir_load_system_value(nir_builder *build, nir_intrinsic_op op, int index) return &load->dest.ssa; } +static inline void +nir_jump(nir_builder *build, nir_jump_type jump_type) +{ + nir_jump_instr *jump = nir_jump_instr_create(build->shader, jump_type); + nir_builder_instr_insert(build, &jump->instr); +} + #endif /* NIR_BUILDER_H */