glsl: Add ir_unop_i2u and ir_unop_u2i operations.
These are necessary to handle int/uint constructor conversions. For example, the following code currently results in a type mismatch: int x = 7; uint y = uint(x); In particular, uint(x) still has type int. This commit simply adds the new operations; it does not generate them, nor does it add backend support for them. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:

committed by
Kenneth Graunke

parent
4f799e6142
commit
20ef96c7ff
@@ -789,6 +789,8 @@ enum ir_expression_operation {
|
||||
ir_unop_i2b, /**< int-to-boolean conversion */
|
||||
ir_unop_b2i, /**< Boolean-to-int conversion */
|
||||
ir_unop_u2f, /**< Unsigned-to-float conversion. */
|
||||
ir_unop_i2u, /**< Integer-to-unsigned conversion. */
|
||||
ir_unop_u2i, /**< Unsigned-to-integer conversion. */
|
||||
ir_unop_any,
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user