aboutsummaryrefslogtreecommitdiff
path: root/layers/descriptor_sets.cpp
diff options
context:
space:
mode:
authorChris Forbes <chrisforbes@google.com>2016-08-31 12:58:14 -0700
committerChris Forbes <chrisforbes@google.com>2016-09-01 08:32:53 -0700
commit04586bce819f636fff644801c72739460413bb2b (patch)
tree39e5a67295e6d884efbe222c0212db75274d7aed /layers/descriptor_sets.cpp
parentea07a7f4e19871791627fe6d03e41ec5d553e990 (diff)
downloadusermoji-04586bce819f636fff644801c72739460413bb2b.tar.xz
layers: Fix reporting of multiple allowed image view types
This isn't the problem we were hitting in #890, but we'd produce a misleading message if multiple bits were allowed Signed-off-by: Chris Forbes <chrisforbes@google.com>
Diffstat (limited to 'layers/descriptor_sets.cpp')
-rw-r--r--layers/descriptor_sets.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/layers/descriptor_sets.cpp b/layers/descriptor_sets.cpp
index 00c0d194..9b20638b 100644
--- a/layers/descriptor_sets.cpp
+++ b/layers/descriptor_sets.cpp
@@ -323,14 +323,19 @@ cvdescriptorset::DescriptorSet::~DescriptorSet() {
}
-static char const * string_descriptor_req_view_type(descriptor_req req) {
+static std::string string_descriptor_req_view_type(descriptor_req req) {
+ std::string result("");
for (unsigned i = 0; i <= VK_IMAGE_VIEW_TYPE_END_RANGE; i++) {
if (req & (1 << i)) {
- return string_VkImageViewType(VkImageViewType(i));
+ if (result.size()) result += ", ";
+ result += string_VkImageViewType(VkImageViewType(i));
}
}
- return "(none)";
+ if (!result.size())
+ result = "(none)";
+
+ return result;
}