swrast: add 0.5 bias in tex_array_slice() per the spec

This commit is contained in:
Brian Paul
2010-02-25 20:21:39 -07:00
parent 70d5c48341
commit bdbb5f8170
+1 -1
View File
@@ -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;
}