[Mesa-dev] [PATCH 11/18] radeonsi: add a debug flag that disables printing TGSI in shader dumps

Dave Airlie airlied at gmail.com
Tue Jul 28 17:38:51 PDT 2015


On 28 July 2015 at 20:05, Marek Olšák <maraeo at gmail.com> wrote:
> From: Marek Olšák <marek.olsak at amd.com>

Looks good,

Reviewed-by: Dave Airlie <airlied at redhat.com>
>
> ---
>  src/gallium/drivers/radeon/r600_pipe_common.c | 1 +
>  src/gallium/drivers/radeon/r600_pipe_common.h | 1 +
>  src/gallium/drivers/radeonsi/si_shader.c      | 2 +-
>  3 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c
> index c1dbdc7..d0162b5 100644
> --- a/src/gallium/drivers/radeon/r600_pipe_common.c
> +++ b/src/gallium/drivers/radeon/r600_pipe_common.c
> @@ -336,6 +336,7 @@ static const struct debug_named_value common_debug_options[] = {
>         { "tcs", DBG_TCS, "Print tessellation control shaders" },
>         { "tes", DBG_TES, "Print tessellation evaluation shaders" },
>         { "noir", DBG_NO_IR, "Don't print the LLVM IR"},
> +       { "notgsi", DBG_NO_TGSI, "Don't print the TGSI"},
>
>         /* features */
>         { "nodma", DBG_NO_ASYNC_DMA, "Disable asynchronous DMA" },
> diff --git a/src/gallium/drivers/radeon/r600_pipe_common.h b/src/gallium/drivers/radeon/r600_pipe_common.h
> index 76ac057..e296b04 100644
> --- a/src/gallium/drivers/radeon/r600_pipe_common.h
> +++ b/src/gallium/drivers/radeon/r600_pipe_common.h
> @@ -82,6 +82,7 @@
>  #define DBG_TCS                        (1 << 10)
>  #define DBG_TES                        (1 << 11)
>  #define DBG_NO_IR              (1 << 12)
> +#define DBG_NO_TGSI            (1 << 13)
>  /* Bits 21-31 are reserved for the r600g driver. */
>  /* features */
>  #define DBG_NO_ASYNC_DMA       (1llu << 32)
> diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
> index fcce033..bc4138c 100644
> --- a/src/gallium/drivers/radeonsi/si_shader.c
> +++ b/src/gallium/drivers/radeonsi/si_shader.c
> @@ -3730,7 +3730,7 @@ int si_shader_create(struct si_screen *sscreen, LLVMTargetMachineRef tm,
>
>         /* Dump TGSI code before doing TGSI->LLVM conversion in case the
>          * conversion fails. */
> -       if (dump) {
> +       if (dump && !(sscreen->b.debug_flags & DBG_NO_TGSI)) {
>                 si_dump_key(sel->type, &shader->key);
>                 tgsi_dump(tokens, 0);
>                 si_dump_streamout(&sel->so);
> --
> 2.1.4
>
> _______________________________________________
> 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