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/image.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/image.cpp')
| -rw-r--r-- | layers/image.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/layers/image.cpp b/layers/image.cpp index bd5f9d81..de157897 100644 --- a/layers/image.cpp +++ b/layers/image.cpp @@ -145,12 +145,12 @@ VK_LAYER_EXPORT VkResult VKAPI vkCreateInstance(const VkInstanceCreateInfo* pCre return result; } -VK_LAYER_EXPORT VkResult VKAPI vkDestroyInstance(VkInstance instance) +VK_LAYER_EXPORT void VKAPI vkDestroyInstance(VkInstance instance) { // Grab the key before the instance is destroyed. dispatch_key key = get_dispatch_key(instance); VkLayerInstanceDispatchTable *pTable = get_dispatch_table(image_instance_table_map, instance); - VkResult result = pTable->DestroyInstance(instance); + pTable->DestroyInstance(instance); // Clean up logging callback, if any layer_data *data = get_my_data_ptr(key, layer_data_map); @@ -164,8 +164,6 @@ VK_LAYER_EXPORT VkResult VKAPI vkDestroyInstance(VkInstance instance) image_instance_table_map.erase(key); assert(image_instance_table_map.size() == 0 && "Should not have any instance mappings hanging around"); - - return result; } VK_LAYER_EXPORT VkResult VKAPI vkCreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo* pCreateInfo, VkDevice* pDevice) @@ -183,7 +181,7 @@ VK_LAYER_EXPORT VkResult VKAPI vkCreateDevice(VkPhysicalDevice physicalDevice, c return result; } -VK_LAYER_EXPORT VkResult VKAPI vkDestroyDevice(VkDevice device) +VK_LAYER_EXPORT void VKAPI vkDestroyDevice(VkDevice device) { layer_debug_report_destroy_device(device); @@ -192,11 +190,9 @@ VK_LAYER_EXPORT VkResult VKAPI vkDestroyDevice(VkDevice device) fprintf(stderr, "Device: %p, key: %p\n", device, key); #endif - VkResult result = get_dispatch_table(image_device_table_map, device)->DestroyDevice(device); + get_dispatch_table(image_device_table_map, device)->DestroyDevice(device); image_device_table_map.erase(key); assert(image_device_table_map.size() == 0 && "Should not have any instance mappings hanging around"); - - return result; } static const VkLayerProperties pc_global_layers[] = { |
