summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2010-02-25 20:21:39 -0700
committerBrian Paul <[email protected]>2010-02-25 20:21:39 -0700
commitbdbb5f8170f48713b741ad68c26464231a01ca7a (patch)
tree54da643dff4302e941fd1e80221f8dc42d81085c /src/mesa/swrast
parent70d5c48341bd2cd36ac89540bd4de44834b50bf6 (diff)
swrast: add 0.5 bias in tex_array_slice() per the spec
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r--src/mesa/swrast/s_texfilter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/swrast/s_texfilter.c b/src/mesa/swrast/s_texfilter.c
index 478fb1557f6..997c2f4bb79 100644
--- a/src/mesa/swrast/s_texfilter.c
+++ b/src/mesa/swrast/s_texfilter.c
@@ -480,7 +480,7 @@ clamp_rect_coord_linear(GLenum wrapMode, GLfloat coord, GLint max,
static INLINE GLint
tex_array_slice(GLfloat coord, GLsizei size)
{
- GLint slice = IFLOOR(coord);
+ GLint slice = IFLOOR(coord + 0.5f);
slice = CLAMP(slice, 0, size - 1);
return slice;
}