Use the ones from mesa, most places already did.
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
surf->offset = align_u32(image->size, surf->isl.alignment);
image->size = surf->offset + surf->isl.size;
- image->alignment = MAX(image->alignment, surf->isl.alignment);
+ image->alignment = MAX2(image->alignment, surf->isl.alignment);
}
/**
#define anv_noreturn __attribute__((__noreturn__))
#define anv_printflike(a, b) __attribute__((__format__(__printf__, a, b)))
-#define MIN(a, b) ((a) < (b) ? (a) : (b))
-#define MAX(a, b) ((a) > (b) ? (a) : (b))
-
static inline uint32_t
align_down_npot_u32(uint32_t v, uint32_t a)
{
if (unlikely(n == 0))
return 0;
else
- return MAX(n >> levels, 1);
+ return MAX2(n >> levels, 1);
}
static inline float