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.
This commit is contained in:
Brian Paul 2009-09-21 08:32:43 -06:00
parent c63e78b3e5
commit d504a7669d

View file

@ -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;