fixes to the threadedness of the sw rasteriser

also fix #639 and fix #880
This commit is contained in:
RSDuck
2021-01-26 16:42:27 +01:00
parent ab222ab135
commit b78bc4cb66
8 changed files with 40 additions and 16 deletions

View File

@ -94,9 +94,13 @@ void SetupRenderThread()
RenderThread = Platform::Thread_Create(RenderThreadFunc);
}
// otherwise more than one frame can be queued up at once
Platform::Semaphore_Reset(Sema_RenderStart);
if (RenderThreadRendering)
Platform::Semaphore_Wait(Sema_RenderDone);
Platform::Semaphore_Reset(Sema_RenderDone);
Platform::Semaphore_Reset(Sema_RenderStart);
Platform::Semaphore_Reset(Sema_ScanlineCount);