From 077e3de98977ca0046d4f09eb7936f6006719739 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 21 Sep 2009 08:32:43 -0600 Subject: 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. --- src/mesa/swrast/s_texfilter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mesa') 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; -- cgit v1.2.3