summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv50/nv50_pc.c
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2010-09-15 15:21:41 +0200
committerChristoph Bumiller <[email protected]>2010-09-15 15:35:14 +0200
commit84d170bbcef8e26017ac8e2f3bacbaeb20f889d3 (patch)
tree4a069763c1ae7f1dca33246f584b2d4e501f6349 /src/gallium/drivers/nv50/nv50_pc.c
parentc46e7a05e501e02b10dbc06772c0ef01308f60d5 (diff)
nv50: put low limit on REG_ALLOC_TEMP and FP_RESULT_COUNT
Diffstat (limited to 'src/gallium/drivers/nv50/nv50_pc.c')
-rw-r--r--src/gallium/drivers/nv50/nv50_pc.c4
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 2706d887796..bb464ec4c9f 100644
--- a/src/gallium/drivers/nv50/nv50_pc.c
+++ b/src/gallium/drivers/nv50/nv50_pc.c
@@ -539,8 +539,8 @@ nv50_generate_code(struct nv50_translation_info *ti)
ti->p->immd_size = pc->immd_count * 4;
ti->p->immd = pc->immd_buf;
- /* highest 16 bit reg to num of 32 bit regs */
- ti->p->max_gpr = (pc->max_reg[NV_FILE_GPR] >> 1) + 1;
+ /* highest 16 bit reg to num of 32 bit regs, limit to >= 4 */
+ ti->p->max_gpr = MAX2(4, (pc->max_reg[NV_FILE_GPR] >> 1) + 1);
ti->p->fixups = pc->fixups;
ti->p->num_fixups = pc->num_fixups;