nv50: fix reg count
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>
Thu, 5 Aug 2010 10:29:23 +0000 (12:29 +0200)
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>
Tue, 10 Aug 2010 15:35:26 +0000 (17:35 +0200)
src/gallium/drivers/nv50/nv50_pc.c

index e32d28a9ce2c37eeecff1c004f3ba7b9de1b4497..ed92261488b0a7cedcec483acb49fd6d2e5f5ecc 100644 (file)
@@ -312,8 +312,8 @@ nv50_generate_code(struct nv50_translation_info *ti)
    ti->p->immd_size = pc->immd_count * 4;
    ti->p->immd = pc->immd_buf;
 
-   ti->p->max_gpr = (pc->max_reg[NV_FILE_GPR] + 1) >> 1;
-   ti->p->max_gpr++;
+   /* highest 16 bit reg to num of 32 bit regs */
+   ti->p->max_gpr = (pc->max_reg[NV_FILE_GPR] >> 1) + 1;
 
    ti->p->fixups = pc->fixups;
    ti->p->num_fixups = pc->num_fixups;