From 330e28155f79b533a72fc3376fb54ffbf245b458 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 2 Aug 2021 20:38:27 +1000 Subject: [PATCH] nir: add 32-bit bool of fisfinite Add the bool lowering as well. Reviewed-by: Jesse Natalie Part-of: --- src/compiler/nir/nir_lower_bool_to_int32.c | 2 ++ src/compiler/nir/nir_opcodes.py | 1 + 2 files changed, 3 insertions(+) diff --git a/src/compiler/nir/nir_lower_bool_to_int32.c b/src/compiler/nir/nir_lower_bool_to_int32.c index 7be54fb7185..c1afed492b8 100644 --- a/src/compiler/nir/nir_lower_bool_to_int32.c +++ b/src/compiler/nir/nir_lower_bool_to_int32.c @@ -103,6 +103,8 @@ lower_alu_instr(nir_alu_instr *alu) case nir_op_bcsel: alu->op = nir_op_b32csel; break; + case nir_op_fisfinite: alu->op = nir_op_fisfinite32; break; + default: assert(alu->dest.dest.ssa.bit_size > 1); for (unsigned i = 0; i < op_info->num_inputs; i++) diff --git a/src/compiler/nir/nir_opcodes.py b/src/compiler/nir/nir_opcodes.py index aa5f3914a81..e37419c9b8c 100644 --- a/src/compiler/nir/nir_opcodes.py +++ b/src/compiler/nir/nir_opcodes.py @@ -1245,6 +1245,7 @@ binop("umul24_relaxed", tuint32, _2src_commutative + associative, "src0 * src1") unop_convert("fisnormal", tbool1, tfloat, "isnormal(src0)") unop_convert("fisfinite", tbool1, tfloat, "isfinite(src0)") +unop_convert("fisfinite32", tint32, tfloat, "isfinite(src0)") # vc4-specific opcodes