diff options
author | Jason Ekstrand <[email protected]> | 2016-02-13 17:14:27 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-03-24 15:20:44 -0700 |
commit | 18b01667493bd61c9c3eafd0848322b23da20efd (patch) | |
tree | f62fd3c3a5db67eb922115a16514fba42d90f42e | |
parent | 97b663481c8c83fda06246860708530cff755a05 (diff) |
nir/builder: Add a helper for inserting jump instructions
Reviewed-by: Jordan Justen <[email protected]>
-rw-r--r-- | src/compiler/nir/nir_builder.h | 7 |
1 files changed, 7 insertions, 0 deletions
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 */ |