syncval: Add batch trimming to Wait/Fence ops
Since waits and fences remove tag references and/or change
ResourceAccess states, invoked to clean up as possible.
diff --git a/layers/synchronization_validation.cpp b/layers/synchronization_validation.cpp
index 5e8e8d4..9585cde 100644
--- a/layers/synchronization_validation.cpp
+++ b/layers/synchronization_validation.cpp
@@ -3876,6 +3876,7 @@
QueueBatchContext::BatchSet queue_batch_contexts = GetQueueBatchSnapshot();
for (auto &batch : queue_batch_contexts) {
batch->ApplyTaggedWait(queue_id, tag);
+ batch->Trim();
}
}
@@ -7650,6 +7651,7 @@
void QueueBatchContext::ApplyDeviceWait() {
access_context_.Reset();
events_context_.ApplyTaggedWait(GetQueueFlags(), ResourceUsageRecord::kMaxIndex);
+ Trim();
}
HazardResult QueueBatchContext::DetectFirstUseHazard(const ResourceUsageRange &tag_range) {