Mesa (gallium-0.2): cell: use CELL_MAX_SPUS consistently.

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


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

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

cell: use CELL_MAX_SPUS consistently.

---

 src/gallium/drivers/cell/common.h       |    2 +-
 src/gallium/drivers/cell/ppu/cell_spu.c |    2 +-
 src/gallium/drivers/cell/ppu/cell_spu.h |    8 +++-----
 3 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/src/gallium/drivers/cell/common.h b/src/gallium/drivers/cell/common.h
index 600f1b3..1f6f2d4 100644
--- a/src/gallium/drivers/cell/common.h
+++ b/src/gallium/drivers/cell/common.h
@@ -64,7 +64,7 @@
 #define ROUNDUP16(k)  (((k) + 0xf) & ~0xf)
 
 
-#define CELL_MAX_SPUS 6
+#define CELL_MAX_SPUS 8
 
 #define CELL_MAX_SAMPLERS 4
 #define CELL_MAX_TEXTURE_LEVELS 12  /* 2k x 2k */
diff --git a/src/gallium/drivers/cell/ppu/cell_spu.c b/src/gallium/drivers/cell/ppu/cell_spu.c
index 90745da..a6e268b 100644
--- a/src/gallium/drivers/cell/ppu/cell_spu.c
+++ b/src/gallium/drivers/cell/ppu/cell_spu.c
@@ -124,7 +124,7 @@ cell_start_spus(struct cell_context *cell)
 
    one_time_init = TRUE;
 
-   assert(cell->num_spus <= MAX_SPUS);
+   assert(cell->num_spus <= CELL_MAX_SPUS);
 
    ASSERT_ALIGN16(&cell_global.inits[0]);
    ASSERT_ALIGN16(&cell_global.inits[1]);
diff --git a/src/gallium/drivers/cell/ppu/cell_spu.h b/src/gallium/drivers/cell/ppu/cell_spu.h
index 3443331..2e965c6 100644
--- a/src/gallium/drivers/cell/ppu/cell_spu.h
+++ b/src/gallium/drivers/cell/ppu/cell_spu.h
@@ -36,8 +36,6 @@
 #include "cell_context.h"
 
 
-#define MAX_SPUS 8
-
 /**
  * Global vars, for now anyway.
  */
@@ -46,13 +44,13 @@ struct cell_global_info
    /**
     * SPU/SPE handles, etc
     */
-   spe_context_ptr_t spe_contexts[MAX_SPUS];
-   pthread_t spe_threads[MAX_SPUS];
+   spe_context_ptr_t spe_contexts[CELL_MAX_SPUS];
+   pthread_t spe_threads[CELL_MAX_SPUS];
 
    /**
     * Data sent to SPUs at start-up
     */
-   struct cell_init_info inits[MAX_SPUS];
+   struct cell_init_info inits[CELL_MAX_SPUS];
 };
 
 




More information about the mesa-commit mailing list