aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv40/nv40_draw.c
diff options
context:
space:
mode:
authorBen Skeggs <[email protected]>2008-04-09 13:58:51 +1000
committerBen Skeggs <[email protected]>2008-04-09 14:02:55 +1000
commitbdfcce47921cdd808740ee26e6781837351bad98 (patch)
tree7b871929331e0e7230baf25fe5ab768bccc7eedc /src/gallium/drivers/nv40/nv40_draw.c
parent2a8de8ff94e0e0e52e03f8c8427a9e92fae374f4 (diff)
nv40: use vb/ve counts rather than shader inputs for related loops
Diffstat (limited to 'src/gallium/drivers/nv40/nv40_draw.c')
-rw-r--r--src/gallium/drivers/nv40/nv40_draw.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/gallium/drivers/nv40/nv40_draw.c b/src/gallium/drivers/nv40/nv40_draw.c
index 7f008aca3a8..dd5cc8fc998 100644
--- a/src/gallium/drivers/nv40/nv40_draw.c
+++ b/src/gallium/drivers/nv40/nv40_draw.c
@@ -239,9 +239,7 @@ nv40_draw_elements_swtnl(struct pipe_context *pipe,
nv40->state.dirty &= ~(1ULL << NV40_STATE_VTXBUF);
nv40_state_emit(nv40);
- for (i = 0; i < PIPE_ATTRIB_MAX; i++) {
- if (!nv40->vtxbuf[i].buffer)
- continue;
+ for (i = 0; i < nv40->vtxbuf_nr; i++) {
map = ws->buffer_map(ws, nv40->vtxbuf[i].buffer,
PIPE_BUFFER_USAGE_CPU_READ);
draw_set_mapped_vertex_buffer(nv40->draw, i, map);
@@ -262,11 +260,8 @@ nv40_draw_elements_swtnl(struct pipe_context *pipe,
draw_arrays(nv40->draw, mode, start, count);
- for (i = 0; i < PIPE_ATTRIB_MAX; i++) {
- if (!nv40->vtxbuf[i].buffer)
- continue;
+ for (i = 0; i < nv40->vtxbuf_nr; i++)
ws->buffer_unmap(ws, nv40->vtxbuf[i].buffer);
- }
if (idxbuf)
ws->buffer_unmap(ws, idxbuf);