broadcom/vc4: Fix release build
authorEric Anholt <eric@anholt.net>
Wed, 27 Sep 2017 20:01:04 +0000 (13:01 -0700)
committerEric Anholt <eric@anholt.net>
Wed, 27 Sep 2017 20:03:14 +0000 (13:03 -0700)
I remember thinking "gosh, it would be nice if I could do a kernel-style
'if (!IS_ENABLED(DEBUG))' instead of using an #ifdef, so the code was
compiled on both builds", and then forgot to test a release build anyway.

Fixes: a8fd58eae596 ("vc4: Add labels to BOs for debug builds or with VC4_DEBUG=surf set.")
Reported-by: Derek Foreman <derekf@osg.samsung.com>
src/gallium/drivers/vc4/vc4_bufmgr.c

index 9c4cc4cba88cef4aeee87e2b911c336fa3054857..b300fa5bd025e43d91e2e1ff48637a2332d50d12 100644 (file)
@@ -56,7 +56,7 @@ vc4_bo_label(struct vc4_screen *screen, struct vc4_bo *bo, const char *fmt, ...)
          * (for debugging a single app's allocation).
          */
 #ifndef DEBUG
-        if (!(VC4_DEBUG & VC4_DEBUG_SURFACE))
+        if (!(vc4_debug & VC4_DEBUG_SURFACE))
                 return;
 #endif
         va_list va;