Re: [Mesa-dev] [PATCH] gallium/util: add util_bitcount64

2014-10-02 Thread Michel Dänzer
On 03.10.2014 02:26, Marek Olšák wrote: From: Marek Olšák I'll need this in radeonsi. v2: use __builtin_popcountll if available --- src/gallium/auxiliary/util/u_math.h | 12 1 file changed, 12 insertions(+) diff --git a/src/gallium/auxiliary/util/u_math.h b/src/gallium/auxili

[Mesa-dev] [PATCH] gallium/util: add util_bitcount64

2014-10-02 Thread Marek Olšák
From: Marek Olšák I'll need this in radeonsi. v2: use __builtin_popcountll if available --- src/gallium/auxiliary/util/u_math.h | 12 1 file changed, 12 insertions(+) diff --git a/src/gallium/auxiliary/util/u_math.h b/src/gallium/auxiliary/util/u_math.h index 39bd40f..f95c111 100

Re: [Mesa-dev] [PATCH] gallium/util: add util_bitcount64

2014-09-30 Thread Matt Turner
On Tue, Sep 30, 2014 at 9:26 AM, Marek Olšák wrote: > From: Marek Olšák > > I'll need this in radeonsi. > --- > src/gallium/auxiliary/util/u_math.h | 8 > 1 file changed, 8 insertions(+) > > diff --git a/src/gallium/auxiliary/util/u_math.h > b/src/gallium/auxiliary/util/u_math.h > inde

Re: [Mesa-dev] [PATCH] gallium/util: add util_bitcount64

2014-09-30 Thread Ilia Mirkin
On Tue, Sep 30, 2014 at 1:14 PM, Tom Stellard wrote: > On Tue, Sep 30, 2014 at 12:29:52PM -0400, Ilia Mirkin wrote: >> Perhaps do the same thing as util_bitcount, i.e. >> >> #if defined(PIPE_CC_GCC) && (PIPE_CC_GCC_VERSION >= 304) >> return __builtin_popcountll(n); >> #else >> ... >> #endif >> >

Re: [Mesa-dev] [PATCH] gallium/util: add util_bitcount64

2014-09-30 Thread Tom Stellard
On Tue, Sep 30, 2014 at 12:29:52PM -0400, Ilia Mirkin wrote: > Perhaps do the same thing as util_bitcount, i.e. > > #if defined(PIPE_CC_GCC) && (PIPE_CC_GCC_VERSION >= 304) > return __builtin_popcountll(n); > #else > ... > #endif > > Perhaps the gcc version check is no longer necessary, unlikel

Re: [Mesa-dev] [PATCH] gallium/util: add util_bitcount64

2014-09-30 Thread Ilia Mirkin
Perhaps do the same thing as util_bitcount, i.e. #if defined(PIPE_CC_GCC) && (PIPE_CC_GCC_VERSION >= 304) return __builtin_popcountll(n); #else ... #endif Perhaps the gcc version check is no longer necessary, unlikely anyone's using gcc3.3 or earlier at this point. But whatever. On Tue, Sep 30

[Mesa-dev] [PATCH] gallium/util: add util_bitcount64

2014-09-30 Thread Marek Olšák
From: Marek Olšák I'll need this in radeonsi. --- src/gallium/auxiliary/util/u_math.h | 8 1 file changed, 8 insertions(+) diff --git a/src/gallium/auxiliary/util/u_math.h b/src/gallium/auxiliary/util/u_math.h index 39bd40f..48d5c31 100644 --- a/src/gallium/auxiliary/util/u_math.h +++