Module: Mesa
Branch: master
Commit: d504a7669d7b71229c2d15503a095d71ee1584e6
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=d504a7669d7b71229c2d15503a095d71ee1584e6

Author: Brian Paul <[email protected]>
Date:   Mon Sep 21 08:32:43 2009 -0600

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 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mesa/swrast/s_texfilter.c b/src/mesa/swrast/s_texfilter.c
index 6b1f934..efe6f23 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;

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to