mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-19 10:38:30 +02:00
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.
This commit is contained in:
parent
1f49a7d9fc
commit
0f050aaa15
1 changed files with 4 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue