iris: disable __gen_validate_value in release mode
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 7 Jun 2018 22:33:52 +0000 (15:33 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:06 +0000 (10:26 -0800)
src/gallium/drivers/iris/iris_state.c

index 702c6ce0c0fec3ae9b6cf9c00307bc946eb97534..f3a73aeb81af718b724dbbb28e97e1c7b6d212b7 100644 (file)
 #include <stdio.h>
 #include <errno.h>
 
-#ifdef HAVE_VALGRIND
+#if HAVE_VALGRIND
 #include <valgrind.h>
 #include <memcheck.h>
 #define VG(x) x
+#ifndef NDEBUG
 #define __gen_validate_value(x) VALGRIND_CHECK_MEM_IS_DEFINED(&(x), sizeof(x))
+#endif
 #else
 #define VG(x)
 #endif