From a2e99be395d6d5158bad8b902c01bfcfaa9ad10d Mon Sep 17 00:00:00 2001 From: Tobin Ehlis Date: Wed, 21 Jun 2017 10:08:52 -0600 Subject: layers:IsCompatible uses raw DSLayout ptr Update IsCompatible calls for DescriptorSetLayout class to use raw ptrs instead of shared_ptr as the calls just temporarily use the ptr and don't affect ptr ownership. --- layers/descriptor_sets.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'layers/descriptor_sets.cpp') diff --git a/layers/descriptor_sets.cpp b/layers/descriptor_sets.cpp index 2a81a903..c6c7df04 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(DescriptorSetLayout const *const rh_ds_layout, std::string *error_msg) const { // Trivial case if (layout_ == rh_ds_layout->GetDescriptorSetLayout()) return true; @@ -390,9 +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 { - return layout->IsCompatible(p_layout_, error); +bool cvdescriptorset::DescriptorSet::IsCompatible(DescriptorSetLayout const *const layout, std::string *error) const { + return layout->IsCompatible(p_layout_.get(), error); } // Validate that the state of this set is appropriate for the given bindings and dynamic_offsets at Draw time -- cgit v1.2.3