-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Laurent Desnogues wrote:
> On Jan 2, 2008 7:59 PM, Ian Romanick <[EMAIL PROTECTED]> wrote:
>> [EMAIL PROTECTED] xdemos]$ GALLIUM_CELL=y
>> LD_PRELOAD=../../lib/libGL.so.1.5.070100 ./glxinfo
>> name of display: :0.0
>> SPU: main() speid=0
>> Bus error
[snip]
> Note I don't know anything about Gallium on PS3, but I have seen
> people getting weird things due to 32 vs 64 compilers on the PS3,
> especially when people use 32 bit gcc on the PPU while they use
> 64 bit for the SPUs.
Mixed 32-bit / 64-bit environment for the win! :( With the following
patch glxinfo and progs/trivial/tri work mostly correctly. I get a
SEGFAULT in pthread_join from glxinfo, and tri won't exit without ctrl-c.
Part of this patch contradicts something in the comments (about the
parameter types to SPU's main), so I think some discussion is needed
before committing.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
iD8DBQFHfBafX1gOwKyEAw8RAhuCAJ9KFaXiHUyQmJYieuDXZ2tNXA7KLgCePTVH
7JTONQit7bYkt0SEMUz1vNQ=
=of1l
-----END PGP SIGNATURE-----
diff --git a/src/mesa/pipe/cell/common.h b/src/mesa/pipe/cell/common.h
index f7f1e2e..50399dd 100644
--- a/src/mesa/pipe/cell/common.h
+++ b/src/mesa/pipe/cell/common.h
@@ -58,9 +58,9 @@
*/
struct cell_command_framebuffer
{
- void *start;
- int width, height;
- unsigned format;
+ uint64_t start;
+ int32_t width, height;
+ uint32_t format;
} ALIGN16_ATTRIB;
@@ -69,7 +69,7 @@ struct cell_command_framebuffer
*/
struct cell_command_clear_tiles
{
- uint value;
+ uint32_t value;
} ALIGN16_ATTRIB;
@@ -92,9 +92,9 @@ struct cell_command
/** This is the object passed to spe_create_thread() */
struct cell_init_info
{
- unsigned id;
- unsigned num_spus;
- struct cell_command *cmd;
+ uint32_t id;
+ uint32_t num_spus;
+ uint64_t cmd;
} ALIGN16_ATTRIB;
diff --git a/src/mesa/pipe/cell/ppu/cell_spu.c b/src/mesa/pipe/cell/ppu/cell_spu.c
index 55a0d50..d027767 100644
--- a/src/mesa/pipe/cell/ppu/cell_spu.c
+++ b/src/mesa/pipe/cell/ppu/cell_spu.c
@@ -110,7 +110,7 @@ cell_start_spus(uint num_spus)
for (i = 0; i < num_spus; i++) {
cell_global.inits[i].id = i;
cell_global.inits[i].num_spus = num_spus;
- cell_global.inits[i].cmd = &cell_global.command[i];
+ cell_global.inits[i].cmd = (uint64_t) &cell_global.command[i];
cell_global.spe_contexts[i] = spe_context_create(0, NULL);
if (!cell_global.spe_contexts[i]) {
@@ -164,7 +164,7 @@ test_spus(struct cell_context *cell)
sleep(2);
for (i = 0; i < cell->num_spus; i++) {
- cell_global.command[i].fb.start = surf->map;
+ cell_global.command[i].fb.start = (uint64_t) surf->map;
cell_global.command[i].fb.width = surf->width;
cell_global.command[i].fb.height = surf->height;
cell_global.command[i].fb.format = PIPE_FORMAT_A8R8G8B8_UNORM;
diff --git a/src/mesa/pipe/cell/spu/main.c b/src/mesa/pipe/cell/spu/main.c
index cc5eddb..023df4e 100644
--- a/src/mesa/pipe/cell/spu/main.c
+++ b/src/mesa/pipe/cell/spu/main.c
@@ -240,7 +240,7 @@ main_loop(void)
* that doesn't work.
*/
int
-main(unsigned long speid, unsigned long argp)
+main(unsigned long long speid, unsigned long long argp)
{
int tag = 0;
@@ -248,7 +248,8 @@ main(unsigned long speid, unsigned long argp)
DefaultTag = 1;
- printf("SPU: main() speid=%lu\n", speid);
+ printf("SPU: main() speid=%lu, argp=%lx, sizeof(struct cell_init_info) = %u\n",
+ speid, argp, sizeof(struct cell_init_info));
mfc_get(&init, /* dest */
(unsigned int) argp, /* src */
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev