summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/freedreno/freedreno_draw.c
diff options
context:
space:
mode:
authorRob Clark <robclark@freedesktop.org>2013-09-02 07:32:22 -0400
committerRob Clark <robclark@freedesktop.org>2013-09-14 13:31:58 -0400
commit74052347f3fe32053bed72d623e7216b7b7f5605 (patch)
treebf251495580ddf6b86bc43556b0a2df477fe1a48 /src/gallium/drivers/freedreno/freedreno_draw.c
parent4712904ddc9f735365acaeec584d7f596fcf2a0b (diff)
freedreno: fd_draw helper
Have a single helper that all draws come through.. mainly for a convenient debug and instrumentation point. Signed-off-by: Rob Clark <robclark@freedesktop.org>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_draw.c')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_draw.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_draw.c b/src/gallium/drivers/freedreno/freedreno_draw.c
index 4a98ab40f9e..d1f1c43d7b4 100644
--- a/src/gallium/drivers/freedreno/freedreno_draw.c
+++ b/src/gallium/drivers/freedreno/freedreno_draw.c
@@ -75,7 +75,6 @@ size2indextype(unsigned index_size)
void
fd_draw_emit(struct fd_context *ctx, const struct pipe_draw_info *info)
{
- struct fd_ringbuffer *ring = ctx->ring;
struct pipe_index_buffer *idx = &ctx->indexbuf;
struct fd_bo *idx_bo = NULL;
enum pc_di_index_size idx_type = INDEX_SIZE_IGN;
@@ -98,15 +97,8 @@ fd_draw_emit(struct fd_context *ctx, const struct pipe_draw_info *info)
src_sel = DI_SRC_SEL_AUTO_INDEX;
}
- OUT_PKT3(ring, CP_DRAW_INDX, info->indexed ? 5 : 3);
- OUT_RING(ring, 0x00000000); /* viz query info. */
- OUT_RING(ring, DRAW(mode2primtype(info->mode),
- src_sel, idx_type, IGNORE_VISIBILITY));
- OUT_RING(ring, info->count); /* NumIndices */
- if (info->indexed) {
- OUT_RELOC(ring, idx_bo, idx_offset, 0, 0);
- OUT_RING (ring, idx_size);
- }
+ fd_draw(ctx, mode2primtype(info->mode), src_sel, info->count,
+ idx_type, idx_size, idx_offset, idx_bo);
}
static void