summaryrefslogtreecommitdiffstats
path: root/src/mesa/program
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2018-11-07 13:43:40 -0600
committerJason Ekstrand <[email protected]>2018-12-05 15:03:07 -0600
commitdca6cd9ce65100896976e913bf72c2c68ea4e1a7 (patch)
tree069181199b9b4f00d8c44f1ae507412c28ccc81f /src/mesa/program
parentbe98b1db3899121f2d0cea009ef6430b13589032 (diff)
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 <[email protected]>
Diffstat (limited to 'src/mesa/program')
-rw-r--r--src/mesa/program/prog_to_nir.c4
1 files changed, 2 insertions, 2 deletions
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]));
}