vk: Add two more valgrind checks
authorJason Ekstrand <jason.ekstrand@intel.com>
Thu, 23 Jul 2015 15:57:54 +0000 (08:57 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 23 Jul 2015 15:57:54 +0000 (08:57 -0700)
src/vulkan/anv_cmd_buffer.c
src/vulkan/anv_private.h

index 4d4dfa9fb53e131aaade09a2e15a8bfc48946db4..378d148acbe6cba4c6cf0ca6e586ff2f05382dcc 100644 (file)
@@ -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;
index be24b514f301278717265f6cff2032dbe4d6dd3f..89c0bc29fabde6944a55e71a62ded48cea6a5a0b 100644 (file)
@@ -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, ...) ({          \