diff options
| author | Tobin Ehlis <tobine@google.com> | 2016-01-19 08:36:40 -0700 |
|---|---|---|
| committer | Mark Lobodzinski <mark@lunarg.com> | 2016-01-19 11:49:28 -0700 |
| commit | eafb6206f2b5f0c2a66cb8ea285c17e40c1894ed (patch) | |
| tree | 7d6ce650b3db3b2bfde8d9199bd8d58f6e085a14 | |
| parent | a40f8f45ca8002bb0750208489d52d7cc303296f (diff) | |
| download | usermoji-eafb6206f2b5f0c2a66cb8ea285c17e40c1894ed.tar.xz | |
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.
| -rw-r--r-- | layers/draw_state.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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 { |
