nir/tgsi: Use nir_bany in ttn_kill_if
authorJason Ekstrand <jason.ekstrand@intel.com>
Sat, 15 Dec 2018 18:29:32 +0000 (12:29 -0600)
committerJason Ekstrand <jason@jlekstrand.net>
Sun, 16 Dec 2018 21:03:02 +0000 (21:03 +0000)
Reviewed-by: Eric Anholt <eric@anholt.net>
src/gallium/auxiliary/nir/tgsi_to_nir.c

index 0ad274b..5524437 100644 (file)
@@ -938,9 +938,7 @@ ttn_kill(nir_builder *b, nir_op op, nir_alu_dest dest, nir_ssa_def **src)
 static void
 ttn_kill_if(nir_builder *b, nir_op op, nir_alu_dest dest, nir_ssa_def **src)
 {
-   nir_ssa_def *cmp = nir_bany_inequal4(b, nir_flt(b, src[0],
-                                                   nir_imm_float(b, 0.0)),
-                                        nir_imm_int(b, 0));
+   nir_ssa_def *cmp = nir_bany(b, nir_flt(b, src[0], nir_imm_float(b, 0.0)));
    nir_intrinsic_instr *discard =
       nir_intrinsic_instr_create(b->shader, nir_intrinsic_discard_if);
    discard->src[0] = nir_src_for_ssa(cmp);