nir: Add nir_ssa_scalar_is_undef.

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18183>
This commit is contained in:
Georg Lehmann
2022-08-22 16:32:36 +02:00
committed by Marge Bot
parent cfaff1d341
commit 8eac45b274
3 changed files with 10 additions and 4 deletions
+6
View File
@@ -2544,6 +2544,12 @@ nir_ssa_scalar_is_const(nir_ssa_scalar s)
return s.def->parent_instr->type == nir_instr_type_load_const;
}
static inline bool
nir_ssa_scalar_is_undef(nir_ssa_scalar s)
{
return s.def->parent_instr->type == nir_instr_type_ssa_undef;
}
static inline nir_const_value
nir_ssa_scalar_as_const_value(nir_ssa_scalar s)
{