Eric Engestrom <[email protected]> writes:

> Mesa's DEBUG and assert's NDEBUG are not tied to each other, so we need
> to explicitly compile this code out.
>
> Fixes: 3df78928786134874eafa "vc4: Drop reloc_count tracking for debug
>        asserts on non-debug builds."
> Cc: Eric Anholt <[email protected]>
> Signed-off-by: Eric Engestrom <[email protected]>
> ---
> Changes in v2:
> - change DEBUG into !NDEBUG instead (Anholt)
> ---
>  src/gallium/drivers/vc4/vc4_cl.c |  2 ++
>  src/gallium/drivers/vc4/vc4_cl.h | 12 ++++++------
>  2 files changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/src/gallium/drivers/vc4/vc4_cl.c 
> b/src/gallium/drivers/vc4/vc4_cl.c
> index 508281a27bba34646997..7c1e3f277e42d3dba05a 100644
> --- a/src/gallium/drivers/vc4/vc4_cl.c
> +++ b/src/gallium/drivers/vc4/vc4_cl.c
> @@ -52,7 +52,9 @@ cl_ensure_space(struct vc4_cl *cl, uint32_t space)
>  void
>  vc4_reset_cl(struct vc4_cl *cl)
>  {
> +#ifdef DEBUG
>          assert(cl->reloc_count == 0);
> +#endif
>          cl->next = cl->base;
>  }

With this #ifdef hunk droppped, the patch is:

Reviewed-by: Eric Anholt <[email protected]>

Attachment: signature.asc
Description: PGP signature

_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to