projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1f49a7d
)
vk/device: Mark newly allocated memory as undefined for valgrind
author
Jason Ekstrand
<jason.ekstrand@intel.com>
Fri, 31 Jul 2015 16:44:40 +0000
(09:44 -0700)
committer
Jason Ekstrand
<jason.ekstrand@intel.com>
Fri, 31 Jul 2015 16:44:42 +0000
(09:44 -0700)
This way valgrind still works even if the client gives us memory that has
been initialized or re-uses memory for some reason.
src/vulkan/anv_device.c
patch
|
blob
|
history
diff --git
a/src/vulkan/anv_device.c
b/src/vulkan/anv_device.c
index 01eff02d25d1f153451cc457c7ac39cf6356cbae..9217be793069fb8f8090efbfaa254b582c5f92a5 100644
(file)
--- 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