tgsi: fix operand type of TGSI_OPCODE_NOT
authorChia-I Wu <olvaffe@gmail.com>
Sat, 4 May 2013 10:06:39 +0000 (18:06 +0800)
committerChia-I Wu <olvaffe@gmail.com>
Wed, 8 May 2013 03:03:49 +0000 (11:03 +0800)
It should be TGSI_TYPE_UNSIGNED, not TGSI_TYPE_FLOAT.

Fixed also gallivm not_emit_cpu() to use uint build context.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Acked-by: Roland Scheidegger <sroland@vmware.com>
src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c
src/gallium/auxiliary/tgsi/tgsi_info.c

index dc7c090ac7cd54afdbcafe13ea427cb08a6cc311..1feaa19387a7e22a1c87c88ca99741bb835cb1e0 100644 (file)
@@ -1314,7 +1314,7 @@ not_emit_cpu(
    struct lp_build_tgsi_context * bld_base,
    struct lp_build_emit_data * emit_data)
 {
-   emit_data->output[emit_data->chan] = lp_build_not(&bld_base->base,
+   emit_data->output[emit_data->chan] = lp_build_not(&bld_base->uint_bld,
                                                      emit_data->args[0]);
 }
 
index 90bb4976cbc8948a2021ee964828701b117c48c3..99b1c665d8ea01aec3084a4791f876e4c70f7dc9 100644 (file)
@@ -276,6 +276,7 @@ tgsi_opcode_infer_type( uint opcode )
    case TGSI_OPCODE_MOV:
    case TGSI_OPCODE_UCMP:
       return TGSI_TYPE_UNTYPED;
+   case TGSI_OPCODE_NOT:
    case TGSI_OPCODE_SHL:
    case TGSI_OPCODE_AND:
    case TGSI_OPCODE_OR: