summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-09-21 08:32:43 -0600
committerBrian Paul <brianp@vmware.com>2009-09-21 08:36:05 -0600
commit077e3de98977ca0046d4f09eb7936f6006719739 (patch)
tree66681341a39b5800faaa6073c4a4818a660b86c8
parent999592745f40a96a7307da374cab4d68254acf75 (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.
-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 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;