aboutsummaryrefslogtreecommitdiff
path: root/layers/descriptor_sets.cpp
diff options
context:
space:
mode:
authorTobin Ehlis <tobine@google.com>2017-07-06 16:50:10 -0600
committerTobin Ehlis <tobine@google.com>2017-07-07 11:14:23 -0600
commitb1305d5363e0fba5bce415973cc7269eb27c0002 (patch)
tree0f14898e34c730c35b71869796dc4fea2019ad9f /layers/descriptor_sets.cpp
parent9585e972e42384636593fd3370ae853069590d3b (diff)
downloadusermoji-b1305d5363e0fba5bce415973cc7269eb27c0002.tar.xz
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.
Diffstat (limited to 'layers/descriptor_sets.cpp')
-rw-r--r--layers/descriptor_sets.cpp10
1 files changed, 6 insertions, 4 deletions
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;