layers:Handle consecutive descriptor updates
Fixes #1165
According to spec descriptor updates should roll over to the next
binding number. If bindings were out of order, this was broken in
validation.
This fix corrects validation and state update for out-of-order
descriptor bindings by checking consecutive updates based on correct
binding count for consecutive bindings and by performing updates
on a per-binding basis, making sure to roll update over to the
correct next binding.
Also update the error message, related negative test, and database
file.
diff --git a/tests/layer_validation_tests.cpp b/tests/layer_validation_tests.cpp
index abf2e8a..423ed32 100644
--- a/tests/layer_validation_tests.cpp
+++ b/tests/layer_validation_tests.cpp
@@ -8922,10 +8922,7 @@
// For overlapping Update, have arrayIndex exceed that of layout
VkResult err;
- m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT,
- " binding #0 with 1 total descriptors but update of 1 descriptors "
- "starting at binding offset of 0 combined with update array element "
- "offset of 1 oversteps the size of this descriptor set.");
+ m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_00938);
ASSERT_NO_FATAL_FAILURE(InitState());
// VkDescriptorSetObj descriptorSet(m_device);