mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
nir: add more build helpers
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com> Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28845>
This commit is contained in:
parent
1632948a76
commit
fcb627945b
1 changed files with 12 additions and 0 deletions
|
|
@ -919,6 +919,18 @@ nir_imin_imm(nir_builder *build, nir_def *x, int64_t y)
|
|||
return nir_imin(build, x, nir_imm_intN_t(build, y, x->bit_size));
|
||||
}
|
||||
|
||||
static inline nir_def *
|
||||
nir_umax_imm(nir_builder *build, nir_def *x, uint64_t y)
|
||||
{
|
||||
return nir_umax(build, x, nir_imm_intN_t(build, y, x->bit_size));
|
||||
}
|
||||
|
||||
static inline nir_def *
|
||||
nir_umin_imm(nir_builder *build, nir_def *x, uint64_t y)
|
||||
{
|
||||
return nir_umin(build, x, nir_imm_intN_t(build, y, x->bit_size));
|
||||
}
|
||||
|
||||
static inline nir_def *
|
||||
_nir_mul_imm(nir_builder *build, nir_def *x, uint64_t y, bool amul)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue