mesa/src/util/tests
Ian Romanick 72259a870f util: Add and use functions to calculate min and max int for a size
Many places need to know the maximum or minimum possible value for a
given size integer... so everyone just open-codes their favorite
version.  There is some potential to hit either undefined or
implementation-defined behavior, so having one version that Just Works
seems beneficial.

v2: Fix copy-and-pasted bug (INT64_MAX instead of INT64_MIN) in
u_intmin.  Noticed by CI.  Lol.  Rename functions
`s/u_(uint|int)(min|max)/u_\1N_\2/g`.  Suggested by Jason.  Add some
unit tests that would have caught the copy-and-paste bug before wasting
CI time.  Change the implementation of u_intN_min to use the same
pattern as stdint.h.  This avoids the integer division.  Noticed by
Jason.

v3: Add changes to convert_clear_color
(src/gallium/drivers/iris/iris_clear.c).  Suggested by Nanley.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Suggested-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12177>
2021-08-03 12:55:02 -07:00
..
cache util/tests: initialise key in cache_test 2021-06-28 23:53:10 +00:00
drirc_configdir xmlconfig: Add unit tests for recent bugs in the driconf rewrite. 2020-12-04 21:32:17 +00:00
drirc_home xmlconfig: Add unit tests for recent bugs in the driconf rewrite. 2020-12-04 21:32:17 +00:00
fast_idiv_by_const util: Add and use functions to calculate min and max int for a size 2021-08-03 12:55:02 -07:00
fast_urem_by_const
format util: Switch the non-block formats to unpacking rgba rows instead of rects. 2021-04-19 17:59:44 +00:00
hash_table util/hash_table: add macro for destructively iterating entries 2021-04-07 22:57:27 +00:00
set util/set: add macro for destructively iterating set entries 2021-04-07 22:57:27 +00:00
sparse_array
string_buffer
timespec
vector
vma util/vma: Fix leak of the heap in the unit test. 2020-12-15 19:39:29 +00:00
int_min_max.cpp util: Add and use functions to calculate min and max int for a size 2021-08-03 12:55:02 -07:00
xmlconfig.cpp driconfig: Add support for device specific config 2021-08-02 16:37:24 -07:00