layers: Add vkFreeCommandBuffers param check
Add NULL pointer checks for vkFreeCommandBuffers.
Change-Id: I7bef6a9d55fda6607b483c873485156b8c8148a1
diff --git a/layers/param_checker.cpp b/layers/param_checker.cpp
index fcbc8f1..cf8c76f 100644
--- a/layers/param_checker.cpp
+++ b/layers/param_checker.cpp
@@ -5790,6 +5790,25 @@
return result;
}
+VK_LAYER_EXPORT VKAPI_ATTR void VKAPI_CALL
+vkFreeCommandBuffers(VkDevice device, VkCommandPool commandPool,
+ uint32_t commandBufferCount,
+ const VkCommandBuffer *pCommandBuffers) {
+ VkBool32 skipCall = VK_FALSE;
+ layer_data *my_data =
+ get_my_data_ptr(get_dispatch_key(device), layer_data_map);
+ assert(my_data != NULL);
+
+ skipCall |= param_check_vkFreeCommandBuffers(
+ my_data->report_data, commandPool, commandBufferCount, pCommandBuffers);
+
+ if (skipCall == VK_FALSE) {
+ get_dispatch_table(pc_device_table_map, device)
+ ->FreeCommandBuffers(device, commandPool, commandBufferCount,
+ pCommandBuffers);
+ }
+}
+
bool PreBeginCommandBuffer(
VkCommandBuffer commandBuffer,
const VkCommandBufferBeginInfo* pBeginInfo)
@@ -7680,6 +7699,8 @@
return (PFN_vkVoidFunction) vkCmdSetStencilReference;
if (!strcmp(funcName, "vkAllocateCommandBuffers"))
return (PFN_vkVoidFunction) vkAllocateCommandBuffers;
+ if (!strcmp(funcName, "vkFreeCommandBuffers"))
+ return (PFN_vkVoidFunction)vkFreeCommandBuffers;
if (!strcmp(funcName, "vkBeginCommandBuffer"))
return (PFN_vkVoidFunction) vkBeginCommandBuffer;
if (!strcmp(funcName, "vkEndCommandBuffer"))