layers: Add getSamplerNode() helper
Kill sampler_map_ in DescriptorSet and add getSamplerNode() helper
and use it instead.
diff --git a/layers/descriptor_sets.h b/layers/descriptor_sets.h
index fcb409c..eddbff3 100644
--- a/layers/descriptor_sets.h
+++ b/layers/descriptor_sets.h
@@ -160,7 +160,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 std::unordered_map<VkSampler, std::unique_ptr<SAMPLER_NODE>> *);
+bool ValidateSampler(const VkSampler, const core_validation::layer_data *);
bool ValidateImageUpdate(VkImageView, VkImageLayout, VkDescriptorType,
const std::unordered_map<VkImageView, VkImageViewCreateInfo> *,
const std::unordered_map<VkImage, IMAGE_NODE> *, const std::unordered_map<VkImage, VkSwapchainKHR> *,
@@ -269,7 +269,6 @@
std::unordered_map<VkDescriptorSet, cvdescriptorset::DescriptorSet *> *,
const core_validation::layer_data *,
const std::unordered_map<VkDescriptorSetLayout, cvdescriptorset::DescriptorSetLayout *> &,
- const std::unordered_map<VkSampler, std::unique_ptr<SAMPLER_NODE>> &,
const std::unordered_map<VkImageView, VkImageViewCreateInfo> &,
const std::unordered_map<VkImage, IMAGE_NODE> &,
const std::unordered_map<VkImage, VkSwapchainKHR> &,
@@ -297,7 +296,6 @@
public:
using BASE_NODE::in_use;
DescriptorSet(const VkDescriptorSet, const DescriptorSetLayout *, const core_validation::layer_data *,
- const std::unordered_map<VkSampler, std::unique_ptr<SAMPLER_NODE>> *,
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 *> *);
@@ -377,8 +375,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<VkBufferView, VkBufferViewCreateInfo> *buffer_view_map_;
- const std::unordered_map<VkSampler, std::unique_ptr<SAMPLER_NODE>> *sampler_map_;
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_;