diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2008-10-28 14:03:51 -0600 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2008-10-28 14:03:51 -0600 |
commit | db680ac0e3697ecc2c2dbd5f22c4c2fdb136b62c (patch) | |
tree | 6d1b0e38ac3dbc1165b6c3ae4c987a1487f3f5c7 /src/gallium/drivers/cell/ppu/cell_fence.c | |
parent | c46583416a749f2e7f76a1eaadb54a8b9e76fb11 (diff) |
cell: fix a number of fence issues
Plus add assertions to check status, alignment, etc.
Diffstat (limited to 'src/gallium/drivers/cell/ppu/cell_fence.c')
-rw-r--r-- | src/gallium/drivers/cell/ppu/cell_fence.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/gallium/drivers/cell/ppu/cell_fence.c b/src/gallium/drivers/cell/ppu/cell_fence.c index ffb3bea12b..867b5dcaa0 100644 --- a/src/gallium/drivers/cell/ppu/cell_fence.c +++ b/src/gallium/drivers/cell/ppu/cell_fence.c @@ -38,6 +38,7 @@ void cell_fence_init(struct cell_fence *fence) { uint i; + ASSERT_ALIGN16(fence->status); for (i = 0; i < CELL_MAX_SPUS; i++) { fence->status[i][0] = CELL_FENCE_IDLE; } @@ -50,9 +51,9 @@ cell_fence_signalled(const struct cell_context *cell, { uint i; for (i = 0; i < cell->num_spus; i++) { - //ASSERT(fence->status[i][0] != CELL_FENCE_IDLE); - if (fence->status[i][0] == CELL_FENCE_EMITTED) + if (fence->status[i][0] != CELL_FENCE_SIGNALLED) return FALSE; + /*assert(fence->status[i][0] == CELL_FENCE_EMITTED);*/ } return TRUE; } @@ -65,6 +66,15 @@ cell_fence_finish(const struct cell_context *cell, while (!cell_fence_signalled(cell, fence)) { usleep(10); } + +#ifdef DEBUG + { + uint i; + for (i = 0; i < cell->num_spus; i++) { + assert(fence->status[i][0] == CELL_FENCE_SIGNALLED); + } + } +#endif } |