nir: add and use nir_imod_imm

Just a short-hand, really. Makes the code a bit easier to read.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23461>
This commit is contained in:
Erik Faye-Lund
2023-06-05 15:31:47 +02:00
committed by Marge Bot
parent e1f4c79288
commit 3a64e3425f
7 changed files with 16 additions and 10 deletions
+1 -1
View File
@@ -493,7 +493,7 @@ check_for_weird_packing(nir_builder *b, struct pbo_shader_data *sd, unsigned com
nir_ige_imm(b, sd->channels, component),
nir_ior(b,
nir_ine(b, c, sd->bits1),
nir_ine_imm(b, nir_imod(b, c, nir_imm_int(b, 8)), 0)),
nir_ine_imm(b, nir_imod_imm(b, c, 8), 0)),
nir_imm_false(b));
}