nir: enforce 32-bit src type requirement for f2fmp and i2imp

Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6283>
This commit is contained in:
Marek Olšák
2020-09-04 02:07:43 -04:00
committed by Marge Bot
parent 3d3df8dbff
commit 385b4dbc39

View File

@@ -272,10 +272,9 @@ for src_t in [tint, tuint, tfloat, tbool]:
# to remove it if the result is immediately converted back to 32 bits again. # to remove it if the result is immediately converted back to 32 bits again.
# This is generated as part of the precision lowering pass. mp stands for medium # This is generated as part of the precision lowering pass. mp stands for medium
# precision. # precision.
unop_numeric_convert("f2fmp", tfloat16, tfloat, opcodes["f2f16"].const_expr) unop_numeric_convert("f2fmp", tfloat16, tfloat32, opcodes["f2f16"].const_expr)
unop_numeric_convert("i2imp", tint16, tint, opcodes["i2i16"].const_expr) unop_numeric_convert("i2imp", tint16, tint32, opcodes["i2i16"].const_expr)
# u2ump isn't defined, because the behavior is equal to i2imp if src has more # u2ump isn't defined, because the behavior is equal to i2imp
# than 16 bits.
# Unary floating-point rounding operations. # Unary floating-point rounding operations.