From f8f23e33c21f41756d068b546f2aae37030b5773 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 16 Apr 2009 15:43:32 -0600 Subject: i965: updated CURBE allocation code Now that we have real constant buffers, the demands on the CURBE are lessened. When we use real VS/WM constant buffers we only use the CURBE for clip planes. --- src/mesa/drivers/dri/i965/brw_vs_emit.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/mesa/drivers/dri/i965/brw_vs_emit.c') diff --git a/src/mesa/drivers/dri/i965/brw_vs_emit.c b/src/mesa/drivers/dri/i965/brw_vs_emit.c index af0f5016212..0c86c23ad91 100644 --- a/src/mesa/drivers/dri/i965/brw_vs_emit.c +++ b/src/mesa/drivers/dri/i965/brw_vs_emit.c @@ -68,7 +68,6 @@ static void release_tmps( struct brw_vs_compile *c ) static void brw_vs_alloc_regs( struct brw_vs_compile *c ) { GLuint i, reg = 0, mrf; - GLuint nr_params; #if 0 if (c->vp->program.Base.Parameters->NumParameters >= 6) @@ -100,15 +99,18 @@ static void brw_vs_alloc_regs( struct brw_vs_compile *c ) if (c->use_const_buffer) { /* get constants from a real constant buffer */ c->prog_data.curb_read_length = 0; + c->prog_data.nr_params = 4; /* XXX 0 causes a bug elsewhere... */ } else { /* use a section of the GRF for constants */ - nr_params = c->vp->program.Base.Parameters->NumParameters; + GLuint nr_params = c->vp->program.Base.Parameters->NumParameters; for (i = 0; i < nr_params; i++) { c->regs[PROGRAM_STATE_VAR][i] = stride( brw_vec4_grf(reg+i/2, (i%2) * 4), 0, 4, 1); } reg += (nr_params + 1) / 2; c->prog_data.curb_read_length = reg - 1; + + c->prog_data.nr_params = nr_params * 4; } /* Allocate input regs: -- cgit v1.2.3