mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 19:58:09 +02:00
nir: add nir_alu_instr float controls queries
These are helpful now that float_controls2 exists, these are common patterns worth factoring out into helpers. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30075>
This commit is contained in:
parent
43dadbd2fa
commit
d4c6fbc4a7
1 changed files with 24 additions and 0 deletions
|
|
@ -1625,6 +1625,30 @@ typedef struct nir_alu_instr {
|
||||||
nir_alu_src src[];
|
nir_alu_src src[];
|
||||||
} nir_alu_instr;
|
} nir_alu_instr;
|
||||||
|
|
||||||
|
static inline bool
|
||||||
|
nir_alu_instr_is_signed_zero_preserve(nir_alu_instr *alu)
|
||||||
|
{
|
||||||
|
return nir_is_float_control_signed_zero_preserve(alu->fp_fast_math, alu->def.bit_size);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline bool
|
||||||
|
nir_alu_instr_is_inf_preserve(nir_alu_instr *alu)
|
||||||
|
{
|
||||||
|
return nir_is_float_control_inf_preserve(alu->fp_fast_math, alu->def.bit_size);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline bool
|
||||||
|
nir_alu_instr_is_nan_preserve(nir_alu_instr *alu)
|
||||||
|
{
|
||||||
|
return nir_is_float_control_nan_preserve(alu->fp_fast_math, alu->def.bit_size);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline bool
|
||||||
|
nir_alu_instr_is_signed_zero_inf_nan_preserve(nir_alu_instr *alu)
|
||||||
|
{
|
||||||
|
return nir_is_float_control_signed_zero_inf_nan_preserve(alu->fp_fast_math, alu->def.bit_size);
|
||||||
|
}
|
||||||
|
|
||||||
void nir_alu_src_copy(nir_alu_src *dest, const nir_alu_src *src);
|
void nir_alu_src_copy(nir_alu_src *dest, const nir_alu_src *src);
|
||||||
|
|
||||||
nir_component_mask_t
|
nir_component_mask_t
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue