Mesa (master): tgsi: fix operand type of TGSI_OPCODE_NOT

Chia-I Wu olv at kemper.freedesktop.org
Wed May 8 03:06:15 UTC 2013


Module: Mesa
Branch: master
Commit: 75a48a53d80706b3e6d1309c81be5c1585a92302
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=75a48a53d80706b3e6d1309c81be5c1585a92302

Author: Chia-I Wu <olvaffe at gmail.com>
Date:   Sat May  4 18:06:39 2013 +0800

tgsi: fix operand type of TGSI_OPCODE_NOT

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 at gmail.com>
Acked-by: Roland Scheidegger <sroland at vmware.com>

---

 src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c |    2 +-
 src/gallium/auxiliary/tgsi/tgsi_info.c             |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c
index dc7c090..1feaa19 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c
@@ -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]);
 }
 
diff --git a/src/gallium/auxiliary/tgsi/tgsi_info.c b/src/gallium/auxiliary/tgsi/tgsi_info.c
index 90bb497..99b1c66 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_info.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_info.c
@@ -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:




More information about the mesa-commit mailing list