nvc0: don't omit highest bit of branch target
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>
Fri, 21 Jan 2011 17:40:41 +0000 (18:40 +0100)
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>
Sun, 23 Jan 2011 12:03:20 +0000 (13:03 +0100)
Fixes negative relative branch offsets.

src/gallium/drivers/nvc0/nvc0_pc_emit.c

index e3097c9..e4b243b 100644 (file)
@@ -236,7 +236,7 @@ emit_flow(struct nv_pc *pc, struct nv_instruction *i, uint8_t op)
       */
 
       pc->emit[0] |= (pcrel & 0x3f) << 26;
-      pc->emit[1] |= (pcrel >> 6) & 0x1ffff;
+      pc->emit[1] |= (pcrel >> 6) & 0x3ffff;
    }
 }