draw: fix vertex id computation
authorZack Rusin <zackr@vmware.com>
Tue, 23 Jul 2013 05:29:30 +0000 (01:29 -0400)
committerZack Rusin <zackr@vmware.com>
Thu, 25 Jul 2013 06:02:59 +0000 (02:02 -0400)
commitf19cb0e5f3be7f96b9ce68c15333370c2433d83d
tree37145d09bc94e4a0f022dcaf24279d95f2bf3fe0
parent0e9ec8697353d7a35ea0a2edc63c0c7395f7129e
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 <zackr@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/gallium/auxiliary/draw/draw_llvm.c
src/gallium/auxiliary/draw/draw_llvm.h
src/gallium/auxiliary/draw/draw_private.h
src/gallium/auxiliary/draw/draw_pt.c
src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c