glsl: Bitwise conversion operator support in the software renderers.

TGSI doesn't need an opcode, since registers are untyped (but beware
once doubles come into the scene).  Mesa IR doesn't handle native
integers, so trying to handle them there is worthless, the case
entries are only added for warning reasons.

It was only tested with softpipe, since llvmpipe doesn't support glsl
1.3 yet.

Signed-off-by: Olivier Galibert <galibert@pobox.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Olivier Galibert
2012-05-08 20:40:36 +02:00
committed by Kenneth Graunke
parent abe9767553
commit e16b0a51be
2 changed files with 11 additions and 0 deletions

View File

@@ -1407,6 +1407,11 @@ ir_to_mesa_visitor::visit(ir_expression *ir)
emit(ir, OPCODE_SNE, result_dst,
op[0], src_reg_for_float(0.0));
break;
case ir_unop_bitcast_f2i: // Ignore these 4, they can't happen here anyway
case ir_unop_bitcast_f2u:
case ir_unop_bitcast_i2f:
case ir_unop_bitcast_u2f:
break;
case ir_unop_trunc:
emit(ir, OPCODE_TRUNC, result_dst, op[0]);
break;