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.
diff --git a/layers/shader_checker.cpp b/layers/shader_checker.cpp
index 35dd415..7e3602c 100644
--- a/layers/shader_checker.cpp
+++ b/layers/shader_checker.cpp
@@ -1004,13 +1004,12 @@
}
/* hook DextroyDevice to remove tableMap entry */
-VK_LAYER_EXPORT VkResult VKAPI vkDestroyDevice(VkDevice device)
+VK_LAYER_EXPORT void VKAPI vkDestroyDevice(VkDevice device)
{
dispatch_key key = get_dispatch_key(device);
VkLayerDispatchTable *pDisp = get_dispatch_table(shader_checker_device_table_map, device);
- VkResult result = pDisp->DestroyDevice(device);
+ pDisp->DestroyDevice(device);
shader_checker_device_table_map.erase(key);
- return result;
}
VkResult VKAPI vkCreateInstance(
@@ -1034,11 +1033,11 @@
}
/* 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(shader_checker_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);
@@ -1050,7 +1049,6 @@
layer_data_map.erase(pTable);
shader_checker_instance_table_map.erase(key);
- return res;
}
VK_LAYER_EXPORT VkResult VKAPI vkDbgCreateMsgCallback(