Module: Mesa
Branch: 7.9
Commit: 8e8a42ffc51cb478ce38e3901d35ce28bba59c19
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=8e8a42ffc51cb478ce38e3901d35ce28bba59c19

Author: Keith Whitwell <[email protected]>
Date:   Wed Sep 15 16:28:49 2010 +0100

llvmpipe: return zero from floor_pot(zero)

---

 src/gallium/drivers/llvmpipe/lp_setup_tri.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/gallium/drivers/llvmpipe/lp_setup_tri.c 
b/src/gallium/drivers/llvmpipe/lp_setup_tri.c
index 53ffb95..5090f82 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup_tri.c
+++ b/src/gallium/drivers/llvmpipe/lp_setup_tri.c
@@ -447,8 +447,10 @@ do_triangle_ccw(struct lp_setup_context *setup,
 static INLINE uint32_t 
 floor_pot(uint32_t n)
 {
-   assert(n);
 #if defined(PIPE_CC_GCC) && defined(PIPE_ARCH_X86)
+   if (n == 0)
+      return 0;
+
    __asm__("bsr %1,%0"
           : "=r" (n)
           : "rm" (n));

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

Reply via email to