nir/lower_int_to_float: Add support for i32csel opcodes

These lower naturally to the corresponding fcsel opcodes.

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20162>
This commit is contained in:
Ian Romanick 2022-06-14 21:50:14 -07:00 committed by Marge Bot
parent 451df66ea0
commit 70b25d9fe8

View file

@ -178,6 +178,9 @@ lower_alu_instr(nir_builder *b, nir_alu_instr *alu)
case nir_op_bany_inequal3: alu->op = nir_op_bany_fnequal3; break;
case nir_op_bany_inequal4: alu->op = nir_op_bany_fnequal4; break;
case nir_op_i32csel_gt: alu->op = nir_op_fcsel_gt; break;
case nir_op_i32csel_ge: alu->op = nir_op_fcsel_ge; break;
default:
assert(nir_alu_type_get_base_type(info->output_type) != nir_type_int &&
nir_alu_type_get_base_type(info->output_type) != nir_type_uint);