mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Fix SyncThread() not syncing during last event.
This commit is contained in:
parent
5e363bcbd2
commit
a80a7690c8
2 changed files with 8 additions and 0 deletions
|
@ -584,6 +584,9 @@ void GPUCommon::RunEventsUntil(u64 globalticks) {
|
|||
globalticks = 0;
|
||||
break;
|
||||
|
||||
case GPU_EVENT_SYNC_THREAD:
|
||||
break;
|
||||
|
||||
default:
|
||||
ProcessEvent(ev);
|
||||
}
|
||||
|
@ -613,6 +616,10 @@ void GPUCommon::SyncThread() {
|
|||
return;
|
||||
}
|
||||
|
||||
// It could be that we are *currently* processing the last event.
|
||||
// The events queue will be empty (HasEvents() = false), but it's not done.
|
||||
// So we schedule a nothing event and wait for that to finish.
|
||||
ScheduleEvent(GPU_EVENT_SYNC_THREAD);
|
||||
while (HasEvents() && coreState == CORE_RUNNING) {
|
||||
eventsDrain.wait_for(eventsDrainLock, 1);
|
||||
};
|
||||
|
|
|
@ -149,6 +149,7 @@ enum GPUEventType {
|
|||
GPU_EVENT_REAPPLY_GFX_STATE,
|
||||
GPU_EVENT_INVALIDATE_CACHE,
|
||||
GPU_EVENT_FINISH_EVENT_LOOP,
|
||||
GPU_EVENT_SYNC_THREAD,
|
||||
};
|
||||
|
||||
struct GPUEvent {
|
||||
|
|
Loading…
Add table
Reference in a new issue