nir/builder: Add a nir_jump helper
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 29 Dec 2015 22:48:34 +0000 (14:48 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 29 Dec 2015 22:48:34 +0000 (14:48 -0800)
src/glsl/nir/nir_builder.h
src/glsl/nir/spirv/vtn_cfg.c

index 8ba48589aa6a5581126f2476a503550cf6600b23..985f4af5339589d0732327499531fb44ebbf9576 100644 (file)
@@ -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 */
index 7d25e96c8f0f101843a76fe5966484f05b84f756..03d2c43018dffe90770ad261a562c57d9c2bafa3 100644 (file)
@@ -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)