layers: Don't spuriously produce an error if there are no view type bits set
Previously we'd complain about any input attachment, since we don't constrain
its view type at all.
Signed-off-by: Chris Forbes <chrisforbes@google.com>
diff --git a/layers/descriptor_sets.cpp b/layers/descriptor_sets.cpp
index c7b39f7..00c0d19 100644
--- a/layers/descriptor_sets.cpp
+++ b/layers/descriptor_sets.cpp
@@ -429,7 +429,7 @@
auto image_view_data = getImageViewData(device_data_, image_view);
assert(image_view_data);
- if (~reqs & (1 << image_view_data->viewType)) {
+ if ((reqs & DESCRIPTOR_REQ_ALL_VIEW_TYPE_BITS) && (~reqs & (1 << image_view_data->viewType))) {
// bad view type
std::stringstream error_str;
error_str << "Descriptor in binding #" << binding << " at global descriptor index " << i