tests: Add tests for invalid VkDescriptorBufferInfo
Hit 3 new checks just added for VkDescriptorBufferInfo:
1. offset larger than buffer
2. range of 0
3. range larger than buffer size minus offset
Also update descriptor write and copy update error enums to be more clear,
along with also updating documentation.
diff --git a/layers/descriptor_sets.cpp b/layers/descriptor_sets.cpp
index 6aa891a..10463ab 100644
--- a/layers/descriptor_sets.cpp
+++ b/layers/descriptor_sets.cpp
@@ -874,7 +874,7 @@
std::string error_str;
if (!set_node->ValidateWriteUpdate(report_data, &p_wds[i], &error_str)) {
skip_call |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT,
- reinterpret_cast<uint64_t &>(dest_set), __LINE__, DRAWSTATE_INVALID_UPDATE_INDEX, "DS",
+ reinterpret_cast<uint64_t &>(dest_set), __LINE__, DRAWSTATE_INVALID_WRITE_UPDATE, "DS",
"vkUpdateDescriptorsSets() failed write update validation for Descriptor Set 0x%" PRIx64
" with error: %s",
reinterpret_cast<uint64_t &>(dest_set), error_str.c_str());
@@ -904,7 +904,7 @@
if (!dst_node->ValidateCopyUpdate(report_data, &p_cds[i], src_node, &error_str)) {
skip_call |=
log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT,
- reinterpret_cast<uint64_t &>(dst_set), __LINE__, DRAWSTATE_INVALID_UPDATE_INDEX, "DS",
+ reinterpret_cast<uint64_t &>(dst_set), __LINE__, DRAWSTATE_INVALID_COPY_UPDATE, "DS",
"vkUpdateDescriptorsSets() failed copy update from Descriptor Set 0x%" PRIx64
" to Descriptor Set 0x%" PRIx64 " with error: %s",
reinterpret_cast<uint64_t &>(src_set), reinterpret_cast<uint64_t &>(dst_set), error_str.c_str());