vk/allocator: Don't use memfd when valgrind is detected
authorJason Ekstrand <jason.ekstrand@intel.com>
Mon, 18 May 2015 22:58:02 +0000 (15:58 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 18 May 2015 22:58:20 +0000 (15:58 -0700)
src/vulkan/allocator.c

index 94b7d54..5cabc46 100644 (file)
@@ -203,7 +203,11 @@ anv_block_pool_init(struct anv_block_pool *pool,
  * without copying.  It breaks valgrind however, so we have a MAP_ANONYMOUS
  * path we can take for valgrind debugging. */
 
-#define USE_MEMFD 1
+#ifdef HAVE_VALGRIND
+#  define USE_MEMFD 0
+#else
+#  define USE_MEMFD 1
+#endif
 
 void
 anv_block_pool_finish(struct anv_block_pool *pool)