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

@@ -123,7 +123,7 @@ build_view_index(struct lower_multiview_state *state)
nir_ssa_def *shifted_high =
nir_ushr(b, nir_imm_int(b, remap >> 32),
nir_isub(b, shift, nir_imm_int(b, 32)));
shifted = nir_bcsel(b, nir_ilt(b, shift, nir_imm_int(b, 32)),
shifted = nir_bcsel(b, nir_ilt_imm(b, shift, 32),
shifted_low, shifted_high);
}
state->view_index = nir_iand(b, shifted, nir_imm_int(b, 0xf));