From 6d8923d41ff611456d52b25543a9a19f66bb89bf Mon Sep 17 00:00:00 2001 From: Tobin Ehlis Date: Wed, 21 Jun 2017 10:16:10 -0600 Subject: layers:Make DSLayout const in shared_ptrs Declare DescriptorSetLayout's const for shared_ptrs in Pipeline layout and DSAllocate structs. --- layers/core_validation.cpp | 6 +++--- layers/core_validation_types.h | 4 ++-- layers/descriptor_sets.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index cf4b738a..62bdb774 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -149,7 +149,7 @@ struct layer_data { unordered_map commandPoolMap; unordered_map descriptorPoolMap; unordered_map setMap; - unordered_map> descriptorSetLayoutMap; + unordered_map> descriptorSetLayoutMap; unordered_map pipelineLayoutMap; unordered_map> memObjMap; unordered_map fenceMap; @@ -709,8 +709,8 @@ FRAMEBUFFER_STATE *GetFramebufferState(const layer_data *dev_data, VkFramebuffer return it->second.get(); } -std::shared_ptr const GetDescriptorSetLayout(layer_data const *dev_data, - VkDescriptorSetLayout dsLayout) { +std::shared_ptr const GetDescriptorSetLayout(layer_data const *dev_data, + VkDescriptorSetLayout dsLayout) { auto it = dev_data->descriptorSetLayoutMap.find(dsLayout); if (it == dev_data->descriptorSetLayoutMap.end()) { return nullptr; diff --git a/layers/core_validation_types.h b/layers/core_validation_types.h index 785c1593..1d2761a7 100644 --- a/layers/core_validation_types.h +++ b/layers/core_validation_types.h @@ -526,7 +526,7 @@ struct hash { // Store layouts and pushconstants for PipelineLayout struct PIPELINE_LAYOUT_NODE { VkPipelineLayout layout; - std::vector> set_layouts; + std::vector> set_layouts; std::vector push_constant_ranges; PIPELINE_LAYOUT_NODE() : layout(VK_NULL_HANDLE), set_layouts{}, push_constant_ranges{} {} @@ -765,7 +765,7 @@ struct DeviceExtensions; namespace core_validation { struct layer_data; cvdescriptorset::DescriptorSet *GetSetNode(const layer_data *, VkDescriptorSet); -std::shared_ptr const GetDescriptorSetLayout(layer_data const *, VkDescriptorSetLayout); +std::shared_ptr const GetDescriptorSetLayout(layer_data const *, VkDescriptorSetLayout); DESCRIPTOR_POOL_STATE *GetDescriptorPoolState(const layer_data *, const VkDescriptorPool); BUFFER_STATE *GetBufferState(const layer_data *, VkBuffer); IMAGE_STATE *GetImageState(const layer_data *, VkImage); diff --git a/layers/descriptor_sets.h b/layers/descriptor_sets.h index 239a477c..56719d58 100644 --- a/layers/descriptor_sets.h +++ b/layers/descriptor_sets.h @@ -276,7 +276,7 @@ class BufferDescriptor : public Descriptor { // Structs to contain common elements that need to be shared between Validate* and Perform* calls below struct AllocateDescriptorSetsData { uint32_t required_descriptors_by_type[VK_DESCRIPTOR_TYPE_RANGE_SIZE]; - std::vector> layout_nodes; + std::vector> layout_nodes; AllocateDescriptorSetsData(uint32_t); }; // Helper functions for descriptor set functions that cross multiple sets -- cgit v1.2.3