diff options
author | Brian Paul <brianp@vmware.com> | 2009-09-21 08:32:43 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-09-21 08:36:05 -0600 |
commit | 077e3de98977ca0046d4f09eb7936f6006719739 (patch) | |
tree | 66681341a39b5800faaa6073c4a4818a660b86c8 /src/mesa/swrast/s_texfilter.c | |
parent | 999592745f40a96a7307da374cab4d68254acf75 (diff) |
swrast: fix cube face selection
If arx and ary are equal, we still want to choose from one of them,
and not arz.
This is the same as Michal's softpipe fix.
Diffstat (limited to 'src/mesa/swrast/s_texfilter.c')
-rw-r--r-- | src/mesa/swrast/s_texfilter.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/swrast/s_texfilter.c b/src/mesa/swrast/s_texfilter.c index dd59314cd9..ea749c0113 100644 --- a/src/mesa/swrast/s_texfilter.c +++ b/src/mesa/swrast/s_texfilter.c @@ -1863,7 +1863,7 @@ choose_cube_face(const struct gl_texture_object *texObj, GLuint face; GLfloat sc, tc, ma; - if (arx > ary && arx > arz) { + if (arx >= ary && arx >= arz) { if (rx >= 0.0F) { face = FACE_POS_X; sc = -rz; @@ -1877,7 +1877,7 @@ choose_cube_face(const struct gl_texture_object *texObj, ma = arx; } } - else if (ary > arx && ary > arz) { + else if (ary >= arx && ary >= arz) { if (ry >= 0.0F) { face = FACE_POS_Y; sc = rx; |