Mesa (nv50-compiler): nv50: fix reg count

Christoph Bumiller chrisbmr at kemper.freedesktop.org
Tue Aug 10 15:36:18 UTC 2010


Module: Mesa
Branch: nv50-compiler
Commit: fc1d72d15d929b629be399d977ad05611f01fc59
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=fc1d72d15d929b629be399d977ad05611f01fc59

Author: Christoph Bumiller <e0425955 at student.tuwien.ac.at>
Date:   Thu Aug  5 12:29:23 2010 +0200

nv50: fix reg count

---

 src/gallium/drivers/nv50/nv50_pc.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/nv50/nv50_pc.c b/src/gallium/drivers/nv50/nv50_pc.c
index e32d28a..ed92261 100644
--- a/src/gallium/drivers/nv50/nv50_pc.c
+++ b/src/gallium/drivers/nv50/nv50_pc.c
@@ -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;




More information about the mesa-commit mailing list