From: Jason Ekstrand Date: Thu, 23 Jul 2015 15:57:54 +0000 (-0700) Subject: vk: Add two more valgrind checks X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e99773badd1f2f795bf93bf912d2e2a270e285ee;p=mesa.git vk: Add two more valgrind checks --- 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, ...) ({ \