Mesa (main): freedreno: Reuse u_math.h instead of open coding ALIGN/ARRAY_SIZE.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Oct 1 23:38:26 UTC 2021
Module: Mesa
Branch: main
Commit: db95dfe2523439fcae2d56b75ff68a631cfa6a25
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=db95dfe2523439fcae2d56b75ff68a631cfa6a25
Author: Eric Anholt <eric at anholt.net>
Date: Mon Aug 17 16:09:36 2020 -0700
freedreno: Reuse u_math.h instead of open coding ALIGN/ARRAY_SIZE.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6360>
---
src/freedreno/decode/redump.h | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/src/freedreno/decode/redump.h b/src/freedreno/decode/redump.h
index c7121e8650d..5c4b8f0a41b 100644
--- a/src/freedreno/decode/redump.h
+++ b/src/freedreno/decode/redump.h
@@ -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))
More information about the mesa-commit
mailing list