Skip to content

Commit

Permalink
Removed unnecessary condition var wait.
Browse files Browse the repository at this point in the history
  • Loading branch information
afritz1 committed Aug 3, 2024
1 parent 3c052ee commit 0ea3eed
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions OpenTESArena/src/Rendering/SoftwareRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4106,14 +4106,9 @@ void SoftwareRenderer::submitFrame(const RenderCamera &camera, const RenderFrame
int remainingDrawCallCount = drawCalls.getCount();
constexpr int maxDrawCallsPerLoop = 4096;

// Wait for all workers to be ready to process draw calls (only an extra sync point for every set of draw calls).
g_directorCondVar.wait(lock, []()
{
return std::all_of(g_workers.begin(), g_workers.end(), [](const Worker &worker) { return worker.isReadyToStartFrame; });
});

while (remainingDrawCallCount > 0)
{
// Wait for all workers to be ready to process this set of draw calls.
g_directorCondVar.wait(lock, []()
{
return std::all_of(g_workers.begin(), g_workers.end(), [](const Worker &worker) { return worker.isReadyToStartFrame; });
Expand Down

0 comments on commit 0ea3eed

Please sign in to comment.