nir: Populate conversion opcodes to 16-bit types
authorEduardo Lima Mitev <elima@igalia.com>
Sat, 1 Jul 2017 06:01:21 +0000 (08:01 +0200)
committerJose Maria Casanova Crespo <jmcasanova@igalia.com>
Wed, 6 Dec 2017 07:57:18 +0000 (08:57 +0100)
This will include the following NIR ALU opcodes:
 * nir_op_i2i16
 * nir_op_i2f16
 * nir_op_u2u16
 * nir_op_u2f16
 * nir_op_f2i16
 * nir_op_f2u16
 * nir_op_f2f16

v2: Remove "from" 16-bit in commit subject (Topi Pohjolainen)

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/nir/nir_opcodes_c.py

index a1db54f05a8228ec1f4b71e7cbd1d2a761868952..02bb4738ed871190f1970b94c0f0395f323a9e52 100644 (file)
@@ -62,7 +62,7 @@ nir_type_conversion_op(nir_alu_type src, nir_alu_type dst)
 %                 endif
 %              endif
                switch (dst_bit_size) {
-%                 for dst_bits in [32, 64]:
+%                 for dst_bits in [16, 32, 64]:
                   case ${dst_bits}:
                      return ${'nir_op_{0}2{1}{2}'.format(src_t[0], dst_t[0], dst_bits)};
 %                 endfor