[Mesa-dev] [PATCH 04/11] ddebug: implement dd_dump_launch_grid

Nicolai Hähnle nhaehnle at gmail.com
Mon May 8 15:35:54 UTC 2017


From: Nicolai Hähnle <nicolai.haehnle at amd.com>

---
 src/gallium/drivers/ddebug/dd_context.c | 2 ++
 src/gallium/drivers/ddebug/dd_draw.c    | 6 +++++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/ddebug/dd_context.c b/src/gallium/drivers/ddebug/dd_context.c
index 723e90e..854ff51 100644
--- a/src/gallium/drivers/ddebug/dd_context.c
+++ b/src/gallium/drivers/ddebug/dd_context.c
@@ -346,20 +346,22 @@ static void * \
 dd_context_create_compute_state(struct pipe_context *_pipe,
                                  const struct pipe_compute_state *state)
 {
    struct pipe_context *pipe = dd_context(_pipe)->pipe;
    struct dd_state *hstate = CALLOC_STRUCT(dd_state);
 
    if (!hstate)
       return NULL;
    hstate->cso = pipe->create_compute_state(pipe, state);
 
+   hstate->state.shader.type = state->ir_type;
+
    if (state->ir_type == PIPE_SHADER_IR_TGSI)
       hstate->state.shader.tokens = tgsi_dup_tokens(state->prog);
 
    return hstate;
 }
 
 DD_SHADER_NOCREATE(COMPUTE, compute)
 
 /********************************************************************
  * immediate states
diff --git a/src/gallium/drivers/ddebug/dd_draw.c b/src/gallium/drivers/ddebug/dd_draw.c
index 291ce89..63f1157 100644
--- a/src/gallium/drivers/ddebug/dd_draw.c
+++ b/src/gallium/drivers/ddebug/dd_draw.c
@@ -366,21 +366,25 @@ dd_dump_draw_vbo(struct dd_draw_state *dstate, struct pipe_draw_info *info, FILE
       fprintf(f, "    ");
       DUMP(resource, dstate->framebuffer_state.zsbuf->texture);
    }
    fprintf(f, "\n");
 }
 
 static void
 dd_dump_launch_grid(struct dd_draw_state *dstate, struct pipe_grid_info *info, FILE *f)
 {
    fprintf(f, "%s:\n", __func__+8);
-   /* TODO */
+   DUMP(grid_info, info);
+   fprintf(f, "\n");
+
+   dd_dump_shader(dstate, PIPE_SHADER_COMPUTE, f);
+   fprintf(f, "\n");
 }
 
 static void
 dd_dump_resource_copy_region(struct dd_draw_state *dstate,
                              struct call_resource_copy_region *info,
                              FILE *f)
 {
    fprintf(f, "%s:\n", __func__+8);
    DUMP_M(resource, info, dst);
    DUMP_M(uint, info, dst_level);
-- 
2.9.3



More information about the mesa-dev mailing list