summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/cell/spu/main.c
diff options
context:
space:
mode:
authorBrian <[email protected]>2008-01-10 17:14:06 -0700
committerBrian <[email protected]>2008-01-10 17:14:06 -0700
commit6c11485405700865895b7c5f14e08bc5bede2a35 (patch)
tree82bad73fe4260cd14ee0e63e384b4b09ed8b022d /src/mesa/pipe/cell/spu/main.c
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.c')
-rw-r--r--src/mesa/pipe/cell/spu/main.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/mesa/pipe/cell/spu/main.c b/src/mesa/pipe/cell/spu/main.c
index 6dbd93f5305..5ad15bc639b 100644
--- a/src/mesa/pipe/cell/spu/main.c
+++ b/src/mesa/pipe/cell/spu/main.c
@@ -30,7 +30,6 @@
#include <stdio.h>
-#include <assert.h>
#include <libmisc.h>
#include <spu_mfcio.h>
@@ -80,8 +79,8 @@ get_tile(const struct framebuffer *fb, uint tx, uint ty, uint *tile,
src += offset * bytesPerTile;
- assert(tx < fb->width_tiles);
- assert(ty < fb->height_tiles);
+ ASSERT(tx < fb->width_tiles);
+ ASSERT(ty < fb->height_tiles);
ASSERT_ALIGN16(tile);
/*
printf("get_tile: dest: %p src: 0x%x size: %d\n",
@@ -106,8 +105,8 @@ put_tile(const struct framebuffer *fb, uint tx, uint ty, const uint *tile,
dst += offset * bytesPerTile;
- assert(tx < fb->width_tiles);
- assert(ty < fb->height_tiles);
+ ASSERT(tx < fb->width_tiles);
+ ASSERT(ty < fb->height_tiles);
ASSERT_ALIGN16(tile);
/*
printf("put_tile: src: %p dst: 0x%x size: %d\n",
@@ -315,8 +314,8 @@ render(const struct cell_command_render *render)
const uint tx = txmin + i % box_width_tiles;
const uint ty = tymin + i / box_width_tiles;
- assert(tx < fb.width_tiles);
- assert(ty < fb.height_tiles);
+ ASSERT(tx < fb.width_tiles);
+ ASSERT(ty < fb.height_tiles);
/* Start fetching color/z tiles. We'll wait for completion when
* we need read/write to them later in triangle rasterization.
@@ -331,7 +330,7 @@ render(const struct cell_command_render *render)
get_tile(&fb, tx, ty, (uint *) ctile, TAG_READ_TILE_COLOR, 0);
}
- assert(render->prim_type == PIPE_PRIM_TRIANGLES);
+ ASSERT(render->prim_type == PIPE_PRIM_TRIANGLES);
/* loop over tris */
for (j = 0; j < render->num_verts; j += 3) {
@@ -445,8 +444,8 @@ render_vbuf(const struct cell_command_render_vbuf *render)
const uint tx = txmin + i % box_width_tiles;
const uint ty = tymin + i / box_width_tiles;
- assert(tx < fb.width_tiles);
- assert(ty < fb.height_tiles);
+ ASSERT(tx < fb.width_tiles);
+ ASSERT(ty < fb.height_tiles);
/* Start fetching color/z tiles. We'll wait for completion when
* we need read/write to them later in triangle rasterization.
@@ -461,7 +460,7 @@ render_vbuf(const struct cell_command_render_vbuf *render)
get_tile(&fb, tx, ty, (uint *) ctile, TAG_READ_TILE_COLOR, 0);
}
- assert(render->prim_type == PIPE_PRIM_TRIANGLES);
+ ASSERT(render->prim_type == PIPE_PRIM_TRIANGLES);
/* loop over tris */
for (j = 0; j < render->num_indexes; j += 3) {
@@ -531,7 +530,7 @@ main_loop(void)
if (Debug)
printf("SPU %u: Enter main loop\n", init.id);
- assert((sizeof(struct cell_command) & 0xf) == 0);
+ ASSERT((sizeof(struct cell_command) & 0xf) == 0);
ASSERT_ALIGN16(&cmd);
while (!exitFlag) {