From dca6cd9ce65100896976e913bf72c2c68ea4e1a7 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 7 Nov 2018 13:43:40 -0600 Subject: nir: Make boolean conversions sized just like the others Instead of a single i2b and b2i, we now have i2b32 and b2iN where N is one if 8, 16, 32, or 64. This leads to having a few more opcodes but now everything is consistent and booleans aren't a weird special case anymore. Reviewed-by: Connor Abbott --- src/mesa/program/prog_to_nir.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mesa/program/prog_to_nir.c') diff --git a/src/mesa/program/prog_to_nir.c b/src/mesa/program/prog_to_nir.c index 47103306ad4..ee7d7d8f6d2 100644 --- a/src/mesa/program/prog_to_nir.c +++ b/src/mesa/program/prog_to_nir.c @@ -393,7 +393,7 @@ static void ptn_slt(nir_builder *b, nir_alu_dest dest, nir_ssa_def **src) { if (b->shader->options->native_integers) { - ptn_move_dest(b, dest, nir_b2f(b, nir_flt(b, src[0], src[1]))); + ptn_move_dest(b, dest, nir_b2f32(b, nir_flt(b, src[0], src[1]))); } else { ptn_move_dest(b, dest, nir_slt(b, src[0], src[1])); } @@ -406,7 +406,7 @@ static void ptn_sge(nir_builder *b, nir_alu_dest dest, nir_ssa_def **src) { if (b->shader->options->native_integers) { - ptn_move_dest(b, dest, nir_b2f(b, nir_fge(b, src[0], src[1]))); + ptn_move_dest(b, dest, nir_b2f32(b, nir_fge(b, src[0], src[1]))); } else { ptn_move_dest(b, dest, nir_sge(b, src[0], src[1])); } -- cgit v1.2.3