summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/cell/spu/main.h
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2008-01-10 17:14:06 -0700
committerBrian <brian.paul@tungstengraphics.com>2008-01-10 17:14:06 -0700
commit6c11485405700865895b7c5f14e08bc5bede2a35 (patch)
tree82bad73fe4260cd14ee0e63e384b4b09ed8b022d /src/mesa/pipe/cell/spu/main.h
parentb3247225423213c156ce4f428d1d246758a96d50 (diff)
Cell: use new ASSERT macro instead of standard assert
The later doesn't seem to work properly in SPU code.
Diffstat (limited to 'src/mesa/pipe/cell/spu/main.h')
-rw-r--r--src/mesa/pipe/cell/spu/main.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/pipe/cell/spu/main.h b/src/mesa/pipe/cell/spu/main.h
index fce113b77d..c539385a07 100644
--- a/src/mesa/pipe/cell/spu/main.h
+++ b/src/mesa/pipe/cell/spu/main.h
@@ -98,4 +98,14 @@ void
clear_tile_z(ushort tile[TILE_SIZE][TILE_SIZE], uint value);
+
+/** The standard assert macro doesn't seem to work on SPUs */
+#define ASSERT(x) \
+ if (!(x)) { \
+ fprintf(stderr, "SPU %d: %s:%d: %s(): assertion %s failed.\n", \
+ init.id, __FILE__, __LINE__, __FUNCTION__, #x); \
+ exit(1); \
+ }
+
+
#endif /* MAIN_H */