summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/cell/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/pipe/cell/common.h')
-rw-r--r--src/mesa/pipe/cell/common.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mesa/pipe/cell/common.h b/src/mesa/pipe/cell/common.h
index f9edd0cc26..e925299119 100644
--- a/src/mesa/pipe/cell/common.h
+++ b/src/mesa/pipe/cell/common.h
@@ -38,6 +38,17 @@
#include "pipe/p_format.h"
+/** The standard assert macro doesn't seem to work reliably */
+#define ASSERT(x) \
+ if (!(x)) { \
+ ubyte *p = NULL; \
+ fprintf(stderr, "%s:%d: %s(): assertion %s failed.\n", \
+ __FILE__, __LINE__, __FUNCTION__, #x); \
+ *p = 0; \
+ exit(1); \
+ }
+
+
/** for sanity checking */
#define ASSERT_ALIGN16(ptr) \
assert((((unsigned long) (ptr)) & 0xf) == 0);