diff options
author | Jason Ekstrand <[email protected]> | 2015-07-31 09:44:40 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2015-07-31 09:44:42 -0700 |
commit | 0f050aaa15ec6bd521eff013808ac151cec9abda (patch) | |
tree | bd28771db4b0580700d9a62ccfaaffae883444b6 /src/vulkan/anv_device.c | |
parent | 1f49a7d9fc0eda5dfba03b0e3faca93e57b39132 (diff) |
vk/device: Mark newly allocated memory as undefined for valgrind
This way valgrind still works even if the client gives us memory that has
been initialized or re-uses memory for some reason.
Diffstat (limited to 'src/vulkan/anv_device.c')
-rw-r--r-- | src/vulkan/anv_device.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vulkan/anv_device.c b/src/vulkan/anv_device.c index 01eff02d25d..9217be79306 100644 --- a/src/vulkan/anv_device.c +++ b/src/vulkan/anv_device.c @@ -844,10 +844,10 @@ anv_device_alloc(struct anv_device * device, size_t alignment, VkSystemAllocType allocType) { - return device->instance->pfnAlloc(device->instance->pAllocUserData, - size, - alignment, - allocType); + void *mem = device->instance->pfnAlloc(device->instance->pAllocUserData, + size, alignment, allocType); + VG(VALGRIND_MAKE_MEM_UNDEFINED(mem, size)); + return mem; } void |