[Mesa-dev] [PATCH] anv/allocator: Fix build if valgrind is not found.

Rafael Antognolli rafael.antognolli at intel.com
Fri May 5 19:49:13 UTC 2017


There's no &sb->_vg_ptr in that case.

Signed-off-by: Rafael Antognolli <rafael.antognolli at intel.com>
Cc: Jason Ekstrand <jason at jlekstrand.net>
---
 src/intel/vulkan/anv_allocator.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c
index e2f2dea..6d04b63 100644
--- a/src/intel/vulkan/anv_allocator.c
+++ b/src/intel/vulkan/anv_allocator.c
@@ -927,7 +927,9 @@ 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;
+#ifdef HAVE_VALGRIND
       VG_NOACCESS_WRITE(&sb->_vg_ptr, NULL);
+#endif
 
       VG(VALGRIND_MAKE_MEM_NOACCESS(stream->block.map, stream->block_size));
 
-- 
2.9.3



More information about the mesa-dev mailing list