From bdbb5f8170f48713b741ad68c26464231a01ca7a Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 25 Feb 2010 20:21:39 -0700 Subject: swrast: add 0.5 bias in tex_array_slice() per the spec --- src/mesa/swrast/s_texfilter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/swrast/s_texfilter.c b/src/mesa/swrast/s_texfilter.c index 478fb1557f..997c2f4bb7 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; } -- cgit v1.2.3