aboutsummaryrefslogtreecommitdiffstats
path: root/src/util/u_vector.h
Commit message (Collapse)AuthorAgeFilesLines
* util/vector: Fix u_vector_foreach when head rolls overC Stout2020-01-171-2/+9
| | | | | | | 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: fix no-op macro (bad number of arguments)Eric Engestrom2019-07-241-1/+1
| | | | | | Fixes: b8e077daee4d6369d774 ("util: no-op __builtin_types_compatible_p() for non-GCC compilers") Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* util: no-op __builtin_types_compatible_p() for non-GCC compilersBrian Paul2019-03-291-0/+4
| | | | | | | | | | | | | | __builtin_types_compatible_p() is GCC-specific and breaks the MSVC build. This intrinsic has been in u_vector_foreach() for a long time, but that macro has only recently been used in code (nir/nir_opt_comparison_pre.c) that's built with MSVC. Fixes: 2cf59861a ("nir: Add partial redundancy elimination for compares") Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* util: Remove u_math from u_vectorDaniel Stone2017-07-141-1/+0
| | | | | | | | | | | u_vector.h doesn't actually use anything from u_math, but it does mean everyone has to pull in src/gallium/auxiliary/util includes. Just remove it, adding a <string.h> include to u_vector.c to cover memcpy. Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* mesa/util: fix arithmetic use of 'void *' in u_vector_foreachSamuel Pitoiset2017-05-311-1/+1
| | | | | | | | | | u_vector_foreach is currently only used by the Intel Vulkan driver but when this macro is used in mesa core, GCC reports a compile-time error. Probably because some compiler options are different. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* util: fix MSVC warning in u_align_u32()Brian Paul2017-04-031-1/+1
| | | | | | | | | To silence C:\Users\Brian\projects\mesa\src\util/u_vector.h(41) : warning C4146: unary minus operator applied to unsigned type, result still unsigned Reviewed-by: Jose Fonseca <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* util: use STATIC_ASSERT instead of static_assertTapani Pälli2016-11-111-1/+1
| | | | | | | | | | | fixes following compilation warnings on Android build: "warning: implicit declaration of function 'static_assert' is invalid in C99 [-Wimplicit-function-declaration]" Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* util: add vector util code.Dave Airlie2016-10-191-0/+92
This is ported from anv, both anv and radv can share this. Reviewed-by: Nicolai Hähnle <[email protected]> Acked-by: Jason Ekstrand <[email protected]> Signed-off-by: Dave Airlie <[email protected]>