vc4: Fix LT/GE set-0-or-1 compares.
authorEric Anholt <eric@anholt.net>
Sun, 24 Aug 2014 21:41:06 +0000 (14:41 -0700)
committerEric Anholt <eric@anholt.net>
Mon, 25 Aug 2014 05:13:25 +0000 (22:13 -0700)
We were using the integer sub, which worked for the common case of EQ and
NE.  Fixes fs-lessThan-ivec2-ivec2 and other tests.

src/gallium/drivers/vc4/vc4_qpu_emit.c

index 415d2b0dfd5164b39688185f9f17ab3f21273cdb..072b0b3017bf09b152e9abd3cd79d25c27d22b9c 100644 (file)
@@ -411,7 +411,7 @@ vc4_generate_code(struct qcompile *c)
                 case QOP_SGE:
                 case QOP_SLT:
                         fixup_raddr_conflict(c, src[0], &src[1]);
-                        queue(c, qpu_inst(qpu_a_SUB(qpu_ra(QPU_W_NOP),
+                        queue(c, qpu_inst(qpu_a_FSUB(qpu_ra(QPU_W_NOP),
                                                     src[0], src[1]),
                                           qpu_m_NOP()));
                         *last_inst(c) |= QPU_SF;