intel/compiler: fix 16-bit comparisons
authorIago Toral Quiroga <itoral@igalia.com>
Thu, 19 Apr 2018 08:06:43 +0000 (10:06 +0200)
committerIago Toral Quiroga <itoral@igalia.com>
Thu, 3 May 2018 09:40:25 +0000 (11:40 +0200)
commit6318808a0559f7b2a8152592f0ae4e5ccc6953a9
tree3363647dc802d2ca5549ea990c2cb631617e3416
parentb11e9425df24f8c07a4cda85717407726f2d5330
intel/compiler: fix 16-bit comparisons

NIR assumes that booleans are always 32-bit, but Intel hardware produces
16-bit booleans for 16-bit comparisons. This means that we need to convert
the 16-bit result to 32-bit.

In the future we want to add an optimization pass to clean this up and
hopefully remove the conversions.

v2 (Jason): use the type of the source for the temporary and use
            brw_reg_type_from_bit_size for the conversion to 32-bit.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/compiler/brw_fs_nir.cpp