move u_math to src/util
authorDylan Baker <dylan@pnwbakers.com>
Fri, 17 Aug 2018 00:20:38 +0000 (17:20 -0700)
committerDylan Baker <dylan@pnwbakers.com>
Fri, 7 Sep 2018 17:21:26 +0000 (10:21 -0700)
commit80825abb5d1a7491035880253ffd531c55acae6b
tree6e12b637c7c5468c39def882bf3654e5bd256fb0
parentaa4386ebfed6a76badae9e1ecf783a372375f072
move u_math to src/util

Currently we have two sets of functions for bit counts, one in gallium
and one in core mesa. The ones in core mesa are header only in many
cases, since they reduce to "#define _mesa_bitcount popcount", but they
provide a fallback implementation. This is important because 32bit msvc
doesn't have popcountll, just popcount; so when nir (for example)
includes the core mesa header it doesn't (and shouldn't) link with core
mesa. To fix this we'll promote the version out of gallium util, then
replace the core mesa uses with the util version, since nir (and other
non-core mesa users) can and do link with mesautils.

Acked-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
18 files changed:
src/broadcom/cle/v3d_packet_helpers.h
src/gallium/auxiliary/Makefile.sources
src/gallium/auxiliary/meson.build
src/gallium/auxiliary/util/u_format.c
src/gallium/auxiliary/util/u_format_bptc.c
src/gallium/auxiliary/util/u_format_latc.c
src/gallium/auxiliary/util/u_format_other.c
src/gallium/auxiliary/util/u_format_pack.py
src/gallium/auxiliary/util/u_format_rgtc.c
src/gallium/auxiliary/util/u_format_s3tc.c
src/gallium/auxiliary/util/u_format_yuv.h
src/gallium/auxiliary/util/u_format_zs.c
src/gallium/auxiliary/util/u_math.c [deleted file]
src/gallium/auxiliary/util/u_math.h [deleted file]
src/util/Makefile.sources
src/util/meson.build
src/util/u_math.c [new file with mode: 0644]
src/util/u_math.h [new file with mode: 0644]