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 e3097c956942aad0706f328705e61b9394cfafe6..e4b243bda87b56bc3c90bf00be2910e4dab8b63a 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;
    }
 }