[Mesa-dev] [PATCH mesa v2] vc4: fix release build

Eric Anholt eric at anholt.net
Thu Oct 26 17:06:24 UTC 2017


Eric Engestrom <eric.engestrom at imgtec.com> 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 <eric at anholt.net>
> Signed-off-by: Eric Engestrom <eric.engestrom at imgtec.com>
> ---
> 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 <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20171026/ffc4e8f3/attachment.sig>


More information about the mesa-dev mailing list