summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_draw.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2010-09-16 09:33:34 +1000
committerDave Airlie <[email protected]>2010-09-16 09:40:42 +1000
commit05433f20b6547e105d172bd586d3b6ce1b9d0f97 (patch)
tree548840c6141b94f5c8e0961f6d82cceb5135a404 /src/gallium/drivers/r600/r600_draw.c
parent0a7824862eb753878fa79b153b2a111884ff1197 (diff)
r600g: pull r600_draw struct out into header
we need this for future buffer rework, it also makes the vtbl easier
Diffstat (limited to 'src/gallium/drivers/r600/r600_draw.c')
-rw-r--r--src/gallium/drivers/r600/r600_draw.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/gallium/drivers/r600/r600_draw.c b/src/gallium/drivers/r600/r600_draw.c
index f24f30f6ffd..81ba584fbd3 100644
--- a/src/gallium/drivers/r600/r600_draw.c
+++ b/src/gallium/drivers/r600/r600_draw.c
@@ -37,17 +37,6 @@
#include "r600_resource.h"
#include "r600_state_inlines.h"
-struct r600_draw {
- struct pipe_context *ctx;
- struct radeon_state draw;
- struct radeon_state vgt;
- unsigned mode;
- unsigned start;
- unsigned count;
- unsigned index_size;
- struct pipe_resource *index_buffer;
-};
-
static int r600_draw_common(struct r600_draw *draw)
{
struct r600_context *rctx = r600_context(draw->ctx);
@@ -110,11 +99,10 @@ static int r600_draw_common(struct r600_draw *draw)
}
rctx->vs_nresource = rctx->vertex_elements->count;
/* FIXME start need to change winsys */
- rctx->vtbl->vgt_init(rctx, &draw->draw, (struct r600_resource *)draw->index_buffer,
- draw->count, vgt_draw_initiator);
+ rctx->vtbl->vgt_init(draw, vgt_draw_initiator);
radeon_draw_bind(&rctx->draw, &draw->draw);
- rctx->vtbl->vgt_prim(rctx, &draw->vgt, prim, draw->start, vgt_dma_index_type);
+ rctx->vtbl->vgt_prim(draw, prim, vgt_dma_index_type);
radeon_draw_bind(&rctx->draw, &draw->vgt);
r = radeon_ctx_set_draw(&rctx->ctx, &rctx->draw);