layers: Add getImageViewData() helper
Switch imageViewMap to store unique_ptrs. Add getImageViewDate() helper
to core_validation and update DescriptorSet to use it.
diff --git a/layers/descriptor_sets.h b/layers/descriptor_sets.h
index eddbff3..16763f8 100644
--- a/layers/descriptor_sets.h
+++ b/layers/descriptor_sets.h
@@ -161,8 +161,7 @@
// Shared helper functions - These are useful because the shared sampler image descriptor type
// performs common functions with both sampler and image descriptors so they can share their common functions
bool ValidateSampler(const VkSampler, const core_validation::layer_data *);
-bool ValidateImageUpdate(VkImageView, VkImageLayout, VkDescriptorType,
- const std::unordered_map<VkImageView, VkImageViewCreateInfo> *,
+bool ValidateImageUpdate(VkImageView, VkImageLayout, VkDescriptorType, const core_validation::layer_data *,
const std::unordered_map<VkImage, IMAGE_NODE> *, const std::unordered_map<VkImage, VkSwapchainKHR> *,
const std::unordered_map<VkSwapchainKHR, SWAPCHAIN_NODE *> *, std::string *);
@@ -269,7 +268,6 @@
std::unordered_map<VkDescriptorSet, cvdescriptorset::DescriptorSet *> *,
const core_validation::layer_data *,
const std::unordered_map<VkDescriptorSetLayout, cvdescriptorset::DescriptorSetLayout *> &,
- const std::unordered_map<VkImageView, VkImageViewCreateInfo> &,
const std::unordered_map<VkImage, IMAGE_NODE> &,
const std::unordered_map<VkImage, VkSwapchainKHR> &,
const std::unordered_map<VkSwapchainKHR, SWAPCHAIN_NODE *> &);
@@ -296,8 +294,7 @@
public:
using BASE_NODE::in_use;
DescriptorSet(const VkDescriptorSet, const DescriptorSetLayout *, const core_validation::layer_data *,
- const std::unordered_map<VkImageView, VkImageViewCreateInfo> *, const std::unordered_map<VkImage, IMAGE_NODE> *,
- const std::unordered_map<VkImage, VkSwapchainKHR> *,
+ const std::unordered_map<VkImage, IMAGE_NODE> *, const std::unordered_map<VkImage, VkSwapchainKHR> *,
const std::unordered_map<VkSwapchainKHR, SWAPCHAIN_NODE *> *);
~DescriptorSet();
// A number of common Get* functions that return data based on layout from which this set was created
@@ -375,7 +372,6 @@
std::vector<std::unique_ptr<Descriptor>> descriptors_;
// Ptrs to object containers to verify bound data
const core_validation::layer_data *device_data_;
- const std::unordered_map<VkImageView, VkImageViewCreateInfo> *image_view_map_;
// TODO : For next 3 maps all we really need (currently) is an image to format mapping
const std::unordered_map<VkImage, IMAGE_NODE> *image_map_;
const std::unordered_map<VkImage, VkSwapchainKHR> *image_to_swapchain_map_;