diff options
author | Karol Herbst <[email protected]> | 2018-04-21 17:27:17 +0200 |
---|---|---|
committer | Karol Herbst <[email protected]> | 2018-04-26 11:16:15 +0200 |
commit | 543a8c66a70cf8e154d2162685e15dfa413b0bde (patch) | |
tree | 630cf1ca150a1adf56d3eec9c6f66edefd7ce166 /src | |
parent | c4ab1bdcc9710e3c7cc7115d3be9c69b7e7712ef (diff) |
nir: support converting to 8-bit integers in nir_type_conversion_op
Signed-off-by: Karol Herbst <[email protected]>
Reviewed-by: Jose Maria Casanova Crespo <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/nir/nir_opcodes_c.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/compiler/nir/nir_opcodes_c.py b/src/compiler/nir/nir_opcodes_c.py index c19185534af..8afccca9504 100644 --- a/src/compiler/nir/nir_opcodes_c.py +++ b/src/compiler/nir/nir_opcodes_c.py @@ -62,7 +62,12 @@ nir_type_conversion_op(nir_alu_type src, nir_alu_type dst, nir_rounding_mode rnd % endif % endif switch (dst_bit_size) { -% for dst_bits in [16, 32, 64]: +% if dst_t == 'float': +<% bit_sizes = [16, 32, 64] %> +% else: +<% bit_sizes = [8, 16, 32, 64] %> +% endif +% for dst_bits in bit_sizes: case ${dst_bits}: % if src_t == 'float' and dst_t == 'float' and dst_bits == 16: switch(rnd) { |