Cell: remove old test code
authorBrian <brian.paul@tungstengraphics.com>
Wed, 23 Jan 2008 23:19:40 +0000 (16:19 -0700)
committerBrian <brian.paul@tungstengraphics.com>
Wed, 23 Jan 2008 23:19:40 +0000 (16:19 -0700)
src/mesa/pipe/cell/ppu/cell_context.c
src/mesa/pipe/cell/ppu/cell_spu.c
src/mesa/pipe/cell/ppu/cell_spu.h

index 3db1dbdb46379cb06fce36598752e7803148ae03..98e13d8dde716365282efe461241beec599ba16f 100644 (file)
@@ -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
index 5a52af1f473aa83664bed43a0f54b591a886652a..4627bc8d1f4be54cc2df79db3a250275b7dfa44b 100644 (file)
@@ -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.
  */
index b4bfbced8082f979d26170fd8414a3d4e95930d7..19eff94f967e1db0ea34ad86745a100286068a0a 100644 (file)
@@ -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);