Mesa (master): glsl_to_tgsi: emit both operands of shift and bitwise operations

Bryan Cain bryanc at kemper.freedesktop.org
Tue Dec 13 16:41:38 UTC 2011


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

Author: Bryan Cain <bryancain3 at gmail.com>
Date:   Tue Dec 13 10:30:59 2011 -0600

glsl_to_tgsi: emit both operands of shift and bitwise operations

Fixes these operations when native integers are enabled.

---

 src/mesa/state_tracker/st_glsl_to_tgsi.cpp |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 6cc655d..9042cdb 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -1807,27 +1807,27 @@ glsl_to_tgsi_visitor::visit(ir_expression *ir)
       }
    case ir_binop_lshift:
       if (native_integers) {
-         emit(ir, TGSI_OPCODE_SHL, result_dst, op[0]);
+         emit(ir, TGSI_OPCODE_SHL, result_dst, op[0], op[1]);
          break;
       }
    case ir_binop_rshift:
       if (native_integers) {
-         emit(ir, TGSI_OPCODE_ISHR, result_dst, op[0]);
+         emit(ir, TGSI_OPCODE_ISHR, result_dst, op[0], op[1]);
          break;
       }
    case ir_binop_bit_and:
       if (native_integers) {
-         emit(ir, TGSI_OPCODE_AND, result_dst, op[0]);
+         emit(ir, TGSI_OPCODE_AND, result_dst, op[0], op[1]);
          break;
       }
    case ir_binop_bit_xor:
       if (native_integers) {
-         emit(ir, TGSI_OPCODE_XOR, result_dst, op[0]);
+         emit(ir, TGSI_OPCODE_XOR, result_dst, op[0], op[1]);
          break;
       }
    case ir_binop_bit_or:
       if (native_integers) {
-         emit(ir, TGSI_OPCODE_OR, result_dst, op[0]);
+         emit(ir, TGSI_OPCODE_OR, result_dst, op[0], op[1]);
          break;
       }
    case ir_unop_round_even:




More information about the mesa-commit mailing list