summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_builder.h
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2016-02-13 17:14:27 -0800
committerJason Ekstrand <jason.ekstrand@intel.com>2016-03-24 15:20:44 -0700
commit18b01667493bd61c9c3eafd0848322b23da20efd (patch)
treef62fd3c3a5db67eb922115a16514fba42d90f42e /src/compiler/nir/nir_builder.h
parent97b663481c8c83fda06246860708530cff755a05 (diff)
downloadexternal_mesa3d-18b01667493bd61c9c3eafd0848322b23da20efd.zip
external_mesa3d-18b01667493bd61c9c3eafd0848322b23da20efd.tar.gz
external_mesa3d-18b01667493bd61c9c3eafd0848322b23da20efd.tar.bz2
nir/builder: Add a helper for inserting jump instructions
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Diffstat (limited to 'src/compiler/nir/nir_builder.h')
-rw-r--r--src/compiler/nir/nir_builder.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_builder.h b/src/compiler/nir/nir_builder.h
index 64d7b43..de5b6ce 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 */