[Mesa-dev] [PATCH] i965: Use WARN_ONCE for the single-primitive-exceeded-aperture message.

Jason Ekstrand jason at jlekstrand.net
Tue Dec 30 13:08:55 PST 2014


Fine by me

Reviewed-by: Jason Ekstrand <jason.ekstrand at intel.com>

On Tue, Dec 30, 2014 at 12:23 PM, Kenneth Graunke <kenneth at whitecape.org>
wrote:

> This makes it show up via ARB_debug_output and is also less code.
>
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> ---
>  src/mesa/drivers/dri/i965/brw_draw.c | 13 ++++---------
>  1 file changed, 4 insertions(+), 9 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_draw.c
> b/src/mesa/drivers/dri/i965/brw_draw.c
> index c581cc0..5cd3f01 100644
> --- a/src/mesa/drivers/dri/i965/brw_draw.c
> +++ b/src/mesa/drivers/dri/i965/brw_draw.c
> @@ -520,15 +520,10 @@ retry:
>             fail_next = true;
>             goto retry;
>          } else {
> -           if (intel_batchbuffer_flush(brw) == -ENOSPC) {
> -              static bool warned = false;
> -
> -              if (!warned) {
> -                 fprintf(stderr, "i965: Single primitive emit exceeded"
> -                         "available aperture space\n");
> -                 warned = true;
> -              }
> -           }
> +            int ret = intel_batchbuffer_flush(brw);
> +            WARN_ONCE(ret == -ENOSPC,
> +                      "i965: Single primitive emit exceeded "
> +                      "available aperture space\n");
>          }
>        }
>
> --
> 2.2.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20141230/18c57af4/attachment.html>


More information about the mesa-dev mailing list