summaryrefslogtreecommitdiff
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-09-21 08:34:00 -0600
committerBrian Paul <brianp@vmware.com>2009-09-21 08:36:05 -0600
commit5a0b29050f22b4475426a6f05a0338a7cdf546a0 (patch)
tree6e447402170359fbaca1d394a306d4c78c249713 /src/gallium/drivers
parent077e3de98977ca0046d4f09eb7936f6006719739 (diff)
softpipe: Fix cube face selection.
If arx and ary are equal, we still want to choose from one of them, and not arz. (cherry picked from commit de685b37a91bc95dd4093a44a49b7b47385b1f7c)
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/softpipe/sp_tex_sample.c4
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 5de358dae9..81793ef736 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;