aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--layers/core_validation_types.h2
-rw-r--r--layers/descriptor_sets.cpp2
2 files changed, 3 insertions, 1 deletions
diff --git a/layers/core_validation_types.h b/layers/core_validation_types.h
index 8c892629..f36e3b2d 100644
--- a/layers/core_validation_types.h
+++ b/layers/core_validation_types.h
@@ -100,6 +100,8 @@ enum descriptor_req {
DESCRIPTOR_REQ_VIEW_TYPE_CUBE = 1 << VK_IMAGE_VIEW_TYPE_CUBE,
DESCRIPTOR_REQ_VIEW_TYPE_CUBE_ARRAY = 1 << VK_IMAGE_VIEW_TYPE_CUBE_ARRAY,
+ DESCRIPTOR_REQ_ALL_VIEW_TYPE_BITS = (1 << (VK_IMAGE_VIEW_TYPE_END_RANGE + 1)) - 1,
+
DESCRIPTOR_REQ_SINGLE_SAMPLE = 2 << VK_IMAGE_VIEW_TYPE_END_RANGE,
DESCRIPTOR_REQ_MULTI_SAMPLE = DESCRIPTOR_REQ_SINGLE_SAMPLE << 1,
};
diff --git a/layers/descriptor_sets.cpp b/layers/descriptor_sets.cpp
index c7b39f7c..00c0d194 100644
--- a/layers/descriptor_sets.cpp
+++ b/layers/descriptor_sets.cpp
@@ -429,7 +429,7 @@ bool cvdescriptorset::DescriptorSet::ValidateDrawState(const std::map<uint32_t,
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