anv/allocator: Only write to _vg_ptr if we have valgrind
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 5 May 2017 19:11:42 +0000 (12:11 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 5 May 2017 19:49:51 +0000 (12:49 -0700)
This fixes the build when not building against valgrind headers.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100945
Reviewed-by: Chad Versace <chadversary@chromium.org>
src/intel/vulkan/anv_allocator.c

index e2f2dea5699c6630df0fdda828bf61eb6d834aa1..b767542aa5bf21223069ce9dbf6acdd80527b6ce 100644 (file)
@@ -927,7 +927,7 @@ anv_state_stream_alloc(struct anv_state_stream *stream,
       VG_NOACCESS_WRITE(&sb->block, stream->block);
       VG_NOACCESS_WRITE(&sb->next, stream->block_list);
       stream->block_list = sb;
-      VG_NOACCESS_WRITE(&sb->_vg_ptr, NULL);
+      VG(VG_NOACCESS_WRITE(&sb->_vg_ptr, NULL));
 
       VG(VALGRIND_MAKE_MEM_NOACCESS(stream->block.map, stream->block_size));