util: Move fetch_rgba to a separate function table. Only llvmpipe and translate_generic use it, and only in fallbacks, so if you're not building that then let's not bloat our binaries with it. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6305>
util: Make all 3 fetch_rgba functions occupy the same function slot. A single format either had the float, the sint, or the uint version. Making the dst be void * lets us store them in the same slot and not have logic in the callers to call the right one. -6kb on gallium drivers Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6305>
util: Split the pack/unpack functions out of the format desc. This gives the compiler a chance to GC pack/unpack functions separate from the format descriptions. For drivers that use everything, this is +10-20kb, while for libvulkan_intel it's -1.3MB. Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1048434 Acked-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5826>
scons: Prune out unnecessary targets. This prunes out all targets except libgl-gdi, libgl-xlib, and svga, as suggested by Marek Olšák. libgl-xlib will be remove once I have had time to confirm no automated tests we have rely upon it. There are also a bunch of Makefile.sources which become orphaned as result, that are not taken care of in this change. v2: Prune remainders of swr support. Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4348> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4348>
meson: inline `inc_common` Let's make it clear what includes are being added everywhere, so that they can be cleaned up. Signed-off-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4360>
u_format: move format tests to util/tests/ Suggested-by: Eric Anholt <eric@anholt.net> Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net>
util: Move gallium's PIPE_FORMAT utils to /util/format/ To make PIPE_FORMATs usable from non-gallium parts of Mesa, I want to move their helpers out of gallium. Since u_format used util_copy_rect(), I moved that in there, too. I've put it in a separate directory in util/ because it's a big chunk of related code, and it's not clear to me whether we might want it as a separate library from libmesa_util at some point. Closes: #1905 Acked-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
ci: Run tests on i386 cross builds Yes, some tests fail, but we can turn those into XFAILs at meson time. Better to keep the things that work working than not cover them at all. Unfortunately XPASS results will not cause the build to fail until we update CI to meson 0.51 or newer. Reviewed-by: Daniel Stone <daniels@collabora.com>
meson: replace libmesa_util with idep_mesautil This automates the include_directories and dependencies tracking so that all users of libmesa_util don't need to add them manually. Next commit will remove the ones that were only added for that reason. Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Acked-by: Eric Anholt <eric@anholt.net> Tested-by: Vinson Lee <vlee@freedesktop.org>
u_half_test: Turn it into an actual unit test. You could break the test and meson test wouldn't complain, since we returned success either way. Reviewed-by: Thomas Helland <thomashelland90@gmail.com> Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
delete autotools .gitignore files One special case, `src/util/xmlpool/.gitignore` is not entirely deleted, as `xmlpool.pot` still gets generated (eg. by `ninja xmlpool-pot`). Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Delete autotools Acked-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com> Acked-by: Marek Olšák <marek.olsak@amd.com> Acked-by: Jason Ekstrand <jason@jlekstrand.net> Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Acked-by: Matt Turner <mattst88@gmail.com>
gallium: Make sure we return is_unorm/is_snorm for compressed formats. The util helpers were looking for a non-void channels in a non-mixed format and returning its snorm/unorm state. However, compressed formats don't have non-void channels, so they always returned false. V3D wants to use util_format_is_[su]norm for its border color clamping workarounds, so fix the functions to return the right answer for these. This now means that we ignore .is_mixed. I could retain the is_mixed check, but it doesn't seem like a useful feature -- the only code I could find that might care is freedreno's blit, which has some notes about how things are wonky in this area anyway. Reviewed-by: <Roland Scheidegger sroland@vmware.com>