aboutsummaryrefslogtreecommitdiff
path: root/layers/descriptor_sets.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'layers/descriptor_sets.cpp')
-rw-r--r--layers/descriptor_sets.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/layers/descriptor_sets.cpp b/layers/descriptor_sets.cpp
index 2955a6a3..d178a916 100644
--- a/layers/descriptor_sets.cpp
+++ b/layers/descriptor_sets.cpp
@@ -543,7 +543,17 @@ bool cvdescriptorset::DescriptorSet::ValidateCopyUpdate(const debug_report_data
set_, error))) {
return false;
}
- // Update parameters all look good so verify update contents
+ // First make sure source descriptors are updated
+ for (uint32_t i = 0; i < update->descriptorCount; ++i) {
+ if (!src_set->descriptors_[src_start_idx + i]) {
+ std::stringstream error_str;
+ error_str << "Attempting copy update from descriptorSet " << src_set << " binding #" << update->srcBinding << " but descriptor at array offset "
+ << update->srcArrayElement + i << " has not been updated.";
+ *error = error_str.str();
+ return false;
+ }
+ }
+ // Update parameters all look good and descriptor updated so verify update contents
if (!VerifyCopyUpdateContents(update, src_set, src_start_idx, error))
return false;