cell: remove some old, pre-batchbuffer stuff
This commit is contained in:
@@ -269,19 +269,6 @@ struct cell_command_texture
|
||||
};
|
||||
|
||||
|
||||
/** XXX unions don't seem to work */
|
||||
/* XXX this should go away; all commands should be placed in batch buffers */
|
||||
struct cell_command
|
||||
{
|
||||
#if 0
|
||||
struct cell_command_framebuffer fb;
|
||||
struct cell_command_clear_surface clear;
|
||||
struct cell_command_render render;
|
||||
#endif
|
||||
struct cell_command_vs vs;
|
||||
} ALIGN16_ATTRIB;
|
||||
|
||||
|
||||
#define MAX_SPU_FUNCTIONS 12
|
||||
/**
|
||||
* Used to tell the PPU about the address of particular functions in the
|
||||
@@ -302,7 +289,6 @@ struct cell_init_info
|
||||
unsigned id;
|
||||
unsigned num_spus;
|
||||
unsigned debug_flags; /**< mask of CELL_DEBUG_x flags */
|
||||
struct cell_command *cmd;
|
||||
|
||||
/** Buffers for command batches, vertex/index data */
|
||||
ubyte *buffers[CELL_NUM_BUFFERS];
|
||||
|
||||
@@ -126,9 +126,6 @@ cell_start_spus(struct cell_context *cell)
|
||||
|
||||
assert(cell->num_spus <= MAX_SPUS);
|
||||
|
||||
ASSERT_ALIGN16(&cell_global.command[0]);
|
||||
ASSERT_ALIGN16(&cell_global.command[1]);
|
||||
|
||||
ASSERT_ALIGN16(&cell_global.inits[0]);
|
||||
ASSERT_ALIGN16(&cell_global.inits[1]);
|
||||
|
||||
@@ -141,7 +138,7 @@ cell_start_spus(struct cell_context *cell)
|
||||
cell_global.inits[i].id = i;
|
||||
cell_global.inits[i].num_spus = cell->num_spus;
|
||||
cell_global.inits[i].debug_flags = cell->debug_flags;
|
||||
cell_global.inits[i].cmd = &cell_global.command[i];
|
||||
|
||||
for (j = 0; j < CELL_NUM_BUFFERS; j++) {
|
||||
cell_global.inits[i].buffers[j] = cell->buffer[j];
|
||||
}
|
||||
|
||||
@@ -50,10 +50,9 @@ struct cell_global_info
|
||||
pthread_t spe_threads[MAX_SPUS];
|
||||
|
||||
/**
|
||||
* Data sent to SPUs
|
||||
* Data sent to SPUs at start-up
|
||||
*/
|
||||
struct cell_init_info inits[MAX_SPUS];
|
||||
struct cell_command command[MAX_SPUS];
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -669,38 +669,19 @@ cmd_batch(uint opcode)
|
||||
void
|
||||
command_loop(void)
|
||||
{
|
||||
struct cell_command cmd;
|
||||
int exitFlag = 0;
|
||||
|
||||
D_PRINTF(CELL_DEBUG_CMD, "Enter command loop\n");
|
||||
|
||||
ASSERT((sizeof(struct cell_command) & 0xf) == 0);
|
||||
ASSERT_ALIGN16(&cmd);
|
||||
|
||||
while (!exitFlag) {
|
||||
unsigned opcode;
|
||||
int tag = 0;
|
||||
|
||||
D_PRINTF(CELL_DEBUG_CMD, "Wait for cmd...\n");
|
||||
|
||||
/* read/wait from mailbox */
|
||||
opcode = (unsigned int) spu_read_in_mbox();
|
||||
|
||||
D_PRINTF(CELL_DEBUG_CMD, "got cmd 0x%x\n", opcode);
|
||||
|
||||
/* command payload */
|
||||
mfc_get(&cmd, /* dest */
|
||||
(unsigned int) spu.init.cmd, /* src */
|
||||
sizeof(struct cell_command), /* bytes */
|
||||
tag,
|
||||
0, /* tid */
|
||||
0 /* rid */);
|
||||
wait_on_mask( 1 << tag );
|
||||
|
||||
/*
|
||||
* NOTE: most commands should be contained in a batch buffer
|
||||
*/
|
||||
|
||||
switch (opcode & CELL_CMD_OPCODE_MASK) {
|
||||
case CELL_CMD_EXIT:
|
||||
D_PRINTF(CELL_DEBUG_CMD, "EXIT\n");
|
||||
|
||||
Reference in New Issue
Block a user