summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-09-19 17:55:10 -0600
committerBrian Paul <[email protected]>2008-09-19 17:56:45 -0600
commitaca74a4d92ba6f99d756ab703a78efc3918b3840 (patch)
tree0bd3e20aa4b01281d9509dbeb3b252440cbf0e6d /src/gallium
parentbef3444f41547eda95c0f677783ab7737869bfd2 (diff)
cell: make sure the fragment ops and fragment shader code buffer is at a 32-byte boundary
To make sure even/odd instructions hit the right pipes.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/cell/spu/spu_main.c4
-rw-r--r--src/gallium/drivers/cell/spu/spu_main.h8
2 files changed, 7 insertions, 5 deletions
diff --git a/src/gallium/drivers/cell/spu/spu_main.c b/src/gallium/drivers/cell/spu/spu_main.c
index 6b624175584..b4d30228f7a 100644
--- a/src/gallium/drivers/cell/spu/spu_main.c
+++ b/src/gallium/drivers/cell/spu/spu_main.c
@@ -705,6 +705,8 @@ main(main_param_t speid, main_param_t argp)
ASSERT(sizeof(tile_t) == TILE_SIZE * TILE_SIZE * 4);
ASSERT(sizeof(struct cell_command_render) % 8 == 0);
+ ASSERT(((unsigned long) &spu.fragment_ops_code) % 32 == 0);
+ ASSERT(((unsigned long) &spu.fragment_program_code) % 32 == 0);
one_time_init();
@@ -721,7 +723,7 @@ main(main_param_t speid, main_param_t argp)
#if 0
if (spu.init.id==0)
- spu_test_misc();
+ spu_test_misc(spu.init.id);
#endif
main_loop();
diff --git a/src/gallium/drivers/cell/spu/spu_main.h b/src/gallium/drivers/cell/spu/spu_main.h
index 2c7b6258402..72e540fcff2 100644
--- a/src/gallium/drivers/cell/spu/spu_main.h
+++ b/src/gallium/drivers/cell/spu/spu_main.h
@@ -143,13 +143,13 @@ struct spu_global
ubyte ctile_status[MAX_HEIGHT/TILE_SIZE][MAX_WIDTH/TILE_SIZE] ALIGN16_ATTRIB;
ubyte ztile_status[MAX_HEIGHT/TILE_SIZE][MAX_WIDTH/TILE_SIZE] ALIGN16_ATTRIB;
- /** Current fragment ops machine code */
- uint fragment_ops_code[SPU_MAX_FRAGMENT_OPS_INSTS];
+ /** Current fragment ops machine code, at 32-byte boundary */
+ uint fragment_ops_code[SPU_MAX_FRAGMENT_OPS_INSTS] ALIGN32_ATTRIB;
/** Current fragment ops function */
spu_fragment_ops_func fragment_ops;
- /** Current fragment program machine code */
- uint fragment_program_code[SPU_MAX_FRAGMENT_PROGRAM_INSTS];
+ /** Current fragment program machine code, at 32-byte boundary */
+ uint fragment_program_code[SPU_MAX_FRAGMENT_PROGRAM_INSTS] ALIGN32_ATTRIB;
/** Current fragment ops function */
spu_fragment_program_func fragment_program;