[Mesa-dev] [PATCH] radeonsi: add support for trace buffer.

Marek Olšák maraeo at gmail.com
Thu Jul 24 15:29:00 PDT 2014


Reviewed-by: Marek Olšák <marek.olsak at amd.com>

Marek

On Fri, Jul 25, 2014 at 12:07 AM,  <j.glisse at gmail.com> wrote:
> From: Jérôme Glisse <jglisse at redhat.com>
>
> Trace buffer allow to dump a command buffer which is fully repliable
> as a standalone c program. This make debuging lockup immensively
> simpler. This patch only plug the core minimal stuff and is still
> missing the more fancy aspect that are in r600g. It however already
> proved useful in debuging hawaii.
>
> Signed-off-by: Jérôme Glisse <jglisse at redhat.com>
> ---
>  src/gallium/drivers/radeonsi/si_hw_context.c | 2 +-
>  src/gallium/drivers/radeonsi/si_pipe.c       | 3 ++-
>  2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/src/gallium/drivers/radeonsi/si_hw_context.c b/src/gallium/drivers/radeonsi/si_hw_context.c
> index 56fa664..c947cd0 100644
> --- a/src/gallium/drivers/radeonsi/si_hw_context.c
> +++ b/src/gallium/drivers/radeonsi/si_hw_context.c
> @@ -115,7 +115,7 @@ void si_context_gfx_flush(void *context, unsigned flags,
>  #endif
>
>         /* Flush the CS. */
> -       ctx->b.ws->cs_flush(cs, flags, fence, 0);
> +       ctx->b.ws->cs_flush(cs, flags, fence, ctx->screen->b.cs_count++);
>         ctx->b.rings.gfx.flushing = false;
>
>  #if SI_TRACE_CS
> diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
> index 4f19268..2a7049b 100644
> --- a/src/gallium/drivers/radeonsi/si_pipe.c
> +++ b/src/gallium/drivers/radeonsi/si_pipe.c
> @@ -98,7 +98,8 @@ static struct pipe_context *si_create_context(struct pipe_screen *screen, void *
>         }
>
>         sctx->b.rings.gfx.cs = ws->cs_create(ws, RING_GFX, si_context_gfx_flush,
> -                                            sctx, NULL);
> +                                            sctx, sscreen->b.trace_bo ?
> +                                            sscreen->b.trace_bo->cs_buf : NULL);
>         sctx->b.rings.gfx.flush = si_context_gfx_flush;
>
>         si_init_all_descriptors(sctx);
> --
> 1.9.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list