vk: Move the valgrind include and VG() macro to private.h

This commit is contained in:
Jason Ekstrand
2015-06-09 21:13:36 -07:00
parent e17ed04b03
commit d5ad24e39b
3 changed files with 8 additions and 12 deletions
-4
View 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
-8
View File
@@ -32,14 +32,6 @@
#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
+8
View File
@@ -30,6 +30,14 @@
#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"