aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/cell/ppu/cell_batch.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-09-04 12:36:20 -0600
committerBrian Paul <[email protected]>2008-09-04 12:36:20 -0600
commitdc248fc2881f4443bdc20a3b53b2ad24fee430ec (patch)
treed666f12b7e6ee0f63a60f8770b3d05dfbe6b933d /src/gallium/drivers/cell/ppu/cell_batch.c
parent27ae1bcabfd441c13f52f96a72f54ea70452781c (diff)
cell: assorted comments, clean-ups, etc.
Diffstat (limited to 'src/gallium/drivers/cell/ppu/cell_batch.c')
-rw-r--r--src/gallium/drivers/cell/ppu/cell_batch.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/gallium/drivers/cell/ppu/cell_batch.c b/src/gallium/drivers/cell/ppu/cell_batch.c
index 5d007d4c8ce..a32a8c5633a 100644
--- a/src/gallium/drivers/cell/ppu/cell_batch.c
+++ b/src/gallium/drivers/cell/ppu/cell_batch.c
@@ -32,6 +32,13 @@
+/**
+ * Search the buffer pool for an empty/free buffer and return its index.
+ * Buffers are used for storing vertex data, state and commands which
+ * will be sent to the SPUs.
+ * If no empty buffers are available, wait for one.
+ * \return buffer index in [0, CELL_NUM_BUFFERS-1]
+ */
uint
cell_get_empty_buffer(struct cell_context *cell)
{
@@ -74,6 +81,11 @@ cell_get_empty_buffer(struct cell_context *cell)
}
+/**
+ * Flush the current batch buffer to the SPUs.
+ * An empty buffer will be found and set as the new current batch buffer
+ * for subsequent commands/data.
+ */
void
cell_batch_flush(struct cell_context *cell)
{
@@ -120,6 +132,9 @@ cell_batch_flush(struct cell_context *cell)
}
+/**
+ * Return the number of bytes free in the current batch buffer.
+ */
uint
cell_batch_free_space(const struct cell_context *cell)
{
@@ -129,7 +144,7 @@ cell_batch_free_space(const struct cell_context *cell)
/**
- * Append data to current batch.
+ * Append data to the current batch buffer.
* \param data address of block of bytes to append
* \param bytes size of block of bytes
*/