From eafb6206f2b5f0c2a66cb8ea285c17e40c1894ed Mon Sep 17 00:00:00 2001 From: Tobin Ehlis Date: Tue, 19 Jan 2016 08:36:40 -0700 Subject: layers: MR142/GL89, draw_state: check swapchain images during descriptor updates When vkUpdateDescriptorSets() is called, if an imageView was being updated, we were not including swapchain images in the check to verify a valid image. Adding these to the check to avoid false positives. --- layers/draw_state.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/layers/draw_state.cpp b/layers/draw_state.cpp index 2613ecc3..b17dbe42 100644 --- a/layers/draw_state.cpp +++ b/layers/draw_state.cpp @@ -2043,7 +2043,8 @@ static VkBool32 validateImageView(const layer_data* my_data, const VkImageView* VkImage image = ivIt->second->image; // TODO : Check here in case we have a bad image auto imgIt = my_data->imageMap.find(image); - if (imgIt == my_data->imageMap.end()) { + auto swapChainImageIt = my_data->imageLayoutMap.find(image); + if ((imgIt == my_data->imageMap.end()) && (swapChainImageIt == my_data->imageLayoutMap.end())) { skipCall |= log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, (uint64_t) image, __LINE__, DRAWSTATE_IMAGEVIEW_DESCRIPTOR_ERROR, "DS", "vkUpdateDescriptorSets: Attempt to update descriptor with invalid image %#" PRIxLEAST64 " in imageView %#" PRIxLEAST64, (uint64_t) image, (uint64_t) *pImageView); } else { -- cgit v1.2.3