cell: query number SPUs with spe_cpu_info_get()
authorBrian Paul <brian.paul@tungstengraphics.com>
Wed, 15 Oct 2008 20:20:10 +0000 (14:20 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Wed, 15 Oct 2008 20:20:10 +0000 (14:20 -0600)
src/gallium/drivers/cell/ppu/cell_context.c

index f8d5eef3acecbc36337424f4217ac8ed2c785dfd..358aa338fe76c81a8ba11497596bb92d194e60d5 100644 (file)
@@ -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);