From 222b52ef16895823fbf3a0fc0be4eb23b930ed1b Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 7 Aug 2009 18:05:29 -0700 Subject: Align tiled pixmap height so we don't address beyond the end of our buffers. --- src/i830.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/i830.h') diff --git a/src/i830.h b/src/i830.h index 58afe76a..b46eff14 100644 --- a/src/i830.h +++ b/src/i830.h @@ -619,6 +619,8 @@ typedef struct _I830Rec { #define I830PTR(p) ((I830Ptr)((p)->driverPrivate)) #define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0])) +#define ALIGN(i,m) (((i) + (m) - 1) & ~((m) - 1)) +#define MIN(a,b) ((a) < (b) ? (a) : (b)) #define I830_SELECT_FRONT 0 #define I830_SELECT_BACK 1 -- cgit v1.2.3