freedreno/a3xx: add debug callback to emit
authorRob Clark <robclark@freedesktop.org>
Sun, 24 Apr 2016 20:45:15 +0000 (16:45 -0400)
committerRob Clark <robclark@freedesktop.org>
Sat, 30 Apr 2016 18:56:19 +0000 (14:56 -0400)
Signed-off-by: Rob Clark <robclark@freedesktop.org>
src/gallium/drivers/freedreno/a3xx/fd3_draw.c
src/gallium/drivers/freedreno/a3xx/fd3_emit.h
src/gallium/drivers/freedreno/a3xx/fd3_gmem.c

index ae36d137828498c28366c07e3b54aac48d15d208..b6c3ea674e6e068ba47ef0d137a3ce19d86f283f 100644 (file)
@@ -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 = {
index 5dbb11599b564824b89ef6d74c7d8ce5bd89284b..42dbfca9b979510f53146a8d0b82921860013c45 100644 (file)
@@ -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;
index 815a310df8320b52daaed8c7c2b328c0d9b3bbae..81a613fa87028ad21a6ff09cf08c4a2518683734 100644 (file)
@@ -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. */