diff options
author | Vladimir Dergachev <volodya@freedesktop.org> | 2005-01-11 04:11:05 +0000 |
---|---|---|
committer | Vladimir Dergachev <volodya@freedesktop.org> | 2005-01-11 04:11:05 +0000 |
commit | 864137984a80b2ad2c26d54f9281546b4b43c6ae (patch) | |
tree | b49f5b29ecc2154d2219b9c5167f930a2db26c4c /src/mesa/drivers/dri/r300/r300_emit.h | |
parent | 086ca3dffbf0003eac20fe5fe6fbcf993c414f0b (diff) |
Move the few definitions from r300_lib.h still in use to r300_emit.h.
Rework *vb* function to not use AOS_ARRAY structure, but rather work directly with r300->state.aos.
Remove references to r300_lib.h and r300_lib.c
Remove r300_lib.[c,h].
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_emit.h')
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_emit.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_emit.h b/src/mesa/drivers/dri/r300/r300_emit.h index e0c77373ad..6433944e19 100644 --- a/src/mesa/drivers/dri/r300/r300_emit.h +++ b/src/mesa/drivers/dri/r300/r300_emit.h @@ -202,4 +202,45 @@ cmd=(drm_radeon_cmd_header_t *) r300AllocCmdBuf(rmesa, \ cmd[0].i=cmdcpdelay(count); } +/* fire vertex buffer */ +static void inline fire_AOS(PREFIX int vertex_count, int type) +{ +LOCAL_VARS +check_space(9); + +start_packet3(RADEON_CP_PACKET3_3D_DRAW_VBUF_2, 0); +/* e32(0x840c0024); */ + e32(R300_VAP_VF_CNTL__PRIM_WALK_VERTEX_LIST | (vertex_count<<16) | type); +} + +/* these are followed by the corresponding data */ +#define start_index32_packet(vertex_count, type) \ + {\ + int _vc;\ + _vc=(vertex_count); \ + start_packet3(RADEON_CP_PACKET3_3D_DRAW_INDX_2, _vc); \ + e32(R300_VAP_VF_CNTL__PRIM_WALK_INDICES | (_vc<<16) | type \ + | R300_VAP_VF_CNTL__INDEX_SIZE_32bit); \ + } + +#define start_index16_packet(vertex_count, type) \ + {\ + int _vc, _n;\ + _vc=(vertex_count); \ + _n=(vertex_count+1)>>1; \ + start_packet3(RADEON_CP_PACKET3_3D_DRAW_INDX_2, _n); \ + e32(R300_VAP_VF_CNTL__PRIM_WALK_INDICES | (_vc<<16) | type); \ + } + +/* Interestingly enough this ones needs the call to setup_AOS, even thought + some of the data so setup is not needed and some is not as arbitrary + as when used by DRAW_VBUF_2 or DRAW_INDX_2 */ +#define start_immediate_packet(vertex_count, type, vertex_size) \ + {\ + int _vc; \ + _vc=(vertex_count); \ + start_packet3(RADEON_CP_PACKET3_3D_DRAW_IMMD_2, _vc*(vertex_size)); \ + e32(R300_VAP_VF_CNTL__PRIM_WALK_VERTEX_EMBEDDED | (_vc<<16) | type); \ + } + #endif |