nvc0: fix branching ops
[mesa.git] / src / gallium / drivers / nvc0 / nvc0_tgsi_to_nc.c
index 1b161f66dc171e17b65dc7e817cbda8ab10a7a5a..26f9e735fb26149a1a4e88a9b41b63bf40747f26 100644 (file)
@@ -22,6 +22,8 @@
 
 #include <unistd.h>
 
+#define NOUVEAU_DEBUG 1
+
 #include "pipe/p_shader_tokens.h"
 #include "tgsi/tgsi_parse.h"
 #include "tgsi/tgsi_util.h"
@@ -194,7 +196,7 @@ static INLINE void
 bld_warn_uninitialized(struct bld_context *bld, int kind,
                        struct bld_register *reg, struct nv_basic_block *b)
 {
-#ifdef NOUVEAU_DEBUG_BITS
+#ifdef NOUVEAU_DEBUG
    long i = (reg - &bld->tvs[0][0]) / 4;
    long c = (reg - &bld->tvs[0][0]) & 3;
 
@@ -1359,7 +1361,7 @@ bld_instruction(struct bld_context *bld,
    uint opcode = translate_opcode(insn->Instruction.Opcode);
    uint8_t mask = insn->Dst[0].Register.WriteMask;
 
-#ifdef NOUVEAU_DEBUG_BITS
+#ifdef NOUVEAU_DEBUG
    debug_printf("bld_instruction:"); tgsi_dump_instruction(insn, 1);
 #endif
        
@@ -1492,7 +1494,7 @@ bld_instruction(struct bld_context *bld,
       bld->join_bb[bld->cond_lvl] = bld->pc->current_block;
       bld->cond_bb[bld->cond_lvl] = bld->pc->current_block;
 
-      src1 = bld_setp(bld, NV_OP_SET_U32, NV_CC_NE,
+      src1 = bld_setp(bld, NV_OP_SET_U32, NV_CC_EQ,
                       emit_fetch(bld, insn, 0, 0), bld->zero);
 
       bld_flow(bld, NV_OP_BRA, src1, NULL, (bld->cond_lvl == 0));