summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/cell/ppu/cell_batch.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/pipe/cell/ppu/cell_batch.c')
-rw-r--r--src/mesa/pipe/cell/ppu/cell_batch.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mesa/pipe/cell/ppu/cell_batch.c b/src/mesa/pipe/cell/ppu/cell_batch.c
index 5a25f1b266..c894ef8608 100644
--- a/src/mesa/pipe/cell/ppu/cell_batch.c
+++ b/src/mesa/pipe/cell/ppu/cell_batch.c
@@ -96,6 +96,15 @@ cell_batch_flush(struct cell_context *cell)
}
+uint
+cell_batch_free_space(const struct cell_context *cell)
+{
+ uint free = CELL_BATCH_BUFFER_SIZE
+ - cell->batch_buffer_size[cell->cur_batch];
+ return free;
+}
+
+
/**
* \param cmd command to append
* \param length command size in bytes
@@ -129,6 +138,8 @@ cell_batch_alloc(struct cell_context *cell, uint bytes)
void *pos;
uint size;
+ ASSERT(bytes % 4 == 0);
+
assert(cell->cur_batch >= 0);
size = cell->batch_buffer_size[cell->cur_batch];