From efc4323b27dde2e597e47d52ae6ca450d873b549 Mon Sep 17 00:00:00 2001 From: Tobin Ehlis Date: Fri, 1 Jul 2016 18:23:58 -0600 Subject: 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. --- layers/descriptor_sets.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'layers/descriptor_sets.cpp') diff --git a/layers/descriptor_sets.cpp b/layers/descriptor_sets.cpp index 6aa891a3..10463ab0 100644 --- a/layers/descriptor_sets.cpp +++ b/layers/descriptor_sets.cpp @@ -874,7 +874,7 @@ bool cvdescriptorset::ValidateUpdateDescriptorSets(const debug_report_data *repo 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(dest_set), __LINE__, DRAWSTATE_INVALID_UPDATE_INDEX, "DS", + reinterpret_cast(dest_set), __LINE__, DRAWSTATE_INVALID_WRITE_UPDATE, "DS", "vkUpdateDescriptorsSets() failed write update validation for Descriptor Set 0x%" PRIx64 " with error: %s", reinterpret_cast(dest_set), error_str.c_str()); @@ -904,7 +904,7 @@ bool cvdescriptorset::ValidateUpdateDescriptorSets(const debug_report_data *repo 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(dst_set), __LINE__, DRAWSTATE_INVALID_UPDATE_INDEX, "DS", + reinterpret_cast(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(src_set), reinterpret_cast(dst_set), error_str.c_str()); -- cgit v1.2.3