From: Brian Paul Date: Mon, 21 Sep 2009 14:32:43 +0000 (-0600) Subject: swrast: fix cube face selection X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d504a7669d7b71229c2d15503a095d71ee1584e6;p=mesa.git 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. --- diff --git a/src/mesa/swrast/s_texfilter.c b/src/mesa/swrast/s_texfilter.c index 6b1f9346475..efe6f234740 100644 --- a/src/mesa/swrast/s_texfilter.c +++ b/src/mesa/swrast/s_texfilter.c @@ -1862,7 +1862,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; @@ -1876,7 +1876,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;