freedreno: Reuse u_math.h instead of open coding ALIGN/ARRAY_SIZE.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6360>
This commit is contained in:
Eric Anholt
2020-08-17 16:09:36 -07:00
committed by Marge Bot
parent 21df8b3e08
commit db95dfe252
+2 -6
View File
@@ -24,6 +24,8 @@
#ifndef REDUMP_H_
#define REDUMP_H_
#include "util/u_math.h"
enum rd_sect_type {
RD_NONE,
RD_TEST, /* ascii text */
@@ -79,12 +81,6 @@ void rd_write_section(enum rd_sect_type type, const void *buf, int sz)
rd_write_section(t, b, s); \
} while (0)
#ifndef ARRAY_SIZE
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
#endif
#undef ALIGN
#define ALIGN(v, a) (((v) + (a)-1) & ~((a)-1))
#define min(a, b) (((a) < (b)) ? (a) : (b))
#define max(a, b) (((a) > (b)) ? (a) : (b))