nv50/ir/tgsi: handle TGSI_OPCODE_ARR
authorChristoph Bumiller <christoph.bumiller@speed.at>
Thu, 4 Jul 2013 12:19:18 +0000 (14:19 +0200)
committerIlia Mirkin <imirkin@alum.mit.edu>
Sat, 29 Nov 2014 00:17:52 +0000 (19:17 -0500)
This instruction is used by st/nine.

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "10.4" <mesa-stable@lists.freedesktop.org>
src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp

index 39a70aa59f1d6a9c187eb176be30a7b7c27dfa47..9ee927f67ad943a52cfb88810a130bbcb4b96045 100644 (file)
@@ -2337,9 +2337,12 @@ Converter::handleInstruction(const struct tgsi_full_instruction *insn)
          mkMov(dst0[c], val0);
       break;
    case TGSI_OPCODE_ARL:
+   case TGSI_OPCODE_ARR:
       FOR_EACH_DST_ENABLED_CHANNEL(0, c, tgsi) {
+         const RoundMode rnd =
+            tgsi.getOpcode() == TGSI_OPCODE_ARR ? ROUND_N : ROUND_M;
          src0 = fetchSrc(0, c);
-         mkCvt(OP_CVT, TYPE_S32, dst0[c], TYPE_F32, src0)->rnd = ROUND_M;
+         mkCvt(OP_CVT, TYPE_S32, dst0[c], TYPE_F32, src0)->rnd = rnd;
       }
       break;
    case TGSI_OPCODE_UARL: