aboutsummaryrefslogtreecommitdiff
path: root/layers/descriptor_sets.cpp
diff options
context:
space:
mode:
authorTobin Ehlis <tobine@google.com>2017-06-21 09:56:13 -0600
committerTobin Ehlis <tobine@google.com>2017-06-21 10:51:36 -0600
commitc851790a64761cb422cdd6c0400da6f690c58ae1 (patch)
tree7a60a498a426c13b16584a382d36d793949505b4 /layers/descriptor_sets.cpp
parent379b5351a43c484a49b56a00f6edf7aa2b9ba9e3 (diff)
downloadusermoji-c851790a64761cb422cdd6c0400da6f690c58ae1.tar.xz
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.
Diffstat (limited to 'layers/descriptor_sets.cpp')
-rw-r--r--layers/descriptor_sets.cpp7
1 files changed, 4 insertions, 3 deletions
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<DescriptorSetLayout> const rh_ds_layout,
+bool cvdescriptorset::DescriptorSetLayout::IsCompatible(std::shared_ptr<DescriptorSetLayout const> 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<DescriptorSetLayout> &layout, const layer_data *dev_data)
+ const std::shared_ptr<DescriptorSetLayout const> &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<DescriptorSetLayout> const layout, std::string *error) const {
+bool cvdescriptorset::DescriptorSet::IsCompatible(std::shared_ptr<DescriptorSetLayout const> const layout,
+ std::string *error) const {
return layout->IsCompatible(p_layout_, error);
}