From 7a9764bdabc4768b1a95245bd30755f39b924f53 Mon Sep 17 00:00:00 2001 From: Mike Stroyan Date: Thu, 18 Feb 2016 14:44:17 -0700 Subject: [PATCH] layers: Allow draw_state layout mismatch with UNDEFINED Also allow CB initialLayout of VK_IMAGE_LAYOUT_UNDEFINED to match any layout. --- layers/draw_state.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/layers/draw_state.cpp b/layers/draw_state.cpp index a90b3bd..b67e996 100644 --- a/layers/draw_state.cpp +++ b/layers/draw_state.cpp @@ -3717,7 +3717,10 @@ VkBool32 ValidateCmdBufImageLayouts(VkCommandBuffer cmdBuffer) { "Cannot submit cmd buffer using deleted image %" PRIu64 ".", reinterpret_cast(cb_image_data.first)); } else { - if (imageLayout != cb_image_data.second.initialLayout) { + 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) { skip_call |= log_msg( dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, 0, __LINE__, -- 2.7.4