diff options
author | Brian Paul <[email protected]> | 2009-09-21 08:34:00 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-09-21 08:36:05 -0600 |
commit | 5a0b29050f22b4475426a6f05a0338a7cdf546a0 (patch) | |
tree | 6e447402170359fbaca1d394a306d4c78c249713 /src/gallium | |
parent | 077e3de98977ca0046d4f09eb7936f6006719739 (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')
-rw-r--r-- | 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 5de358dae93..81793ef7364 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; |