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

@@ -274,7 +274,7 @@ nir_create_passthrough_gs(const nir_shader_compiler_options *options,
nir_emit_vertex(&b, 0);
if (emulate_edgeflags) {
nir_ssa_def *edge_value = nir_channel(&b, nir_load_array_var_imm(&b, edge_var, idx), 0);
nir_if *edge_if = nir_push_if(&b, nir_fneu(&b, edge_value, nir_imm_float(&b, 1.0)));
nir_if *edge_if = nir_push_if(&b, nir_fneu_imm(&b, edge_value, 1.0));
nir_end_primitive(&b, 0);
nir_pop_if(&b, edge_if);
}