From 51f20dd279f420492779e4256b111d65f6fc0917 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Sun, 24 Apr 2016 16:45:15 -0400 Subject: [PATCH] freedreno/a3xx: add debug callback to emit Signed-off-by: Rob Clark --- src/gallium/drivers/freedreno/a3xx/fd3_draw.c | 3 +++ src/gallium/drivers/freedreno/a3xx/fd3_emit.h | 1 + src/gallium/drivers/freedreno/a3xx/fd3_gmem.c | 3 +++ 3 files changed, 7 insertions(+) diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_draw.c b/src/gallium/drivers/freedreno/a3xx/fd3_draw.c index ae36d137828..b6c3ea674e6 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_draw.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_draw.c @@ -139,6 +139,7 @@ fd3_draw_vbo(struct fd_context *ctx, const struct pipe_draw_info *info) { struct fd3_context *fd3_ctx = fd3_context(ctx); struct fd3_emit emit = { + .debug = &ctx->debug, .vtx = &ctx->vtx, .prog = &ctx->prog, .info = info, @@ -209,6 +210,7 @@ fd3_clear_binning(struct fd_context *ctx, unsigned dirty) struct fd3_context *fd3_ctx = fd3_context(ctx); struct fd_ringbuffer *ring = ctx->binning_ring; struct fd3_emit emit = { + .debug = &ctx->debug, .vtx = &fd3_ctx->solid_vbuf_state, .prog = &ctx->solid_prog, .key = { @@ -251,6 +253,7 @@ fd3_clear(struct fd_context *ctx, unsigned buffers, unsigned dirty = ctx->dirty; unsigned i; struct fd3_emit emit = { + .debug = &ctx->debug, .vtx = &fd3_ctx->solid_vbuf_state, .prog = &ctx->solid_prog, .key = { diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_emit.h b/src/gallium/drivers/freedreno/a3xx/fd3_emit.h index 5dbb11599b5..42dbfca9b97 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_emit.h +++ b/src/gallium/drivers/freedreno/a3xx/fd3_emit.h @@ -47,6 +47,7 @@ void fd3_emit_gmem_restore_tex(struct fd_ringbuffer *ring, /* grouped together emit-state for prog/vertex/state emit: */ struct fd3_emit { + struct pipe_debug_callback *debug; const struct fd_vertex_state *vtx; const struct fd_program_stateobj *prog; const struct pipe_draw_info *info; diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c b/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c index 815a310df83..81a613fa870 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c @@ -160,6 +160,7 @@ emit_binning_workaround(struct fd_context *ctx) struct fd_gmem_stateobj *gmem = &ctx->gmem; struct fd_ringbuffer *ring = ctx->ring; struct fd3_emit emit = { + .debug = &ctx->debug, .vtx = &fd3_ctx->solid_vbuf_state, .prog = &ctx->solid_prog, .key = { @@ -351,6 +352,7 @@ fd3_emit_tile_gmem2mem(struct fd_context *ctx, struct fd_tile *tile) struct fd_ringbuffer *ring = ctx->ring; struct pipe_framebuffer_state *pfb = &ctx->framebuffer; struct fd3_emit emit = { + .debug = &ctx->debug, .vtx = &fd3_ctx->solid_vbuf_state, .prog = &ctx->solid_prog, .key = { @@ -532,6 +534,7 @@ fd3_emit_tile_mem2gmem(struct fd_context *ctx, struct fd_tile *tile) struct fd_ringbuffer *ring = ctx->ring; struct pipe_framebuffer_state *pfb = &ctx->framebuffer; struct fd3_emit emit = { + .debug = &ctx->debug, .vtx = &fd3_ctx->blit_vbuf_state, .sprite_coord_enable = 1, /* NOTE: They all use the same VP, this is for vtx bufs. */ -- 2.30.2