From: Mark Lobodzinski Date: Fri, 15 Jul 2016 19:53:44 +0000 (-0600) Subject: layers: PR767, Fix crash exiting smoketest X-Git-Tag: upstream/1.1.92~2852 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8b4e98a9244fd61b75714c00e66d48885da0128c;p=platform%2Fupstream%2FVulkan-Tools.git layers: PR767, Fix crash exiting smoketest Commit a86b57c caused a Windows crash when shutting down smoketest. Command buffer cleanup for object bindings wasn't happening when calling DestroyCommandPool. Change-Id: Ie233763e37ed9bc6988dddbf932aa3eda2960940 --- diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index 0057db1..1414bd5 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -5603,6 +5603,9 @@ DestroyCommandPool(VkDevice device, VkCommandPool commandPool, const VkAllocatio for (auto cb : pPool->commandBuffers) { clear_cmd_buf_and_mem_references(dev_data, cb); auto cb_node = getCBNode(dev_data, cb); + for (auto obj : cb_node->object_bindings) { + removeCommandBufferBinding(dev_data, &obj, cb_node); + } dev_data->commandBufferMap.erase(cb); // Remove this command buffer delete cb_node; // delete CB info structure }