Mesa (gallium-0.2): cell: query # cells too

Brian Paul brianp at kemper.freedesktop.org
Wed Oct 15 21:34:28 UTC 2008


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

Author: Brian Paul <brian.paul at tungstengraphics.com>
Date:   Wed Oct 15 14:26:08 2008 -0600

cell: query # cells too

---

 src/gallium/drivers/cell/ppu/cell_context.c |    6 ++++--
 src/gallium/drivers/cell/ppu/cell_context.h |    2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/cell/ppu/cell_context.c b/src/gallium/drivers/cell/ppu/cell_context.c
index 358aa33..097dbcf 100644
--- a/src/gallium/drivers/cell/ppu/cell_context.c
+++ b/src/gallium/drivers/cell/ppu/cell_context.c
@@ -154,9 +154,11 @@ cell_create_context(struct pipe_screen *screen,
     * SPU stuff
     */
    /* This call only works with SDK 3.0.  Anyone still using 2.1??? */
-   cell->num_spus = spe_cpu_info_get(SPE_COUNT_PHYSICAL_SPES, -1);
+   cell->num_cells = spe_cpu_info_get(SPE_COUNT_PHYSICAL_CPU_NODES, -1);
+   cell->num_spus = spe_cpu_info_get(SPE_COUNT_USABLE_SPES, 0);
    if (cell->debug_flags) {
-      printf("PPU: found %u SPUs\n", cell->num_spus);
+      printf("Cell: found %d Cell(s) with %u SPUs\n",
+             cell->num_cells, cell->num_spus);
    }
 
    cell_start_spus(cell);
diff --git a/src/gallium/drivers/cell/ppu/cell_context.h b/src/gallium/drivers/cell/ppu/cell_context.h
index 1fcf03c..a592e72 100644
--- a/src/gallium/drivers/cell/ppu/cell_context.h
+++ b/src/gallium/drivers/cell/ppu/cell_context.h
@@ -140,7 +140,7 @@ struct cell_context
 
    struct cell_spu_function_info spu_functions ALIGN16_ATTRIB;
 
-   uint num_spus;
+   uint num_cells, num_spus;
 
    /** Buffers for command batches, vertex/index data */
    uint buffer_size[CELL_NUM_BUFFERS];




More information about the mesa-commit mailing list