summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/cell/spu
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/pipe/cell/spu')
-rw-r--r--src/mesa/pipe/cell/spu/main.c17
-rw-r--r--src/mesa/pipe/cell/spu/main.h2
2 files changed, 12 insertions, 7 deletions
diff --git a/src/mesa/pipe/cell/spu/main.c b/src/mesa/pipe/cell/spu/main.c
index 83880bc906a..6a77e3e9fad 100644
--- a/src/mesa/pipe/cell/spu/main.c
+++ b/src/mesa/pipe/cell/spu/main.c
@@ -44,7 +44,7 @@ helpful headers:
/opt/ibm/cell-sdk/prototype/sysroot/usr/include/libmisc.h
*/
-struct cell_init_info init;
+volatile struct cell_init_info init;
struct framebuffer fb;
@@ -238,17 +238,21 @@ main_loop(void)
+/**
+ * SPE entrypoint.
+ * Note: example programs declare params as 'unsigned long long' but
+ * that doesn't work.
+ */
int
-main(unsigned long long speid,
- unsigned long long argp,
- unsigned long long envp)
+main(unsigned long speid, unsigned long argp)
{
int tag = 0;
+ (void) speid;
+
DefaultTag = 1;
- (void) speid;
- (void) envp;
+ printf("SPU: main() speid=%lu\n", speid);
mfc_get(&init, /* dest */
(unsigned int) argp, /* src */
@@ -258,6 +262,7 @@ main(unsigned long long speid,
0 /* rid */);
wait_on_mask( 1 << tag );
+
main_loop();
return 0;
diff --git a/src/mesa/pipe/cell/spu/main.h b/src/mesa/pipe/cell/spu/main.h
index 882be7f1c58..8c2796387fd 100644
--- a/src/mesa/pipe/cell/spu/main.h
+++ b/src/mesa/pipe/cell/spu/main.h
@@ -34,7 +34,7 @@
#include "pipe/cell/common.h"
-extern struct cell_init_info init;
+extern volatile struct cell_init_info init;
struct framebuffer {
void *start;