summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/cell/ppu/cell_spu.c
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2008-01-03 09:40:02 -0700
committerBrian <brian.paul@tungstengraphics.com>2008-01-03 09:40:02 -0700
commit4ff6367295bc266cf1e3390570c9aee50fe716a0 (patch)
tree1bc19ebc25dd83fffc430b0e7fdfb6e82d15f322 /src/mesa/pipe/cell/ppu/cell_spu.c
parent9b598df95ebe99d9aaf2043ce8786847978de4aa (diff)
Cell: improve surface state code to replace some temporary code.
Diffstat (limited to 'src/mesa/pipe/cell/ppu/cell_spu.c')
-rw-r--r--src/mesa/pipe/cell/ppu/cell_spu.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/mesa/pipe/cell/ppu/cell_spu.c b/src/mesa/pipe/cell/ppu/cell_spu.c
index 55a0d5038b..15b89682fa 100644
--- a/src/mesa/pipe/cell/ppu/cell_spu.c
+++ b/src/mesa/pipe/cell/ppu/cell_spu.c
@@ -158,16 +158,19 @@ void
test_spus(struct cell_context *cell)
{
uint i;
- struct pipe_surface *surf = cell->framebuffer.cbufs[0];
+ struct pipe_surface *csurf = cell->framebuffer.cbufs[0];
+ struct pipe_surface *zsurf = cell->framebuffer.zbuf;
printf("PPU: sleep(2)\n\n\n");
sleep(2);
for (i = 0; i < cell->num_spus; i++) {
- cell_global.command[i].fb.start = surf->map;
- cell_global.command[i].fb.width = surf->width;
- cell_global.command[i].fb.height = surf->height;
- cell_global.command[i].fb.format = PIPE_FORMAT_A8R8G8B8_UNORM;
+ cell_global.command[i].fb.color_start = csurf->map;
+ cell_global.command[i].fb.depth_start = zsurf ? zsurf->map : NULL;
+ cell_global.command[i].fb.width = csurf->width;
+ cell_global.command[i].fb.height = csurf->height;
+ cell_global.command[i].fb.color_format = PIPE_FORMAT_A8R8G8B8_UNORM;
+ cell_global.command[i].fb.depth_format = PIPE_FORMAT_Z32_UNORM;
send_mbox_message(cell_global.spe_contexts[i], CELL_CMD_FRAMEBUFFER);
}
@@ -179,7 +182,7 @@ test_spus(struct cell_context *cell)
finish_all(cell->num_spus);
{
- uint *b = (uint*) surf->map;
+ uint *b = (uint*) csurf->map;
printf("PPU: Clear results: 0x%x 0x%x 0x%x 0x%x\n",
b[0], b[1000], b[2000], b[3000]);
}