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

Author: José Fonseca <[email protected]>
Date:   Wed Sep 16 16:12:22 2009 +0100

llvmpipe: Don't assert due to unsupported texture wrap modes.

Issue a warning and fallback to clamping.

---

 src/gallium/drivers/llvmpipe/lp_bld_sample_soa.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/gallium/drivers/llvmpipe/lp_bld_sample_soa.c 
b/src/gallium/drivers/llvmpipe/lp_bld_sample_soa.c
index 08b1dc1..8ca1be6 100644
--- a/src/gallium/drivers/llvmpipe/lp_bld_sample_soa.c
+++ b/src/gallium/drivers/llvmpipe/lp_bld_sample_soa.c
@@ -208,6 +208,11 @@ lp_build_sample_wrap(struct lp_build_sample_context *bld,
    case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_EDGE:
    case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_BORDER:
       /* FIXME */
+      _debug_printf("warning: failed to translate texture wrap mode %u\n", 
wrap_mode);
+      coord = lp_build_max(int_coord_bld, coord, int_coord_bld->zero);
+      coord = lp_build_min(int_coord_bld, coord, length_minus_one);
+      break;
+
    default:
       assert(0);
    }

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to