From b1305d5363e0fba5bce415973cc7269eb27c0002 Mon Sep 17 00:00:00 2001 From: Tobin Ehlis Date: Thu, 6 Jul 2017 16:50:10 -0600 Subject: layers:Identify layout from pipelineLayout When checking IsCompatible() for a DescriptorSetLayout, the passed-in layout is always from a pipelineLayout, however this was not specified in the code. Add comment to specify this usage and update the error message to always distinguish which of the layouts using in the compare is from the pipelineLayout. --- layers/descriptor_sets.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'layers/descriptor_sets.cpp') diff --git a/layers/descriptor_sets.cpp b/layers/descriptor_sets.cpp index c6c7df04..c6162ebd 100644 --- a/layers/descriptor_sets.cpp +++ b/layers/descriptor_sets.cpp @@ -216,7 +216,8 @@ bool cvdescriptorset::DescriptorSetLayout::IsCompatible(DescriptorSetLayout cons if (descriptor_count_ != rh_ds_layout->descriptor_count_) { std::stringstream error_str; error_str << "DescriptorSetLayout " << layout_ << " has " << descriptor_count_ << " descriptors, but DescriptorSetLayout " - << rh_ds_layout->GetDescriptorSetLayout() << " has " << rh_ds_layout->descriptor_count_ << " descriptors."; + << rh_ds_layout->GetDescriptorSetLayout() << ", which comes from pipelineLayout, has " + << rh_ds_layout->descriptor_count_ << " descriptors."; *error_msg = error_str.str(); return false; // trivial fail case } @@ -229,7 +230,7 @@ bool cvdescriptorset::DescriptorSetLayout::IsCompatible(DescriptorSetLayout cons std::stringstream error_str; error_str << "Binding " << binding.binding << " for DescriptorSetLayout " << layout_ << " has a descriptorCount of " << binding.descriptorCount << " but binding " << binding.binding << " for DescriptorSetLayout " - << rh_ds_layout->GetDescriptorSetLayout() << " has a descriptorCount of " + << rh_ds_layout->GetDescriptorSetLayout() << ", which comes from pipelineLayout, has a descriptorCount of " << rh_ds_layout->GetDescriptorCountFromBinding(binding.binding); *error_msg = error_str.str(); return false; @@ -237,7 +238,8 @@ bool cvdescriptorset::DescriptorSetLayout::IsCompatible(DescriptorSetLayout cons std::stringstream error_str; error_str << "Binding " << binding.binding << " for DescriptorSetLayout " << layout_ << " is type '" << string_VkDescriptorType(binding.descriptorType) << "' but binding " << binding.binding - << " for DescriptorSetLayout " << rh_ds_layout->GetDescriptorSetLayout() << " is type '" + << " for DescriptorSetLayout " << rh_ds_layout->GetDescriptorSetLayout() + << ", which comes from pipelineLayout, is type '" << string_VkDescriptorType(rh_ds_layout->GetTypeFromBinding(binding.binding)) << "'"; *error_msg = error_str.str(); return false; @@ -245,7 +247,7 @@ bool cvdescriptorset::DescriptorSetLayout::IsCompatible(DescriptorSetLayout cons std::stringstream error_str; error_str << "Binding " << binding.binding << " for DescriptorSetLayout " << layout_ << " has stageFlags " << binding.stageFlags << " but binding " << binding.binding << " for DescriptorSetLayout " - << rh_ds_layout->GetDescriptorSetLayout() << " has stageFlags " + << rh_ds_layout->GetDescriptorSetLayout() << ", which comes from pipelineLayout, has stageFlags " << rh_ds_layout->GetStageFlagsFromBinding(binding.binding); *error_msg = error_str.str(); return false; -- cgit v1.2.3