summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw/draw_pt.c
diff options
context:
space:
mode:
authorZack Rusin <[email protected]>2013-07-23 01:29:30 -0400
committerZack Rusin <[email protected]>2013-07-25 02:02:59 -0400
commitf19cb0e5f3be7f96b9ce68c15333370c2433d83d (patch)
tree37145d09bc94e4a0f022dcaf24279d95f2bf3fe0 /src/gallium/auxiliary/draw/draw_pt.c
parent0e9ec8697353d7a35ea0a2edc63c0c7395f7129e (diff)
draw: fix vertex id computation
vertex id has to be unaffected by the start index (i.e. when calling draw arrays with start_index = 5, the first vertex_id has to still be 0, not 5) and it has to be equal to the index when performing indexed rendering (in which case it has to be unaffected by the index bias). This fixes our behavior. Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pt.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_pt.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pt.c b/src/gallium/auxiliary/draw/draw_pt.c
index fcc24057db0..5b16bc72ef4 100644
--- a/src/gallium/auxiliary/draw/draw_pt.c
+++ b/src/gallium/auxiliary/draw/draw_pt.c
@@ -535,6 +535,7 @@ draw_vbo(struct draw_context *draw,
}
draw->pt.max_index = index_limit - 1;
+ draw->start_index = info->start;
/*
* TODO: We could use draw->pt.max_index to further narrow