diff options
author | Jerome Glisse <glisse@freedesktop.org> | 2006-07-27 22:51:14 +0000 |
---|---|---|
committer | Jerome Glisse <glisse@freedesktop.org> | 2006-07-27 22:51:14 +0000 |
commit | 32d61d06164c6247bed0fbf301afd24ce5d3473e (patch) | |
tree | 3ca10bfe010c32e44752ba4ecc2268a1bdb22adc /src/mesa/drivers/dri/r300/r300_cmdbuf.c | |
parent | a7722cb794be008f930c5f071f66fc14b38af65a (diff) |
r300_emit.h cleanup.
Remove unused macro
Replace LOCAL_VAR, PREFIX*
Indent code
Remove radeon redundant CP type 3 packet
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_cmdbuf.c')
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_cmdbuf.c | 53 |
1 files changed, 29 insertions, 24 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_cmdbuf.c b/src/mesa/drivers/dri/r300/r300_cmdbuf.c index f39f71584c..1b1d2bfb03 100644 --- a/src/mesa/drivers/dri/r300/r300_cmdbuf.c +++ b/src/mesa/drivers/dri/r300/r300_cmdbuf.c @@ -635,30 +635,35 @@ void r300EmitWait(r300ContextPtr rmesa, GLuint flags) void r300EmitAOS(r300ContextPtr rmesa, GLuint nr, GLuint offset) { - int sz = 1 + (nr >> 1) * 3 + (nr & 1) * 2; - int i; - LOCAL_VARS - - if (RADEON_DEBUG & DEBUG_VERTS) - fprintf(stderr, "%s: nr=%d, ofs=0x%08x\n", __func__, nr, offset); - - start_packet3(RADEON_CP_PACKET3_3D_LOAD_VBPNTR, sz-1); - e32(nr); - for(i=0;i+1<nr;i+=2){ - e32( (rmesa->state.aos[i].aos_size << 0) - |(rmesa->state.aos[i].aos_stride << 8) - |(rmesa->state.aos[i+1].aos_size << 16) - |(rmesa->state.aos[i+1].aos_stride << 24) - ); - e32(rmesa->state.aos[i].aos_offset+offset*4*rmesa->state.aos[i].aos_stride); - e32(rmesa->state.aos[i+1].aos_offset+offset*4*rmesa->state.aos[i+1].aos_stride); - } - if(nr & 1){ - e32( (rmesa->state.aos[nr-1].aos_size << 0) - |(rmesa->state.aos[nr-1].aos_stride << 8) - ); - e32(rmesa->state.aos[nr-1].aos_offset+offset*4*rmesa->state.aos[nr-1].aos_stride); - } + int sz = 1 + (nr >> 1) * 3 + (nr & 1) * 2; + int i; + int cmd_reserved = 0; + int cmd_written = 0; + drm_radeon_cmd_header_t *cmd = NULL; + + if (RADEON_DEBUG & DEBUG_VERTS) + fprintf(stderr, "%s: nr=%d, ofs=0x%08x\n", __func__, nr, offset); + + start_packet3(RADEON_CP_PACKET3_3D_LOAD_VBPNTR, sz-1); + e32(nr); + for(i=0;i+1<nr;i+=2){ + e32( (rmesa->state.aos[i].aos_size << 0) + |(rmesa->state.aos[i].aos_stride << 8) + |(rmesa->state.aos[i+1].aos_size << 16) + |(rmesa->state.aos[i+1].aos_stride << 24) + ); + e32(rmesa->state.aos[i].aos_offset + + offset*4*rmesa->state.aos[i].aos_stride); + e32(rmesa->state.aos[i+1].aos_offset + + offset*4*rmesa->state.aos[i+1].aos_stride); + } + if(nr & 1){ + e32( (rmesa->state.aos[nr-1].aos_size << 0) + |(rmesa->state.aos[nr-1].aos_stride << 8) + ); + e32(rmesa->state.aos[nr-1].aos_offset + + offset*4*rmesa->state.aos[nr-1].aos_stride); + } } |