gallium: Add support for ir_unop_f2u to tgsi backend.
authorPaul Berry <stereotype441@gmail.com>
Wed, 13 Jun 2012 22:50:06 +0000 (15:50 -0700)
committerPaul Berry <stereotype441@gmail.com>
Fri, 15 Jun 2012 15:58:55 +0000 (08:58 -0700)
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/state_tracker/st_glsl_to_tgsi.cpp

index 347a22f19cb6e4e206765edaa6dfc7f2707e9767..5802b52b7493c4c87ffbc3c8714417b786fdf22f 100644 (file)
@@ -1762,6 +1762,12 @@ glsl_to_tgsi_visitor::visit(ir_expression *ir)
       else
          emit(ir, TGSI_OPCODE_TRUNC, result_dst, op[0]);
       break;
+   case ir_unop_f2u:
+      if (native_integers)
+         emit(ir, TGSI_OPCODE_F2U, result_dst, op[0]);
+      else
+         emit(ir, TGSI_OPCODE_TRUNC, result_dst, op[0]);
+      break;
    case ir_unop_bitcast_f2i:
    case ir_unop_bitcast_f2u:
    case ir_unop_bitcast_i2f: