i965/fs: Handle 32-bit to 16-bit conversions
authorAlejandro Piñeiro <apinheiro@igalia.com>
Sat, 1 Jul 2017 06:11:05 +0000 (08:11 +0200)
committerJose Maria Casanova Crespo <jmcasanova@igalia.com>
Wed, 6 Dec 2017 07:57:18 +0000 (08:57 +0100)
commit5d5ee507fb4a385f98ba19bd901ce4e3aca7def4
treec892918d59c31bcba2e02868de6d61bbc976d539
parenta05b6f25bf4bfad7bb56d20aca0d2424607f9004
i965/fs: Handle 32-bit to 16-bit conversions

Conversions to 16-bit need having aligment between the 16-bit
and 32-bit types. So the conversion operations unpack 16-bit types
to with an stride=2 and then applies a MOV with the conversion.

v2 (Jason Ekstrand):
  - Avoid the general use of stride=2 for 16-bit register types.

v3 (Topi Pohjolainen)
  - Code style fix
   (Jason Ekstrand)
  - Now nir_op_f2f16 was renamed to nir_op_f2f16_undef
    because conversion to f16 with undefined rounding is explicit

Signed-off-by: Eduardo Lima <elima@igalia.com>
Signed-off-by: Alejandro Piñeiro <apinheiro@igalia.com>
Signed-off-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/compiler/brw_fs_nir.cpp