nir: use generated immediate comparison helpers

This makes the code a bit less verbose, so let's use the helpers.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23393>
This commit is contained in:
Erik Faye-Lund
2023-05-08 14:00:41 +02:00
committed by Marge Bot
parent 82465f1418
commit 6d142078bc
58 changed files with 143 additions and 153 deletions

View File

@@ -92,9 +92,9 @@ lower_bitmap(nir_shader *shader, nir_builder *b,
nir_builder_instr_insert(b, &tex->instr);
/* kill if tex != 0.0.. take .x or .w channel according to format: */
cond = nir_fneu(b, nir_channel(b, &tex->dest.ssa,
options->swizzle_xxxx ? 0 : 3),
nir_imm_floatN_t(b, 0.0, tex->dest.ssa.bit_size));
cond = nir_fneu_imm(b, nir_channel(b, &tex->dest.ssa,
options->swizzle_xxxx ? 0 : 3),
0.0);
nir_discard_if(b, cond);