softpipe: implement coord clamping for texel fetches (TXF)
authorBrian Paul <brianp@vmware.com>
Wed, 25 Apr 2012 16:42:42 +0000 (10:42 -0600)
committerBrian Paul <brianp@vmware.com>
Tue, 1 May 2012 17:42:58 +0000 (11:42 -0600)
commit92d899303a0498e53b66fe19658a2f7fd6dc9a26
tree1ec133bf479af98b0113190be2a08704b137ffde
parent7b610d55160cf77b8d8de0a7bc58c75985ba8747
softpipe: implement coord clamping for texel fetches (TXF)

The GL spec says out of bounds fetches produce undefined results.
Use clamping to avoid failed assertions or crashes.

Fixes failed assertion in https://bugs.freedesktop.org/show_bug.cgi?id=49125
but the test still fails.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/gallium/drivers/softpipe/sp_tex_sample.c