From 18b01667493bd61c9c3eafd0848322b23da20efd Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Sat, 13 Feb 2016 17:14:27 -0800 Subject: [PATCH] nir/builder: Add a helper for inserting jump instructions Reviewed-by: Jordan Justen --- src/compiler/nir/nir_builder.h | 7 +++++++ 1 file changed, 7 insertions(+) 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 */ -- 2.30.2