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

Author: Michal Krol <[email protected]>
Date:   Fri Sep 18 14:36:59 2009 +0100

softpipe: Fix cube face selection.

If arx and ary are equal, we still want to choose from one of them,
and not arz.

---

 src/gallium/drivers/softpipe/sp_tex_sample.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/softpipe/sp_tex_sample.c 
b/src/gallium/drivers/softpipe/sp_tex_sample.c
index a1d3bad..f99a302 100644
--- a/src/gallium/drivers/softpipe/sp_tex_sample.c
+++ b/src/gallium/drivers/softpipe/sp_tex_sample.c
@@ -464,7 +464,7 @@ choose_cube_face(float rx, float ry, float rz, float *newS, 
float *newT)
    unsigned face;
    float sc, tc, ma;
 
-   if (arx > ary && arx > arz) {
+   if (arx >= ary && arx >= arz) {
       if (rx >= 0.0F) {
          face = PIPE_TEX_FACE_POS_X;
          sc = -rz;
@@ -478,7 +478,7 @@ choose_cube_face(float rx, float ry, float rz, float *newS, 
float *newT)
          ma = arx;
       }
    }
-   else if (ary > arx && ary > arz) {
+   else if (ary >= arx && ary >= arz) {
       if (ry >= 0.0F) {
          face = PIPE_TEX_FACE_POS_Y;
          sc = rx;

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

Reply via email to