mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 12:18:09 +02:00
i965/fs: Implement new ir_unop_u2i and ir_unop_i2u opcodes.
No MOV is necessary since signed/unsigned integers share the same bit-representation; it's simply a question of interpretation. In particular, the fs_reg::imm union shouldn't need updating. 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:
parent
006d5a1aa4
commit
b633ddeb9f
2 changed files with 10 additions and 0 deletions
|
|
@ -191,6 +191,8 @@ ir_channel_expressions_visitor::visit_leave(ir_assignment *ir)
|
|||
case ir_unop_log:
|
||||
case ir_unop_exp2:
|
||||
case ir_unop_log2:
|
||||
case ir_unop_i2u:
|
||||
case ir_unop_u2i:
|
||||
case ir_unop_f2i:
|
||||
case ir_unop_i2f:
|
||||
case ir_unop_f2b:
|
||||
|
|
|
|||
|
|
@ -349,6 +349,14 @@ fs_visitor::visit(ir_expression *ir)
|
|||
emit_math(FS_OPCODE_RSQ, this->result, op[0]);
|
||||
break;
|
||||
|
||||
case ir_unop_i2u:
|
||||
op[0].type = BRW_REGISTER_TYPE_UD;
|
||||
this->result = op[0];
|
||||
break;
|
||||
case ir_unop_u2i:
|
||||
op[0].type = BRW_REGISTER_TYPE_D;
|
||||
this->result = op[0];
|
||||
break;
|
||||
case ir_unop_i2f:
|
||||
case ir_unop_b2f:
|
||||
case ir_unop_b2i:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue