aboutsummaryrefslogtreecommitdiffstats
path: root/src/util/meson.build
Commit message (Collapse)AuthorAgeFilesLines
* driconf: drop now unused translation facilityEric Engestrom2020-06-221-2/+1
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5440>
* meson: use gnu_symbol_visibility argumentDylan Baker2020-06-011-2/+4
| | | | | | | | | | This uses a meson builtin to handle -fvisibility=hidden. This is nice because we don't need to track which languages are used, if C++ is suddenly added meson just does the right thing. Acked-by: Matt Turner <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4740>
* util: delete fnv1a hash functionDmitriy Nester2020-05-251-1/+0
| | | | | | | | | | xxhash is faster than fnv1a in almost all circumstances, so we're switching to it globally. Signed-off-by: Dmytro Nester <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2405 Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4020>
* util: Make process_test path compatible with mingw native toolchainspal10002020-05-081-3/+6
| | | | | | | | | | | | | | v2: Make sure we require winepath when using mingw crosscompilers v3: Also take into account mingw clang toolchains Acked-by: Roland Scheidegger <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Fixes: f8f14130 ("util/u_process: add util_get_process_exec_path") Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2788 CC: "20.1" <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4731>
* Revert "meson,ci: Disable sparse_array tests on windows"Andres Gomez2020-04-241-4/+1
| | | | | | | | | | The Wine version in the build image has been upgraded. This reverts commit 6be65b077743fc80efe061b1e05cb13b2ff1a6b1. Reviewed-by: Michel Dänzer <[email protected]> Acked-by: Jason Ekstrand <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4678>
* remove final imports.h and imports.c bitsDylan Baker2020-04-211-2/+0
| | | | | | | | | | | This moves the fi_types to a new mesa_private.h and removes the imports.c file. The vast majority of this patch is just removing pound includes of imports.h and fixing up the recursive includes. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Matt Turner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3024>
* gallium/llvmpipe: add an optimised 32-bit memsetDave Airlie2020-04-011-0/+1
| | | | | | | | | | | | This might have other users beyond filling/clearing buffers, increase a fullscreen 4k gears from 68->74 fps on my Ryzen since gears is really just a clear benchmark, and this helps clearing. Reviewed-by: Marek Olšák <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4394> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4394>
* meson: inline `inc_common`Eric Engestrom2020-03-281-9/+9
| | | | | | | | | Let's make it clear what includes are being added everywhere, so that they can be cleaned up. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4360>
* Move compiler.h and imports.h/c from src/mesa/main into src/utilMarek Olšák2020-03-271-0/+3
| | | | | Reviewed-by: Timothy Arceri <[email protected] Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4324>
* util: fix process_test pathPierre-Eric Pelloux-Prayer2020-03-271-3/+4
| | | | | | | | | | Make sure we only use winepath when needed. Reviewed-by: Daniel Stone <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Fixes: f8f1413070a ("util/u_process: add util_get_process_exec_path") Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2690 Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4304>
* util/u_process: add util_get_process_exec_pathPierre-Eric Pelloux-Prayer2020-03-241-0/+22
| | | | | Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4181>
* meson,ci: Disable sparse_array tests on windowsJason Ekstrand2020-03-201-1/+4
| | | | | | | | | | | | As soon as I switch to using the allocation helpers in os_memory.h, these tests start blowing up on the Windows build in GitLab CI. As far as I can tell, the issue is something with the combination of the debug allocator in u_debug_memory.c and the mutex implementation in the version of Wine running in CI. The tests don't fail on real windows nor do they fail with newer versions of Wine. Reviewed-by: Lionel Landwerlin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4228>
* util: promote u_debug_memory.c to src/utilErik Faye-Lund2020-02-211-0/+1
| | | | | | | | | | | | | | | | When os_memory_debug.h was promoted to src/util, this source-file on which it depends on when the debug-flag is set on windows was left out. So let's move this also. It doesn't seem there's any way of triggering this issue right now, but it seems better to correct this to avoid this from biting us in the ass in the future. Fixes: 88c4680b5a5 ("util: promote u_memory to src/util") Reviewed-by: Dylan Baker <dylan@pnwbakers> Reviewed-by: Jose Fonseca <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3844> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3844>
* gitlab-ci: Add ppc64el and s390x cross-build jobsMichel Dänzer2020-02-051-0/+1
| | | | | | | | | | | | | Using LLVM 8 for ppc64el and 7 for s390x (which hits some coroutine related issues with LLVM 8). There are some test failures we need to ignore for now. Also, the timeout needs to be bumped from the default 30s for some tests, because they can take longer under emulation. Reviewed-by: Adam Jackson <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3643>
* util: move fnv1a hash implementation into its own headerAnthony Pesch2020-01-231-0/+1
| | | | | | Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3475>
* util: import xxhashAnthony Pesch2020-01-231-0/+1
| | | | | | Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3475>
* util/vector: Fix u_vector_foreach when head rolls overC Stout2020-01-171-0/+1
| | | | | | | Also add unit tests for u_vector. Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3453> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3453>
* util/format: add trivial srgb<->linear conversion testEric Engestrom2019-12-271-0/+1
| | | | | | | | | This would've caught 8829f9ccb0267d113283 ("u_format: add ETC2 to util_format_srgb/util_format_linear"). Suggested-by: Eric Anholt <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* util/os_socket: Add socket related functions.Rafael Antognolli2019-12-131-0/+2
| | | | | | | | v3: - Add os_socket.c/h into Makefile.sources (Lionel) - Add empty non-linux implementation to public functions. Reviewed-by: Lionel Landwerlin <[email protected]>
* mesa/main/util: moving gallium u_mm to util, remove main/mmAlejandro Piñeiro2019-12-021-0/+2
| | | | | | | | | | | | | | | | | | | | Right now there are two copies of mm: * mesa/main/mm.[ch] * gallium/auxiliary/util/u_mm.[ch] At some point they splitted, and from the commit message it was not clear why it was not possible to have only one copy at a common place. Taking into account that was several years ago, Im assuming that it was not possible then. This change would allow to have one copy of the same code, and also being able to use that code out of mesa/main or gallium, if needed. This commit moves u_mm and removes mm, as u_mm has slightly more changes. Reviewed-by: Jose Fonseca <[email protected]>
* util: Move gallium's PIPE_FORMAT utils to /util/format/Eric Anholt2019-11-141-0/+2
| | | | | | | | | | | | | | | 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 <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
* util: Use ZSTD for shader cache if possibleDylan Baker2019-11-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows ZSTD instead of ZLIB to be used for compressing the shader cache. On a 72 core system emulating skl with a full shader-db (with i965): ZSTD: 1915.10s user 229.27s system 5150% cpu 41.632 total (cold cache) 225.40s user 10.87s system 3810% cpu 6.201 total (warm cache) 154M (235M on disk) ZLIB: 2231.33s user 194.24s system 1899% cpu 2:07.72 total (cold cache) 229.15s user 10.63s system 3906% cpu 6.139 total (warm cache) 163M (244M on disk) Tim Arceri sees (8 core ryzen and a full shader-db): ZSTD: 2505.22 user 40.50 system 3:18.73 elapsed 1280% CPU (cold cache) 418.71 user 14.93 system 0:46.53 elapsed 931% CPU (warm cache) 454.3 MB (681.7 MB on disk) ZLIB: 3069.83 user 40.02 system 4:20.13 elapsed 1195% CPU (cold cache) 425.50 user 15.17 system 0:46.80 elapsed 941% CPU (warm cache) 470.3 MB (701.4 MB on disk) Reviewed-by: Eric Engestrom <[email protected]> (v1) Reviewed-by: Eric Anholt <[email protected]>
* meson: move idep_xmlconfig_headers to xmlpool/Eric Engestrom2019-10-311-5/+0
| | | | | | | | That's where `xmlpool_options_h` is defined, and this way we can make sure nobody starts making use of it in the future :) Signed-off-by: Eric Engestrom <[email protected]> Acked-by: Dylan Baker <[email protected]>
* meson: split out idep_xmlconfig_headers from idep_xmlconfigEric Engestrom2019-10-311-2/+5
| | | | | | | A bunch of components need the former but not the latter. Signed-off-by: Eric Engestrom <[email protected]> Acked-by: Dylan Baker <[email protected]>
* util: Add a util_sparse_array data structureJason Ekstrand2019-10-311-0/+3
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* meson/util: Don't run string_buffer tests on mingwDylan Baker2019-10-101-1/+4
| | | | | | | They succeed with MSVC but not with MinGW. I don't understand why they fail. Acked-by: Kristian H. Kristensen <[email protected]>
* meson: only build timspec test if timespec is availableDylan Baker2019-10-101-1/+3
| | | | | Reviewed-by: Eric Engestrom <[email protected]> Acked-by: Kristian H. Kristensen <[email protected]>
* meson: don't build or run mesa-sha1 test on windowsDylan Baker2019-10-101-11/+14
| | | | | | | | | It crashes hard (pop-up window and all). v2: - Change comment to FIXME Reviewed-by: Eric Engestrom <[email protected]> Acked-by: Kristian H. Kristensen <[email protected]>
* util/rb_tree: Add the unit testsJason Ekstrand2019-09-201-0/+12
| | | | | | | When I wrote the red-black tree implementation, I wrote tests for it but they never got imported into mesa. Reviewed-by: Lionel Landwerlin <[email protected]>
* Move blob from compiler/ to util/Jason Ekstrand2019-09-191-0/+15
| | | | | | | | There's nothing whatsoever compiler-specific about it other than that's currently where it's used. Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* util: add fp64 -> fp32 conversion support for RTNE and RTZ rounding modesSamuel Iglesias Gonsálvez2019-09-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | In order to be coherent with the pre-existent API for half floats, this new API for double is the one meant to be used when doing double to float conversions. It is no more than a wrapper for the softfloat.h API but we meant to keep that one private. v2: - Fix bug in _mesa_double_to_float_rtz() in the inf/nan detection using the exponent value. v3: - Replace custom f64 -> f32 implementations with the softfloat one (Andres). v4: - Added API usage clarifying comments (Caio). Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Signed-off-by: Andres Gomez <[email protected]> Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
* util: add softfloat functions to operate with doubles and floatsSamuel Iglesias Gonsálvez2019-09-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Implemented fadd, fsub, fmul and ffma for doubles and ffma for floats, rounding to zero, using a modified implementation from Berkely Softfloat 3e Library. Their implementation correctness has been checked with the Berkeley TestFloat Release 3e tool for x86_64. v2: - Reuse util_last_bit64() in _mesa_count_leading_zeros64() implementation (Connor). v3: - Add a specific ffma for floats version (Connor). - Implement the ffma for doubles version (Andres). - Lots of fixes in fadd, fsub and fmul (Andres). - Improved documentation (Andres). v4: - Added f64 -> f32 conversion function (Andres). - Added f32 -> f16 RTZ conversion function (Andres). Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Signed-off-by: Andres Gomez <[email protected]> Tested-by: Andres Gomez <[email protected]> Acked-by: Caio Marcelo de Oliveira Filho <[email protected]>
* util: android logging supportRob Clark2019-09-061-1/+13
| | | | | | | | | In particular, it would be nice for failed debug_assert() msgs to show up in logcat. Signed-off-by: Rob Clark <[email protected]> Kristian H. Kristensen <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* util: add anon_file.h for all memfd/temp file usageGreg V2019-08-071-0/+2
| | | | | | | | | Move the Weston os_create_anonymous_file code from egl/wayland into util, add support for Linux memfd and FreeBSD SHM_ANON, use that code in anv/aubinator instead of explicit memfd calls for portability. Acked-by: Lionel Landwerlin <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* meson: replace last uses of libxmlconfig with idep_xmlconfigEric Engestrom2019-08-031-2/+2
| | | | | | Signed-off-by: Eric Engestrom <[email protected]> Acked-by: Eric Anholt <[email protected]> Tested-by: Vinson Lee <[email protected]>
* meson: drop unused dep_{thread,dl}Eric Engestrom2019-08-031-1/+1
| | | | | | | | Unused as of last commit. Signed-off-by: Eric Engestrom <[email protected]> Acked-by: Eric Anholt <[email protected]> Tested-by: Vinson Lee <[email protected]>
* meson: replace libmesa_util with idep_mesautilEric Engestrom2019-08-031-7/+11
| | | | | | | | | | | 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 <[email protected]> Acked-by: Eric Anholt <[email protected]> Tested-by: Vinson Lee <[email protected]>
* util: add a timespec helperLionel Landwerlin2019-07-291-0/+2
| | | | | | | | Copied from Weston, upon Daniel's suggestion Signed-off-by: Lionel Landwerlin <[email protected]> Suggested-by: Daniel Stone <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* meson: set up a proper internal dependency for xmlconfigEric Engestrom2019-06-271-0/+7
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* util: Add a helper for faster remaindersConnor Abbott2019-05-311-0/+1
| | | | | | | | | | This should be at least as fast as using fast_idiv_by_const, and has the advantage that the precomputation is simple enough to be evaluated at Mesa-compile time for hash tables and sets which have a fixed table of possible divisors. Acked-by: Eric Anholt <[email protected]> Acked-by: Jason Ekstrand <[email protected]>
* util/tests: add basic unit tests for bitsetDave Airlie2019-05-031-0/+12
| | | | | | | The last test here currently fails as there is a bug in bitset.h Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* util: add os_read_file() helperEric Engestrom2019-04-301-0/+1
| | | | | | | | readN() taken from igt. os_read_file() inspired by igt_sysfs_get() Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* util: Add a DAG datastructure.Eric Anholt2019-03-111-0/+1
| | | | | | I keep writing this for various schedulers. Acked-by: Timothy Arceri <[email protected]>
* driconf: add DTD to allow the drirc xml (00-mesa-defaults.conf) to be validatedEric Engestrom2019-02-281-1/+15
| | | | | | | | This DTD can be used to validate the drirc xml: $ xmllint --noout --valid 00-mesa-defaults.conf Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* meson: Add tests to suitesDylan Baker2018-11-201-3/+6
| | | | | | | | | | | | | | | | Meson test has a concepts of suites, which allow tests to be grouped together. This allows for a subtest of tests to be run only (say only the tests for nir). A test can be added to more than one suite, but for the most part I've only added a test to a single suite, though I've added a compiler group that includes nir, glsl, and glcpp tests. To use this you'll need to invoke meson test directly, instead of ninja test (which always runs all targets). it can be invoked as: `meson test -C builddir --suite $suitename` (meson test has addition options that are pretty useful). Tested-By: Gert Wollny <[email protected]> Acked-by: Eric Engestrom <[email protected]>
* autotools: library-dependency when no sse and 32-bitSergii Romantsov2018-11-051-1/+1
| | | | | | | | | | | | | | | Building of 32bit Mesa may fail if __SSE__ is not specified. Added missed dependency from libm. v2: avoided dependecy on any flag, just link v3: meson doesn't fail, but have added dependency on libm CC: Dylan Baker <[email protected]> CC: Lionel G Landwerlin <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108560 Signed-off-by: Sergii Romantsov <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* util: move u_cpu_detect to utilDylan Baker2018-10-301-0/+2
| | | | | | | | | CC: [email protected] Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107870 Fixes: 80825abb5d1a7491035880253ffd531c55acae6b ("move u_math to src/util") Tested-by: Brian Paul <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* util: Move u_debug to utilsDylan Baker2018-10-301-0/+2
| | | | | Tested-by: Brian Paul <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* util: Move os_misc to utilDylan Baker2018-10-301-0/+2
| | | | | | | this is needed by u_debug Tested-by: Brian Paul <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* util: Add tests for fast integer division by constantsJason Ekstrand2018-10-101-0/+1
| | | | | | | | | While I generally trust rediculousfish to have done his homework, we've made some adjustments to suit the needs of mesa and it'd be good to test those. Also, there's no better place than unit tests to clearly document the different edge cases of the different methods. Reviewed-by: Marek Olšák <[email protected]>