[Mesa-dev] [PATCH 1/2] util: Move ffs, _mesa_bitcount, and friends to the util folder

Kenneth Graunke kenneth at whitecape.org
Wed Oct 29 12:31:28 PDT 2014


On Wednesday, October 29, 2014 11:27:56 AM Jason Ekstrand wrote:
> ---
>  src/gallium/state_trackers/glx/xlib/glx_api.c     |   6 +-
>  src/gallium/state_trackers/glx/xlib/xm_api.c      |  10 +-
>  src/mesa/drivers/common/meta.c                    |   3 +-
>  src/mesa/drivers/dri/i965/brw_blorp_blit.cpp      |   4 +-
>  src/mesa/drivers/dri/i965/brw_curbe.c             |   2 +-
>  src/mesa/drivers/dri/i965/brw_draw.c              |   6 +-
>  src/mesa/drivers/dri/i965/brw_fs.cpp              |  12 +--
>  src/mesa/drivers/dri/i965/brw_shader.cpp          |   2 +-
>  src/mesa/drivers/dri/i965/brw_vec4.cpp            |   2 +-
>  src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp |   2 +-
>  src/mesa/drivers/dri/i965/brw_wm.c                |   4 +-
>  src/mesa/drivers/dri/i965/brw_wm_surface_state.c  |   2 +-
>  src/mesa/drivers/x11/fakeglx.c                    |   6 +-
>  src/mesa/drivers/x11/xm_api.c                     |  16 +--
>  src/mesa/main/bitset.h                            |   1 +
>  src/mesa/main/buffers.c                           |   6 +-
>  src/mesa/main/imports.c                           |  88 -----------------
>  src/mesa/main/imports.h                           |  54 +---------
>  src/mesa/program/program_parse.y                  |   2 +-
>  src/util/Makefile.sources                         |   1 +
>  src/util/bitcount.c                               | 115 
++++++++++++++++++++++
>  src/util/bitcount.h                               |  94 ++++++++++++++++++
>  22 files changed, 255 insertions(+), 183 deletions(-)
>  create mode 100644 src/util/bitcount.c
>  create mode 100644 src/util/bitcount.h

I like the idea of moving these to src/util, but I don't see much point in 
renaming them from (e.g.) _mesa_bitcount() to util_bitcount().  I suppose it 
matches the Gallium name, so if your intent is to unify them, then it might be 
a reasonable move.

But I don't see you deleting the Gallium code - they already have a 
util_bitcount in u_math.h, and I imagine it would conflict.  Did you build 
test it?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20141029/b0b2f081/attachment-0001.sig>


More information about the mesa-dev mailing list