Mesa (gallium-0.2): cell: query number SPUs with spe_cpu_info_get()

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


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

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

cell: query number SPUs with spe_cpu_info_get()

---

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

diff --git a/src/gallium/drivers/cell/ppu/cell_context.c b/src/gallium/drivers/cell/ppu/cell_context.c
index f8d5eef..358aa33 100644
--- a/src/gallium/drivers/cell/ppu/cell_context.c
+++ b/src/gallium/drivers/cell/ppu/cell_context.c
@@ -153,10 +153,11 @@ cell_create_context(struct pipe_screen *screen,
    /*
     * SPU stuff
     */
-   cell->num_spus = 6;
-   /* XXX is this in SDK 3.0 only?
+   /* 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);
-   */
+   if (cell->debug_flags) {
+      printf("PPU: found %u SPUs\n", cell->num_spus);
+   }
 
    cell_start_spus(cell);
 




More information about the mesa-commit mailing list