summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/cell/ppu/cell_surface.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/pipe/cell/ppu/cell_surface.c')
-rw-r--r--src/mesa/pipe/cell/ppu/cell_surface.c29
1 files changed, 21 insertions, 8 deletions
diff --git a/src/mesa/pipe/cell/ppu/cell_surface.c b/src/mesa/pipe/cell/ppu/cell_surface.c
index 1692960244..66e4b5108b 100644
--- a/src/mesa/pipe/cell/ppu/cell_surface.c
+++ b/src/mesa/pipe/cell/ppu/cell_surface.c
@@ -70,14 +70,6 @@ cell_clear_surface(struct pipe_context *pipe, struct pipe_surface *ps,
struct cell_context *cell = cell_context(pipe);
uint i;
- printf("%s 0x%08x\n", __FUNCTION__, clearValue);
-
- {
- char s[100];
- pf_sprint_name(s, ps->format);
- printf("format = %s\n", s);
- }
-
if (!ps->map)
pipe_surface_map(ps);
@@ -90,9 +82,30 @@ cell_clear_surface(struct pipe_context *pipe, struct pipe_surface *ps,
}
for (i = 0; i < cell->num_spus; i++) {
+ /* XXX clear color varies per-SPU for debugging */
command[i].clear.value = clearValue | (i << 21);
send_mbox_message(control_ps_area[i], CELL_CMD_CLEAR_TILES);
}
+
+#if 1
+ /* XXX Draw a test triangle over the cleared surface */
+ for (i = 0; i < cell->num_spus; i++) {
+ /* Same triangle data for all SPUs, of course: */
+ command[i].tri.x0 = 20.0;
+ command[i].tri.y0 = ps->height - 20;
+
+ command[i].tri.x1 = ps->width - 20.0;
+ command[i].tri.y1 = ps->height - 20;
+
+ command[i].tri.x2 = ps->width / 2;
+ command[i].tri.y2 = 20.0;
+
+ /* XXX color varies per SPU */
+ command[i].tri.color = 0xffff00 | ((i*40)<<24); /* yellow */
+
+ send_mbox_message(control_ps_area[i], CELL_CMD_TRIANGLE);
+ }
+#endif
}