From e99773badd1f2f795bf93bf912d2e2a270e285ee Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Thu, 23 Jul 2015 08:57:54 -0700 Subject: [PATCH] vk: Add two more valgrind checks --- src/vulkan/anv_cmd_buffer.c | 1 + src/vulkan/anv_private.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/vulkan/anv_cmd_buffer.c b/src/vulkan/anv_cmd_buffer.c index 4d4dfa9fb53..378d148acbe 100644 --- a/src/vulkan/anv_cmd_buffer.c +++ b/src/vulkan/anv_cmd_buffer.c @@ -192,6 +192,7 @@ anv_batch_emit_batch(struct anv_batch *batch, struct anv_batch *other) assert(batch->next + size <= batch->end); + VG(VALGRIND_CHECK_MEM_IS_DEFINED(other->start, size)); memcpy(batch->next, other->start, size); offset = batch->next - batch->start; diff --git a/src/vulkan/anv_private.h b/src/vulkan/anv_private.h index be24b514f30..89c0bc29fab 100644 --- a/src/vulkan/anv_private.h +++ b/src/vulkan/anv_private.h @@ -528,6 +528,7 @@ __gen_combine_address(struct anv_batch *batch, void *location, }; \ void *__dst = anv_batch_emit_dwords(batch, cmd ## _length); \ cmd ## _pack(batch, __dst, &__template); \ + VG(VALGRIND_CHECK_MEM_IS_DEFINED(__dst, cmd ## _length * 4)); \ } while (0) #define anv_batch_emitn(batch, n, cmd, ...) ({ \ -- 2.30.2