summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw
diff options
context:
space:
mode:
authorZack Rusin <[email protected]>2010-06-15 08:49:00 -0400
committerZack Rusin <[email protected]>2010-06-15 09:12:20 -0400
commit9cf5e814b943d38750cdc6d27a9e25856454c853 (patch)
tree3b9a7b2e6936e605a238ba92f4c2d32660087483 /src/gallium/auxiliary/draw
parenta192b5eeafae80f9f9e7e7e442abc5b44d583d1a (diff)
draw: fix primitive indexing in the pipeline
spotted by Keith
Diffstat (limited to 'src/gallium/auxiliary/draw')
-rw-r--r--src/gallium/auxiliary/draw/draw_pipe.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pipe.c b/src/gallium/auxiliary/draw/draw_pipe.c
index c1cc32fb92c..5cc2a7521a8 100644
--- a/src/gallium/auxiliary/draw/draw_pipe.c
+++ b/src/gallium/auxiliary/draw/draw_pipe.c
@@ -371,14 +371,16 @@ void draw_pipeline_run_linear( struct draw_context *draw,
start += prim_info->primitive_lengths[i], i++)
{
unsigned count = prim_info->primitive_lengths[i];
+ char *verts = ((char*)vert_info->verts) +
+ (start * vert_info->stride);
- draw->pipeline.verts = (char *)&vert_info->verts[start];
+ draw->pipeline.verts = verts;
draw->pipeline.vertex_stride = vert_info->stride;
draw->pipeline.vertex_count = count;
pipe_run_linear(draw,
prim_info->prim,
- &vert_info->verts[start],
+ (struct vertex_header*)verts,
vert_info->stride,
vert_info->count);
}