Mesa (gallium-0.2): cell: CELL_NUM_SPUS env var

Brian Paul brianp at kemper.freedesktop.org
Thu Oct 16 20:34:16 UTC 2008


Module: Mesa
Branch: gallium-0.2
Commit: 8bff2fccc9774e3f3af3c0f8ea345037051cf40e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8bff2fccc9774e3f3af3c0f8ea345037051cf40e

Author: Brian Paul <brian.paul at tungstengraphics.com>
Date:   Thu Oct 16 11:48:05 2008 -0600

cell: CELL_NUM_SPUS env var

---

 src/gallium/drivers/cell/ppu/cell_context.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/gallium/drivers/cell/ppu/cell_context.c b/src/gallium/drivers/cell/ppu/cell_context.c
index 097dbcf..4dad490 100644
--- a/src/gallium/drivers/cell/ppu/cell_context.c
+++ b/src/gallium/drivers/cell/ppu/cell_context.c
@@ -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);
 




More information about the mesa-commit mailing list