Skip to content

Commit 90e06eb

Browse files
committed
sync: Fix tracking of synchronized present accesses
1 parent 82e4be3 commit 90e06eb

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

layers/sync/sync_submit.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,7 @@ void QueueBatchContext::ResolvePresentSemaphoreWait(const SignalInfo& signal_inf
470470
const ApplySemaphoreBarrierAction noop_sem_op(signal_scope, noop_semaphore_scope);
471471
access_context_.ResolveFromContext(noop_sem_op, from_context);
472472
}
473+
last_synchronized_present.Merge(signal_info.batch->last_synchronized_present);
473474
}
474475
}
475476
}

layers/sync/sync_validation.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,8 @@ void SyncValidator::WaitForFence(VkFence fence) {
252252
if (auto fence_it = waitable_fences_.find(fence); fence_it != waitable_fences_.end()) {
253253
FenceHostSyncPoint& wait_for = fence_it->second;
254254
if (wait_for.queue_id != kQueueIdInvalid) {
255-
ApplyTaggedWait(wait_for.queue_id, wait_for.tag, {}, wait_for.queue_sync_tags);
255+
const QueueState& queue_state = GetQueueState(wait_for.queue_id);
256+
ApplyTaggedWait(wait_for.queue_id, wait_for.tag, queue_state.GetLastSynchronizedPresent(), wait_for.queue_sync_tags);
256257
} else if (!vvl::StateObject::Invalid(wait_for.acquired.image)) {
257258
ApplyAcquireWait(wait_for.acquired);
258259
}

0 commit comments

Comments
 (0)