diff options
author | Brian <brian.paul@tungstengraphics.com> | 2008-01-25 08:17:52 -0700 |
---|---|---|
committer | Brian <brian.paul@tungstengraphics.com> | 2008-01-25 08:20:10 -0700 |
commit | 235da629dceb23bfddea1eadfcf771d2794d6119 (patch) | |
tree | 12bb5e34b092ae19fa62dc89433fca5ae6dfea83 /src/mesa/pipe/cell/spu/spu_main.c | |
parent | 4c4f691069411c77b33a6bfca64766f861cbc823 (diff) |
Cell: propogate vertex info to SPUs, use it for attrib interpolation
Diffstat (limited to 'src/mesa/pipe/cell/spu/spu_main.c')
-rw-r--r-- | src/mesa/pipe/cell/spu/spu_main.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/mesa/pipe/cell/spu/spu_main.c b/src/mesa/pipe/cell/spu/spu_main.c index 1d0de7b1f9..880f8de550 100644 --- a/src/mesa/pipe/cell/spu/spu_main.c +++ b/src/mesa/pipe/cell/spu/spu_main.c @@ -391,6 +391,17 @@ cmd_state_sampler(const struct pipe_sampler_state *state) static void +cmd_state_vertex_info(const struct vertex_info *vinfo) +{ + if (Debug) + printf("SPU %u: VERTEX_INFO num_attribs=%u\n", spu.init.id, + vinfo->num_attribs); + memcpy(&spu.vertex_info, vinfo, sizeof(*vinfo)); +} + + + +static void cmd_finish(void) { if (Debug) @@ -472,7 +483,6 @@ cmd_batch(uint opcode) /* Tell PPU we're done copying the buffer to local store */ release_batch_buffer(buf); - for (pos = 0; pos < usize; /* no incr */) { switch (buffer[pos]) { case CELL_CMD_FRAMEBUFFER: @@ -509,10 +519,13 @@ cmd_batch(uint opcode) pos += (1 + sizeof(struct pipe_depth_stencil_alpha_state) / 4); break; case CELL_CMD_STATE_SAMPLER: - cmd_state_sampler((struct pipe_sampler_state *) - &buffer[pos+1]); + cmd_state_sampler((struct pipe_sampler_state *) &buffer[pos+1]); pos += (1 + sizeof(struct pipe_sampler_state) / 4); break; + case CELL_CMD_STATE_VERTEX_INFO: + cmd_state_vertex_info((struct vertex_info *) &buffer[pos+1]); + pos += (1 + sizeof(struct vertex_info) / 4); + break; default: printf("SPU %u: bad opcode: 0x%x\n", spu.init.id, buffer[pos]); ASSERT(0); |