asahi: Don't redefine MIN2/MAX2
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Mon, 17 Jan 2022 01:02:59 +0000 (20:02 -0500)
committerMarge Bot <emma+marge@anholt.net>
Fri, 18 Feb 2022 23:48:32 +0000 (23:48 +0000)
The tiling function was written before the Mesa driver...

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14903>

src/asahi/lib/tiling.c

index 1ef8616..db0b84c 100644 (file)
@@ -26,6 +26,7 @@
 #include <stdlib.h>
 #include <stdbool.h>
 #include <stdint.h>
+#include "util/macros.h"
 #include "tiling.h"
 
 /* Z-order with 64x64 tiles:
@@ -61,9 +62,6 @@
 /* mask of bits used for X coordinate in a tile */
 #define SPACE_MASK 0x555 // 0b010101010101
 
-#define MAX2(x, y) (((x) > (y)) ? (x) : (y))
-#define MIN2(x, y) (((x) < (y)) ? (x) : (y))
-
 static uint32_t
 agx_space_bits(unsigned x)
 {