mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 07:10:15 +01:00
Cell: remove old test code
This commit is contained in:
parent
f19b2d7221
commit
f5d2c1eef9
3 changed files with 0 additions and 83 deletions
|
|
@ -268,16 +268,5 @@ cell_create_context(struct pipe_winsys *winsys, struct cell_winsys *cws)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
test_spus(cell);
|
||||
#endif
|
||||
|
||||
return &cell->pipe;
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
/** [4] to ensure 16-byte alignment for each status word */
|
||||
uint buffer_status[CELL_MAX_SPUS][CELL_NUM_BATCH_BUFFERS][4] ALIGN16_ATTRIB;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -133,71 +133,6 @@ cell_start_spus(struct cell_context *cell)
|
|||
}
|
||||
|
||||
|
||||
/** wait for all SPUs to finish working */
|
||||
/** XXX temporary */
|
||||
void
|
||||
finish_all(uint num_spus)
|
||||
{
|
||||
uint i;
|
||||
|
||||
for (i = 0; i < num_spus; i++) {
|
||||
send_mbox_message(cell_global.spe_contexts[i], CELL_CMD_FINISH);
|
||||
}
|
||||
for (i = 0; i < num_spus; i++) {
|
||||
/* wait for mbox message */
|
||||
unsigned k;
|
||||
|
||||
while (spe_out_mbox_read(cell_global.spe_contexts[i], &k, 1) < 1)
|
||||
;
|
||||
|
||||
assert(k == CELL_CMD_FINISH);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
** Send test commands (XXX temporary)
|
||||
**/
|
||||
void
|
||||
test_spus(struct cell_context *cell)
|
||||
{
|
||||
uint i;
|
||||
struct pipe_surface *csurf = cell->framebuffer.cbufs[0];
|
||||
struct pipe_surface *zsurf = cell->framebuffer.zsbuf;
|
||||
|
||||
printf("PPU: sleep(2)\n\n\n");
|
||||
sleep(2);
|
||||
|
||||
for (i = 0; i < cell->num_spus; i++) {
|
||||
cell_global.command[i].fb.color_start = cell->cbuf_map[0];
|
||||
cell_global.command[i].fb.depth_start = cell->zsbuf_map;
|
||||
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);
|
||||
}
|
||||
|
||||
for (i = 0; i < cell->num_spus; i++) {
|
||||
cell_global.command[i].clear.value = 0xff880044; /* XXX */
|
||||
cell_global.command[i].clear.surface = 0;
|
||||
send_mbox_message(cell_global.spe_contexts[i], CELL_CMD_CLEAR_SURFACE);
|
||||
}
|
||||
|
||||
finish_all(cell->num_spus);
|
||||
|
||||
{
|
||||
uint *b = (uint*) cell->cbuf_map[0];
|
||||
printf("PPU: Clear results: 0x%x 0x%x 0x%x 0x%x\n",
|
||||
b[0], b[1000], b[2000], b[3000]);
|
||||
}
|
||||
|
||||
for (i = 0; i < cell->num_spus; i++) {
|
||||
send_mbox_message(cell_global.spe_contexts[i], CELL_CMD_EXIT);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Tell all the SPUs to stop/exit.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -75,13 +75,6 @@ extern void
|
|||
cell_start_spus(struct cell_context *cell);
|
||||
|
||||
|
||||
extern void
|
||||
finish_all(uint num_spus);
|
||||
|
||||
extern void
|
||||
test_spus(struct cell_context *cell);
|
||||
|
||||
|
||||
extern void
|
||||
cell_spu_exit(struct cell_context *cell);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue