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 ae36d13..b6c3ea6 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 5dbb115..42dbfca 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 815a310..81a613f 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. */