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

Eric Engestrom eric.engestrom at imgtec.com
Wed Oct 25 16:09:37 UTC 2017


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>
---
 src/gallium/drivers/vc4/vc4_cl.c | 2 ++
 1 file changed, 2 insertions(+)

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;
 }
 
-- 
Cheers,
  Eric



More information about the mesa-dev mailing list