layers: LX159, validate all descriptorSets in array
DrawState was not using array index in dsUpdate.
diff --git a/layers/draw_state.cpp b/layers/draw_state.cpp
index ebbb010..9b531c3 100644
--- a/layers/draw_state.cpp
+++ b/layers/draw_state.cpp
@@ -883,7 +883,7 @@
// TODO : If pCIList is NULL, flag error
// Perform all updates
for (uint32_t i = 0; i < updateCount; i++) {
- VkDescriptorSet ds = (pWDS) ? pWDS->destSet : pCDS->destSet;
+ VkDescriptorSet ds = (pWDS) ? pWDS[i].destSet : pCDS[i].destSet;
SET_NODE* pSet = my_data->setMap[ds.handle]; // getSetNode() without locking
g_lastBoundDescriptorSet = pSet->set;
GENERIC_HEADER* pUpdate = (pWDS) ? (GENERIC_HEADER*) &pWDS[i] : (GENERIC_HEADER*) &pCDS[i];