OSDN Git Service

llvmpipe: clamp scissors to be between 0 and max
authorZack Rusin <zackr@vmware.com>
Sat, 25 May 2013 05:04:17 +0000 (01:04 -0400)
committerZack Rusin <zackr@vmware.com>
Sat, 25 May 2013 13:49:20 +0000 (09:49 -0400)
commitc88ce3480c715ab40f4d488c86c90213b1472613
tree9a73611bc0035c57ea978af663e0117d7342b6ff
parentd7d676252d2ae1fd6d3dd76d4e205251ad7c6152
llvmpipe: clamp scissors to be between 0 and max

We need to clamp to make sure invalid shader doesn't crash our
driver. The spec says to return 0-th index for everything that's
out of bounds.

Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: José Fonseca<jfonseca@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/drivers/llvmpipe/lp_setup.h
src/gallium/drivers/llvmpipe/lp_setup_line.c
src/gallium/drivers/llvmpipe/lp_setup_point.c
src/gallium/drivers/llvmpipe/lp_setup_tri.c
src/gallium/drivers/llvmpipe/lp_state_clip.c