summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-09-21 08:32:43 -0600
committerBrian Paul <[email protected]>2009-09-21 14:56:10 -0600
commitd504a7669d7b71229c2d15503a095d71ee1584e6 (patch)
tree4e7f344fd94404bcec4872897cc919ff7c58a3bc /src/mesa/swrast
parentc63e78b3e583e39ef296f1c2c9a34c90eb221503 (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')
-rw-r--r--src/mesa/swrast/s_texfilter.c4
1 files changed, 2 insertions, 2 deletions
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;