summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/cell/ppu/cell_clear.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-09-04 12:36:20 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-09-04 12:36:20 -0600
commitdc248fc2881f4443bdc20a3b53b2ad24fee430ec (patch)
treed666f12b7e6ee0f63a60f8770b3d05dfbe6b933d /src/gallium/drivers/cell/ppu/cell_clear.c
parent27ae1bcabfd441c13f52f96a72f54ea70452781c (diff)
cell: assorted comments, clean-ups, etc.
Diffstat (limited to 'src/gallium/drivers/cell/ppu/cell_clear.c')
-rw-r--r--src/gallium/drivers/cell/ppu/cell_clear.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/cell/ppu/cell_clear.c b/src/gallium/drivers/cell/ppu/cell_clear.c
index a421c95c8e..207c96b9f6 100644
--- a/src/gallium/drivers/cell/ppu/cell_clear.c
+++ b/src/gallium/drivers/cell/ppu/cell_clear.c
@@ -44,6 +44,9 @@
#include "cell_state.h"
+/**
+ * Called via pipe->clear()
+ */
void
cell_clear_surface(struct pipe_context *pipe, struct pipe_surface *ps,
unsigned clearValue)
@@ -61,13 +64,16 @@ cell_clear_surface(struct pipe_context *pipe, struct pipe_surface *ps,
PIPE_BUFFER_USAGE_GPU_WRITE);
if (ps == cell->framebuffer.zsbuf) {
+ /* clear z/stencil buffer */
surfIndex = 1;
}
else {
+ /* clear color buffer */
surfIndex = 0;
}
+ /* Build a CLEAR command and place it in the current batch buffer */
{
struct cell_command_clear_surface *clr
= (struct cell_command_clear_surface *)