cell: CELL_NUM_SPUS env var
authorBrian Paul <brian.paul@tungstengraphics.com>
Thu, 16 Oct 2008 17:48:05 +0000 (11:48 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Thu, 16 Oct 2008 17:48:05 +0000 (11:48 -0600)
src/gallium/drivers/cell/ppu/cell_context.c

index 097dbcfdc84929c52ecdddecf0a566f9b01b592a..4dad490ce1a51002216dd7289cb4e1c54c807163 100644 (file)
@@ -160,6 +160,10 @@ cell_create_context(struct pipe_screen *screen,
       printf("Cell: found %d Cell(s) with %u SPUs\n",
              cell->num_cells, cell->num_spus);
    }
+   if (getenv("CELL_NUM_SPUS")) {
+      cell->num_spus = atoi(getenv("CELL_NUM_SPUS"));
+      assert(cell->num_spus > 0);
+   }
 
    cell_start_spus(cell);