Module: Mesa
Branch: master
Commit: fffca9046c96e3411493c39ebb1855012620495c
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=fffca9046c96e3411493c39ebb1855012620495c

Author: Dave Airlie <airl...@redhat.com>
Date:   Thu Jan  5 16:16:24 2012 +0000

softpipe: route correct coordinates for shadow cube sampling.

This fixes the shadow cube map sampling on softpipe.

Signed-off-by: Dave Airlie <airl...@redhat.com>

---

 src/gallium/drivers/softpipe/sp_tex_sample.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/gallium/drivers/softpipe/sp_tex_sample.c 
b/src/gallium/drivers/softpipe/sp_tex_sample.c
index f552b5e..bd0546e 100644
--- a/src/gallium/drivers/softpipe/sp_tex_sample.c
+++ b/src/gallium/drivers/softpipe/sp_tex_sample.c
@@ -2118,7 +2118,8 @@ sample_compare(struct tgsi_sampler *tgsi_sampler,
     * RGBA channels.  We look at the red channel here.
     */
 
-   if (samp->view->texture->target == PIPE_TEXTURE_2D_ARRAY) {
+   if (samp->view->texture->target == PIPE_TEXTURE_2D_ARRAY ||
+       samp->view->texture->target == PIPE_TEXTURE_CUBE) {
       pc0 = CLAMP(c0[0], 0.0F, 1.0F);
       pc1 = CLAMP(c0[1], 0.0F, 1.0F);
       pc2 = CLAMP(c0[2], 0.0F, 1.0F);

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to