diff options
author | Brian Paul <[email protected]> | 2009-04-16 15:43:32 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-04-17 16:10:26 -0600 |
commit | f8f23e33c21f41756d068b546f2aae37030b5773 (patch) | |
tree | ee5977886671c7d32418e7764414aff1ffdeb1e8 /src/mesa/drivers/dri/i965/brw_vs_emit.c | |
parent | 867afa4c093cb05bedf11a1c7a74feb202fb858b (diff) |
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.
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_vs_emit.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vs_emit.c | 6 |
1 files changed, 4 insertions, 2 deletions
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: |