aboutsummaryrefslogtreecommitdiff
path: root/layers/basic.cpp
diff options
context:
space:
mode:
authorChia-I Wu <olv@lunarg.com>2015-10-26 21:10:41 +0800
committerCourtney Goeltzenleuchter <courtney@LunarG.com>2015-11-02 14:02:05 -0700
commit6363606ca2a406c7fe580006c1d2e2e049535e91 (patch)
tree68bf290f877e3c188b5c30e6be2f3f5c11676fbc /layers/basic.cpp
parent3dfc13470d037c5681ae716bfbeb65b7e59f9018 (diff)
downloadusermoji-6363606ca2a406c7fe580006c1d2e2e049535e91.tar.xz
bug 12921: Memory callback (WIP)
The per-object allocator is ignored for now. https://cvs.khronos.org/bugzilla/show_bug.cgi?id=12921
Diffstat (limited to 'layers/basic.cpp')
-rw-r--r--layers/basic.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/layers/basic.cpp b/layers/basic.cpp
index 778a3629..f416d5a5 100644
--- a/layers/basic.cpp
+++ b/layers/basic.cpp
@@ -95,27 +95,27 @@ VK_LAYER_EXPORT VkResult VKAPI basic_EnumeratePhysicalDevices(
return result;
}
-VK_LAYER_EXPORT VkResult VKAPI basic_CreateDevice(VkPhysicalDevice gpu, const VkDeviceCreateInfo* pCreateInfo, VkDevice* pDevice)
+VK_LAYER_EXPORT VkResult VKAPI basic_CreateDevice(VkPhysicalDevice gpu, const VkDeviceCreateInfo* pCreateInfo, const VkAllocCallbacks* pAllocator, VkDevice* pDevice)
{
printf("At start of wrapped vkCreateDevice() call w/ gpu: %p\n", (void*)gpu);
- VkResult result = device_dispatch_table(*pDevice)->CreateDevice(gpu, pCreateInfo, pDevice);
+ VkResult result = device_dispatch_table(*pDevice)->CreateDevice(gpu, pCreateInfo, pAllocator, pDevice);
printf("Completed wrapped vkCreateDevice() call w/ pDevice, Device %p: %p\n", (void*)pDevice, (void *) *pDevice);
return result;
}
/* hook DestroyDevice to remove tableMap entry */
-VK_LAYER_EXPORT void VKAPI basic_DestroyDevice(VkDevice device)
+VK_LAYER_EXPORT void VKAPI basic_DestroyDevice(VkDevice device, const VkAllocCallbacks* pAllocator)
{
dispatch_key key = get_dispatch_key(device);
- device_dispatch_table(device)->DestroyDevice(device);
+ device_dispatch_table(device)->DestroyDevice(device, pAllocator);
destroy_device_dispatch_table(key);
}
/* hook DestroyInstance to remove tableInstanceMap entry */
-VK_LAYER_EXPORT void VKAPI basic_DestroyInstance(VkInstance instance)
+VK_LAYER_EXPORT void VKAPI basic_DestroyInstance(VkInstance instance, const VkAllocCallbacks* pAllocator)
{
dispatch_key key = get_dispatch_key(instance);
- instance_dispatch_table(instance)->DestroyInstance(instance);
+ instance_dispatch_table(instance)->DestroyInstance(instance, pAllocator);
destroy_instance_dispatch_table(key);
}