Ok I've pushed this.
The mesa part was bogus though (can't use PIPE_CC_GCC there).
Technically, the non-builtin versions are bogus now though if unsigned
isn't 32bit (on ILP64 it is 64bit - I believe some MIPS/ALPHA systems
might use that). But only if the values fed to them are actually larger
tha
Le 08/06/2011 22:08, Roland Scheidegger a écrit :
> Looks good to me - but skip the special n <= 1 case that's what the
> (n|1) input to the __builtin_clz is good for.
Ok, I'm not familiar with bit manipulation in fact...
> Oh and I didn't notice before but there's an error in the gcc version
> ch
Looks good to me - but skip the special n <= 1 case that's what the
(n|1) input to the __builtin_clz is good for.
Oh and I didn't notice before but there's an error in the gcc version
check (as that's defined as (__GNUC__ * 100 + __GNUC_MINOR__) - we're
ignoring patchlevel). Though as said there's
On a Roland Scheidegger idea!
Benjamin
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 3e42911..da2e72f 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -86,6 +86,12 @@ _mesa_free_texmemory(void *m)
static GLuint
logbase2(GLuint n)
{
+#if defined(PI