draw: fix overflows in the indexed rendering paths
authorZack Rusin <zackr@vmware.com>
Wed, 3 Jul 2013 03:56:59 +0000 (23:56 -0400)
committerZack Rusin <zackr@vmware.com>
Wed, 3 Jul 2013 13:06:30 +0000 (09:06 -0400)
commitbbd1e60198548a12be3405fc32dd39a87e8968ab
tree3d5f40a23d402c74697502ec2a16a3d8517053b5
parent09820902d74eec1eed054388f6999cd66227b6b1
draw: fix overflows in the indexed rendering paths

The semantics for overflow detection are a bit tricky with
indexed rendering. If the base index in the elements array
overflows, then the index of the first element should be used,
if the index with bias overflows then it should be treated
like a normal overflow. Also overflows need to be checked for
in all paths that either the bias, or the starting index location.

Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/gallium/auxiliary/draw/draw_private.h
src/gallium/auxiliary/draw/draw_pt.c
src/gallium/auxiliary/draw/draw_pt_vsplit.c
src/gallium/auxiliary/draw/draw_pt_vsplit_tmp.h