mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 21:50:12 +01:00
nir: add support for d2f and f2d
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
parent
fab5d4cd95
commit
a4bce07dc6
2 changed files with 5 additions and 0 deletions
|
|
@ -1356,6 +1356,8 @@ nir_visitor::visit(ir_expression *ir)
|
|||
case ir_unop_f2b: result = nir_f2b(&b, srcs[0]); break;
|
||||
case ir_unop_i2b: result = nir_i2b(&b, srcs[0]); break;
|
||||
case ir_unop_b2i: result = nir_b2i(&b, srcs[0]); break;
|
||||
case ir_unop_d2f: result = nir_d2f(&b, srcs[0]); break;
|
||||
case ir_unop_f2d: result = nir_f2d(&b, srcs[0]); break;
|
||||
case ir_unop_i2u:
|
||||
case ir_unop_u2i:
|
||||
case ir_unop_bitcast_i2f:
|
||||
|
|
|
|||
|
|
@ -170,6 +170,9 @@ unop_convert("b2f", tfloat32, tbool, "src0 ? 1.0f : 0.0f")
|
|||
unop_convert("i2b", tbool, tint32, "src0 != 0")
|
||||
unop_convert("b2i", tint32, tbool, "src0 ? 1 : 0") # Boolean-to-int conversion
|
||||
unop_convert("u2f", tfloat32, tuint32, "src0") # Unsigned-to-float conversion.
|
||||
# double-to-float conversion
|
||||
unop_convert("d2f", tfloat32, tfloat64, "src0") # Single to double precision
|
||||
unop_convert("f2d", tfloat64, tfloat32, "src0") # Double to single precision
|
||||
|
||||
# Unary floating-point rounding operations.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue