summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2010-09-15 16:28:49 +0100
committerKeith Whitwell <[email protected]>2010-09-15 16:28:49 +0100
commit59ca1ae84b2c15c8a94211da158f563e45560bcd (patch)
tree9568034f1972e34a405a1b410b85a5026f7185bc /src/gallium/drivers/llvmpipe
parentbe2fb11f10e0cdd1b05592ea9a1eedbe50d24c9f (diff)
llvmpipe: return zero from floor_pot(zero)
Diffstat (limited to 'src/gallium/drivers/llvmpipe')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_setup_tri.c4
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 53ffb95505b..5090f82ab5f 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));