Re: [Mesa-dev] [PATCH 2/2] gallium/ddebug: regularly log the total number of draw calls

2015-12-11 Thread Marek Olšák
For the series:
Reviewed-by: Marek Olšák 

On Thu, Dec 10, 2015 at 2:11 AM, Nicolai Hähnle  wrote:
> From: Nicolai Hähnle 
>
> This helps in the use of GALLIUM_DDEBUG_SKIP: first run a target application
> with skip set to a very large number and note how many draw calls happen
> before the bug. Then re-run, skipping the corresponding number of calls.
> Despite the additional run, this can still be much faster than not skipping
> anything.
> ---
>  src/gallium/drivers/ddebug/dd_draw.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/src/gallium/drivers/ddebug/dd_draw.c 
> b/src/gallium/drivers/ddebug/dd_draw.c
> index 0778099..0d7ee9a 100644
> --- a/src/gallium/drivers/ddebug/dd_draw.c
> +++ b/src/gallium/drivers/ddebug/dd_draw.c
> @@ -623,6 +623,9 @@ dd_after_draw(struct dd_context *dctx, struct dd_call 
> *call)
> }
>
> ++dctx->num_draw_calls;
> +   if (dscreen->skip_count && dctx->num_draw_calls % 1 == 0)
> +  fprintf(stderr, "Gallium debugger reached %u draw calls.\n",
> +  dctx->num_draw_calls);
>  }
>
>  static void
> --
> 2.5.0
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 2/2] gallium/ddebug: regularly log the total number of draw calls

2015-12-09 Thread Nicolai Hähnle
From: Nicolai Hähnle 

This helps in the use of GALLIUM_DDEBUG_SKIP: first run a target application
with skip set to a very large number and note how many draw calls happen
before the bug. Then re-run, skipping the corresponding number of calls.
Despite the additional run, this can still be much faster than not skipping
anything.
---
 src/gallium/drivers/ddebug/dd_draw.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/gallium/drivers/ddebug/dd_draw.c 
b/src/gallium/drivers/ddebug/dd_draw.c
index 0778099..0d7ee9a 100644
--- a/src/gallium/drivers/ddebug/dd_draw.c
+++ b/src/gallium/drivers/ddebug/dd_draw.c
@@ -623,6 +623,9 @@ dd_after_draw(struct dd_context *dctx, struct dd_call *call)
}
 
++dctx->num_draw_calls;
+   if (dscreen->skip_count && dctx->num_draw_calls % 1 == 0)
+  fprintf(stderr, "Gallium debugger reached %u draw calls.\n",
+  dctx->num_draw_calls);
 }
 
 static void
-- 
2.5.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev