projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
70d5c48
)
swrast: add 0.5 bias in tex_array_slice() per the spec
author
Brian Paul
<brianp@vmware.com>
Fri, 26 Feb 2010 03:21:39 +0000
(20:21 -0700)
committer
Brian Paul
<brianp@vmware.com>
Fri, 26 Feb 2010 03:21:39 +0000
(20:21 -0700)
src/mesa/swrast/s_texfilter.c
patch
|
blob
|
history
diff --git
a/src/mesa/swrast/s_texfilter.c
b/src/mesa/swrast/s_texfilter.c
index 478fb1557f61d231acc457748fd6d38a326fb90e..997c2f4bb79c5c443ed008be194f640c056a1414 100644
(file)
--- 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;
}