Skip to content

Commit

Permalink
Sync the GPU thread on list/draw sync.
Browse files Browse the repository at this point in the history
Otherwise, the CPU gets ahead (inside the frame) and games get confused.
I don't think there's any good workaround to avoid this.
  • Loading branch information
unknownbrackets committed Aug 10, 2013
1 parent 408e570 commit abc396c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions GPU/GPUCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ void GPUCommon::PopDLQueue() {
}

u32 GPUCommon::DrawSync(int mode) {
// Sync first, because the CPU is usually faster than the emulated GPU.
SyncThread();

easy_guard guard(listLock);
if (mode < 0 || mode > 1)
return SCE_KERNEL_ERROR_INVALID_MODE;
Expand Down Expand Up @@ -92,6 +95,9 @@ void GPUCommon::CheckDrawSync() {
}

int GPUCommon::ListSync(int listid, int mode) {
// Sync first, because the CPU is usually faster than the emulated GPU.
SyncThread();

easy_guard guard(listLock);
if (listid < 0 || listid >= DisplayListMaxCount)
return SCE_KERNEL_ERROR_INVALID_ID;
Expand Down

0 comments on commit abc396c

Please sign in to comment.