nir: add nir_type_conversion_op()
authorSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Wed, 7 Dec 2016 07:34:42 +0000 (08:34 +0100)
committerSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Mon, 9 Jan 2017 08:10:13 +0000 (09:10 +0100)
commit27cf6a369fcec15a9f65837507f57dbd8bdfaaaa
treeb77a86495b85fe83f02bb7a9e9dd504f90738637
parent3a571fcc43e70731417f0b81cbce4b0a0c1be71d
nir: add nir_type_conversion_op()

This function returns the nir_op corresponding to the conversion between
the given nir_alu_type arguments.

This function lacks support for integer-based types with bit_size != 32
and for float16 conversion ops.

v2:
- Improve readiness of the code and delete cases that don't happen now (Jason)

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/nir/nir.c
src/compiler/nir/nir.h