From 6fa47c9c175498edd1bfda4f58e95fed48f1c50d Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Tue, 29 Dec 2015 14:48:34 -0800 Subject: [PATCH] nir/builder: Add a nir_jump helper --- src/glsl/nir/nir_builder.h | 7 +++++++ src/glsl/nir/spirv/vtn_cfg.c | 8 -------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/glsl/nir/nir_builder.h b/src/glsl/nir/nir_builder.h index 8ba48589aa6..985f4af5339 100644 --- a/src/glsl/nir/nir_builder.h +++ b/src/glsl/nir/nir_builder.h @@ -401,4 +401,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 */ diff --git a/src/glsl/nir/spirv/vtn_cfg.c b/src/glsl/nir/spirv/vtn_cfg.c index 7d25e96c8f0..03d2c43018d 100644 --- a/src/glsl/nir/spirv/vtn_cfg.c +++ b/src/glsl/nir/spirv/vtn_cfg.c @@ -450,14 +450,6 @@ vtn_build_cfg(struct vtn_builder *b, const uint32_t *words, const uint32_t *end) } } -/* XXX: This should go in nir_builder.h */ -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); -} - static void vtn_emit_branch(struct vtn_builder *b, enum vtn_branch_type branch_type, nir_variable *switch_fall_var, bool *has_switch_break) -- 2.30.2