libcl: add MIN2/MAX2 macros

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Dylan Baker <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33014>
This commit is contained in:
Lionel Landwerlin 2025-01-22 13:43:56 +02:00 committed by Marge Bot
parent 73f3de12ef
commit d3d771607d

View file

@ -201,6 +201,8 @@ util_logbase2_ceil(uint32_t n)
#define DIV_ROUND_UP(A, B) (((A) + (B) - 1) / (B))
#define CLAMP(X, MIN, MAX) ((X) > (MIN) ? ((X) > (MAX) ? (MAX) : (X)) : (MIN))
#define ALIGN_POT(x, pot_align) (((x) + (pot_align) - 1) & ~((pot_align) - 1))
#define MAX2( A, B ) ( (A)>(B) ? (A) : (B) )
#define MIN2( A, B ) ( (A)<(B) ? (A) : (B) )
static inline uint32_t
fui(float f)