[Mesa-dev] [PATCH 1/2] radeonsi: Print "LLVM emitted unknown config register" warning only once

Marek Olšák maraeo at gmail.com
Fri Jan 15 07:26:00 PST 2016


For the series:

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

On Fri, Jan 15, 2016 at 4:23 AM, Michel Dänzer <michel at daenzer.net> wrote:
> From: Michel Dänzer <michel.daenzer at amd.com>
>
> Say "LLVM" instead of "Compiler" for clarity.
>
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
> ---
>  src/gallium/drivers/radeonsi/si_shader.c | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
> index cc9718e..3ab054c 100644
> --- a/src/gallium/drivers/radeonsi/si_shader.c
> +++ b/src/gallium/drivers/radeonsi/si_shader.c
> @@ -3735,8 +3735,15 @@ void si_shader_binary_read_config(struct radeon_shader_binary *binary,
>                                 G_00B860_WAVESIZE(value) * 256 * 4 * 1;
>                         break;
>                 default:
> -                       fprintf(stderr, "Warning: Compiler emitted unknown "
> -                               "config register: 0x%x\n", reg);
> +                       {
> +                               static bool printed;
> +
> +                               if (!printed) {
> +                                       fprintf(stderr, "Warning: LLVM emitted unknown "
> +                                               "config register: 0x%x\n", reg);
> +                                       printed = true;
> +                               }
> +                       }
>                         break;
>                 }
>         }
> --
> 2.6.2
>
> _______________________________________________
> 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