From c851790a64761cb422cdd6c0400da6f690c58ae1 Mon Sep 17 00:00:00 2001 From: Tobin Ehlis Date: Wed, 21 Jun 2017 09:56:13 -0600 Subject: layers:Set DescriptorSetLayout in DS to const The DescriptorSetLayout pointed to by shared_ptr in DescriptorSet is const so add const across uses as appropriate. --- layers/descriptor_sets.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'layers/descriptor_sets.cpp') diff --git a/layers/descriptor_sets.cpp b/layers/descriptor_sets.cpp index a0a300b2..2a81a903 100644 --- a/layers/descriptor_sets.cpp +++ b/layers/descriptor_sets.cpp @@ -209,7 +209,7 @@ VkSampler const *cvdescriptorset::DescriptorSetLayout::GetImmutableSamplerPtrFro } // If our layout is compatible with rh_ds_layout, return true, // else return false and fill in error_msg will description of what causes incompatibility -bool cvdescriptorset::DescriptorSetLayout::IsCompatible(std::shared_ptr const rh_ds_layout, +bool cvdescriptorset::DescriptorSetLayout::IsCompatible(std::shared_ptr const rh_ds_layout, std::string *error_msg) const { // Trivial case if (layout_ == rh_ds_layout->GetDescriptorSetLayout()) return true; @@ -313,7 +313,7 @@ cvdescriptorset::AllocateDescriptorSetsData::AllocateDescriptorSetsData(uint32_t : required_descriptors_by_type{}, layout_nodes(count, nullptr) {} cvdescriptorset::DescriptorSet::DescriptorSet(const VkDescriptorSet set, const VkDescriptorPool pool, - const std::shared_ptr &layout, const layer_data *dev_data) + const std::shared_ptr &layout, const layer_data *dev_data) : some_update_(false), set_(set), pool_state_(nullptr), @@ -390,7 +390,8 @@ static std::string string_descriptor_req_view_type(descriptor_req req) { } // Is this sets underlying layout compatible with passed in layout according to "Pipeline Layout Compatibility" in spec? -bool cvdescriptorset::DescriptorSet::IsCompatible(std::shared_ptr const layout, std::string *error) const { +bool cvdescriptorset::DescriptorSet::IsCompatible(std::shared_ptr const layout, + std::string *error) const { return layout->IsCompatible(p_layout_, error); } -- cgit v1.2.3