vk: Move the valgrind include and VG() macro to private.h
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 10 Jun 2015 04:13:36 +0000 (21:13 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 10 Jun 2015 04:51:37 +0000 (21:51 -0700)
src/vulkan/allocator.c
src/vulkan/gem.c
src/vulkan/private.h

index 80079ad82e4ce9a6083eee469d058d6052b66230..8752edac91dbb52cd7ddcd30b43be9b584870d89 100644 (file)
@@ -37,9 +37,6 @@
 #include "private.h"
 
 #ifdef HAVE_VALGRIND
-#include <valgrind.h>
-#include <memcheck.h>
-#define VG(x) x
 #define VG_NOACCESS_READ(__ptr) ({                       \
    VALGRIND_MAKE_MEM_DEFINED((__ptr), sizeof(*(__ptr))); \
    __typeof(*(__ptr)) __val = *(__ptr);                  \
@@ -52,7 +49,6 @@
    VALGRIND_MAKE_MEM_NOACCESS((__ptr), sizeof(*(__ptr)));   \
 })
 #else
-#define VG(x)
 #define VG_NOACCESS_READ(__ptr) (*(__ptr))
 #define VG_NOACCESS_WRITE(__ptr, __val) (*(__ptr) = (__val))
 #endif
index ab6f5c4dfbd108b487b3bedc5f4a57ebca7837ee..7bc5e49a8109781c3fc6606b9b00aa2a1dac4e3a 100644 (file)
 
 #include "private.h"
 
-#ifdef HAVE_VALGRIND
-#include <valgrind.h>
-#include <memcheck.h>
-#define VG(x) x
-#else
-#define VG(x)
-#endif
-
 #define VG_CLEAR(s) VG(memset(&s, 0, sizeof(s)))
 
 static int
index 36279fac2cbdf96e510bf104baff3f36abd6d37d..84c0524ad3c25222c1666e07f9a0aed1f66572f8 100644 (file)
 #include <assert.h>
 #include <i915_drm.h>
 
+#ifdef HAVE_VALGRIND
+#include <valgrind.h>
+#include <memcheck.h>
+#define VG(x) x
+#else
+#define VG(x)
+#endif
+
 #include "brw_device_info.h"
 #include "util/macros.h"