diff options
| author | Courtney Goeltzenleuchter <courtney@LunarG.com> | 2015-06-13 21:22:12 -0600 |
|---|---|---|
| committer | Courtney Goeltzenleuchter <courtney@LunarG.com> | 2015-06-18 10:22:56 -0600 |
| commit | af4e8327f8319ab97bfbe71c907eaabd329704bc (patch) | |
| tree | dbf963e17167e74ec1da8c1e28fa3bc3a30dfd9e /layers/basic.cpp | |
| parent | 03b7c7b58b4c6d3be53804e68eb94dcbcbef4a75 (diff) | |
| download | usermoji-af4e8327f8319ab97bfbe71c907eaabd329704bc.tar.xz | |
layers: Use static dispatch table maps
Changes to use dispatch table access functions.
Diffstat (limited to 'layers/basic.cpp')
| -rw-r--r-- | layers/basic.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/layers/basic.cpp b/layers/basic.cpp index 81cdaa8b..d6ea963a 100644 --- a/layers/basic.cpp +++ b/layers/basic.cpp @@ -118,18 +118,18 @@ VK_LAYER_EXPORT VkResult VKAPI vkCreateDevice(VkPhysicalDevice gpu, const VkDevi /* hook DestroyDevice to remove tableMap entry */ VK_LAYER_EXPORT VkResult VKAPI vkDestroyDevice(VkDevice device) { - VkLayerDispatchTable *pDisp = *(VkLayerDispatchTable **) device; + dispatch_key key = get_dispatch_key(device); VkResult res = device_dispatch_table(device)->DestroyDevice(device); - tableMap.erase(pDisp); + destroy_device_dispatch_table(key); return res; } /* hook DestroyInstance to remove tableInstanceMap entry */ VK_LAYER_EXPORT VkResult VKAPI vkDestroyInstance(VkInstance instance) { - VkLayerInstanceDispatchTable *pDisp = *(VkLayerInstanceDispatchTable **) instance; + dispatch_key key = get_dispatch_key(instance); VkResult res = instance_dispatch_table(instance)->DestroyInstance(instance); - tableInstanceMap.erase(pDisp); + destroy_instance_dispatch_table(key); return res; } |
