draw: clamp the viewports to always be between 0 and max
authorZack Rusin <zackr@vmware.com>
Sat, 25 May 2013 05:02:46 +0000 (01:02 -0400)
committerZack Rusin <zackr@vmware.com>
Sat, 25 May 2013 13:49:20 +0000 (09:49 -0400)
commitd7d676252d2ae1fd6d3dd76d4e205251ad7c6152
treeee2de4e74375ddb379c1da9f440231eb557216a3
parent26fe24c47975f1484c193617a18cd2a9cdb65eb4
draw: clamp the viewports to always be between 0 and max

If the viewport index is larger than the PIPE_MAX_VIEWPORTS,
then the first (0-th) viewport should be used.

Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: José Fonseca<jfonseca@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/auxiliary/draw/draw_cliptest_tmp.h
src/gallium/auxiliary/draw/draw_context.c
src/gallium/auxiliary/draw/draw_pipe_clip.c
src/gallium/auxiliary/draw/draw_private.h
src/gallium/auxiliary/draw/draw_vs_variant.c