draw: cleanup and fix instance id computation
authorZack Rusin <zackr@vmware.com>
Tue, 23 Jul 2013 05:16:55 +0000 (01:16 -0400)
committerZack Rusin <zackr@vmware.com>
Thu, 25 Jul 2013 06:02:36 +0000 (02:02 -0400)
commit0e9ec8697353d7a35ea0a2edc63c0c7395f7129e
tree7a5f04590b5a99ec6e351289b1ce9a92569275dc
parent0ac316470813b4f2e825ff4befbbf2135cccce94
draw: cleanup and fix instance id computation

The instance id system value always starts at 0, even if the
specified start instance is larger than 0. Instead of implicitly
setting instance id to instance id plus start instance and then
having to subtract instance id when computing the buffer offsets
lets just set instance id to the proper instance id. This fixes
instance id computation and cleansup buffer offset computation.

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_pt.c
src/gallium/auxiliary/translate/translate_generic.c
src/gallium/auxiliary/translate/translate_sse.c