mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 02:40:11 +01:00
nir: Add a ssa_dest_init_for_type helper
This would be useful a number of places Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
This commit is contained in:
parent
28da82f978
commit
ad127afcfd
1 changed files with 9 additions and 0 deletions
|
|
@ -2228,6 +2228,15 @@ void nir_ssa_dest_init(nir_instr *instr, nir_dest *dest,
|
|||
void nir_ssa_def_init(nir_instr *instr, nir_ssa_def *def,
|
||||
unsigned num_components, unsigned bit_size,
|
||||
const char *name);
|
||||
static inline void
|
||||
nir_ssa_dest_init_for_type(nir_instr *instr, nir_dest *dest,
|
||||
const struct glsl_type *type,
|
||||
const char *name)
|
||||
{
|
||||
assert(glsl_type_is_vector_or_scalar(type));
|
||||
nir_ssa_dest_init(instr, dest, glsl_get_components(type),
|
||||
glsl_get_bit_size(type), name);
|
||||
}
|
||||
void nir_ssa_def_rewrite_uses(nir_ssa_def *def, nir_src new_src);
|
||||
void nir_ssa_def_rewrite_uses_after(nir_ssa_def *def, nir_src new_src,
|
||||
nir_instr *after_me);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue