layers: Remove redundant validation
authorJeremy Hayes <jeremy@lunarg.com>
Tue, 28 Feb 2017 16:44:45 +0000 (09:44 -0700)
committerJeremy Hayes <jeremy-lunarg@users.noreply.github.com>
Wed, 1 Mar 2017 20:27:54 +0000 (13:27 -0700)
Remove redundant validation from ValidateCmdBufImageLayouts.

Change-Id: Ia7474e0ca7d0429a8413500f548e1cfbe9f708f1

layers/buffer_validation.cpp

index ed648cb..b70686a 100644 (file)
@@ -1813,11 +1813,7 @@ bool ValidateCmdBufImageLayouts(layer_data *device_data, GLOBAL_CB_NODE *pCB,
     for (auto cb_image_data : pCB->imageLayoutMap) {
         VkImageLayout imageLayout;
 
-        if (!FindLayout(imageLayoutMap, cb_image_data.first, imageLayout)) {
-            skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, 0, __LINE__,
-                            DRAWSTATE_INVALID_IMAGE_LAYOUT, "DS", "Cannot submit cmd buffer using deleted image 0x%" PRIx64 ".",
-                            reinterpret_cast<const uint64_t &>(cb_image_data.first));
-        } else {
+        if (FindLayout(imageLayoutMap, cb_image_data.first, imageLayout)) {
             if (cb_image_data.second.initialLayout == VK_IMAGE_LAYOUT_UNDEFINED) {
                 // TODO: Set memory invalid which is in mem_tracker currently
             } else if (imageLayout != cb_image_data.second.initialLayout) {