From: Jason Ekstrand Date: Wed, 10 Jun 2015 04:13:36 +0000 (-0700) Subject: vk: Move the valgrind include and VG() macro to private.h X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d5ad24e39b704525f1f39dd75b2092801c1c6124;p=mesa.git vk: Move the valgrind include and VG() macro to private.h --- diff --git a/src/vulkan/allocator.c b/src/vulkan/allocator.c index 80079ad82e4..8752edac91d 100644 --- a/src/vulkan/allocator.c +++ b/src/vulkan/allocator.c @@ -37,9 +37,6 @@ #include "private.h" #ifdef HAVE_VALGRIND -#include -#include -#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 diff --git a/src/vulkan/gem.c b/src/vulkan/gem.c index ab6f5c4dfbd..7bc5e49a810 100644 --- a/src/vulkan/gem.c +++ b/src/vulkan/gem.c @@ -32,14 +32,6 @@ #include "private.h" -#ifdef HAVE_VALGRIND -#include -#include -#define VG(x) x -#else -#define VG(x) -#endif - #define VG_CLEAR(s) VG(memset(&s, 0, sizeof(s))) static int diff --git a/src/vulkan/private.h b/src/vulkan/private.h index 36279fac2cb..84c0524ad3c 100644 --- a/src/vulkan/private.h +++ b/src/vulkan/private.h @@ -30,6 +30,14 @@ #include #include +#ifdef HAVE_VALGRIND +#include +#include +#define VG(x) x +#else +#define VG(x) +#endif + #include "brw_device_info.h" #include "util/macros.h"