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 <cwabbott0@gmail.com>
This commit is contained in:
Jason Ekstrand
2018-11-07 13:43:40 -06:00
parent be98b1db38
commit dca6cd9ce6
20 changed files with 121 additions and 74 deletions

View File

@@ -963,6 +963,18 @@ nir_load_param(nir_builder *build, uint32_t param_idx)
#include "nir_builder_opcodes.h"
static inline nir_ssa_def *
nir_f2b(nir_builder *build, nir_ssa_def *f)
{
return nir_f2b32(build, f);
}
static inline nir_ssa_def *
nir_i2b(nir_builder *build, nir_ssa_def *i)
{
return nir_i2b32(build, i);
}
static inline nir_ssa_def *
nir_load_barycentric(nir_builder *build, nir_intrinsic_op op,
unsigned interp_mode)