[Mesa-dev] [PATCH 3/3] isl: Make radv_finishme only warn once per call-site

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Thu Nov 24 18:35:48 UTC 2016


You might want to rename the title of this patch.

- Bas

On Thu, Nov 24, 2016 at 7:18 PM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> From: Emil Velikov <emil.velikov at collabora.com>
>
> Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
> ---
>  src/intel/isl/isl_priv.h | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/src/intel/isl/isl_priv.h b/src/intel/isl/isl_priv.h
> index dc3975d..1867d25 100644
> --- a/src/intel/isl/isl_priv.h
> +++ b/src/intel/isl/isl_priv.h
> @@ -33,7 +33,13 @@
>  #include "isl.h"
>
>  #define isl_finishme(format, ...) \
> -   __isl_finishme(__FILE__, __LINE__, format, ##__VA_ARGS__)
> +   do { \
> +      static bool reported = false; \
> +      if (!reported) { \
> +         __isl_finishme(__FILE__, __LINE__, format, ##__VA_ARGS__); \
> +         reported = true; \
> +      } \
> +   } while (0)
>
>  void PRINTFLIKE(3, 4) UNUSED
>  __isl_finishme(const char *file, int line, const char *fmt, ...);
> --
> 2.10.2
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list