diff options
| author | Mark Lobodzinski <mark@lunarg.com> | 2015-09-07 13:59:43 -0600 |
|---|---|---|
| committer | Mark Lobodzinski <mark@lunarg.com> | 2015-09-10 11:20:57 -0600 |
| commit | e4c92a63944ab66a8a10da4a55acccef15805e52 (patch) | |
| tree | b583ea7045a3de06d76e7888b9d665bbce73fe7e /layers/device_limits.cpp | |
| parent | a52e058a91a3ce97c989760025a557fbcbf26368 (diff) | |
| download | usermoji-e4c92a63944ab66a8a10da4a55acccef15805e52.tar.xz | |
vulkan.h: Change return types of some functions to void
Functions that should be thought of as "impossible to fail in the face
of valid parameters" have had their return types changed to void.
This includes all of the vkDestroy functions, vkFreeMemory, and vkUnmapMemory.
vkUpdateDescriptorSets is also included, because of the frequency the function
is expected to be called.
Diffstat (limited to 'layers/device_limits.cpp')
| -rw-r--r-- | layers/device_limits.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/layers/device_limits.cpp b/layers/device_limits.cpp index f2e28784..49f5103c 100644 --- a/layers/device_limits.cpp +++ b/layers/device_limits.cpp @@ -159,11 +159,11 @@ VK_LAYER_EXPORT VkResult VKAPI vkCreateInstance(const VkInstanceCreateInfo* pCre } /* hook DestroyInstance to remove tableInstanceMap entry */ -VK_LAYER_EXPORT VkResult VKAPI vkDestroyInstance(VkInstance instance) +VK_LAYER_EXPORT void VKAPI vkDestroyInstance(VkInstance instance) { dispatch_key key = get_dispatch_key(instance); VkLayerInstanceDispatchTable *pTable = get_dispatch_table(device_limits_instance_table_map, instance); - VkResult res = pTable->DestroyInstance(instance); + pTable->DestroyInstance(instance); // Clean up logging callback, if any layer_data *my_data = get_my_data_ptr(key, layer_data_map); @@ -175,7 +175,6 @@ VK_LAYER_EXPORT VkResult VKAPI vkDestroyInstance(VkInstance instance) layer_data_map.erase(pTable); instanceMap.erase(instance); device_limits_instance_table_map.erase(key); - return res; } VK_LAYER_EXPORT VkResult VKAPI vkEnumeratePhysicalDevices(VkInstance instance, uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices) @@ -330,16 +329,15 @@ VK_LAYER_EXPORT VkResult VKAPI vkCreateDevice(VkPhysicalDevice gpu, const VkDevi return result; } -VK_LAYER_EXPORT VkResult VKAPI vkDestroyDevice(VkDevice device) +VK_LAYER_EXPORT void VKAPI vkDestroyDevice(VkDevice device) { // Free device lifetime allocations dispatch_key key = get_dispatch_key(device); VkLayerDispatchTable *pDisp = get_dispatch_table(device_limits_device_table_map, device); - VkResult result = pDisp->DestroyDevice(device); + pDisp->DestroyDevice(device); deviceExtMap.erase(pDisp); device_limits_device_table_map.erase(key); tableDebugMarkerMap.erase(pDisp); - return result; } static const VkLayerProperties ds_global_layers[] = { |
