From a33cc13054abeb4aa629989daa343298bfefec9f Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 31 Oct 2018 17:18:59 +0100 Subject: [PATCH] - make GCC happy... :( --- src/hwrenderer/scene/hw_bsp.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hwrenderer/scene/hw_bsp.cpp b/src/hwrenderer/scene/hw_bsp.cpp index 8a3aa30c1..dcd3af3bb 100644 --- a/src/hwrenderer/scene/hw_bsp.cpp +++ b/src/hwrenderer/scene/hw_bsp.cpp @@ -67,8 +67,8 @@ struct RenderJob class RenderJobQueue { RenderJob pool[300000]; // Way more than ever needed. The largest ever seen on a single viewpoint is around 40000. - std::atomic readindex = 0; - std::atomic writeindex = 0; + std::atomic readindex; + std::atomic writeindex; public: void AddJob(int type, subsector_t *sub, seg_t *seg = nullptr) { @@ -775,6 +775,7 @@ void HWDrawInfo::RenderBSP(void *node) multithread = gl_multithread; if (multithread) { + jobQueue.ReleaseAll(); auto future = renderPool.push([&](int id) { WorkerThread(); }); @@ -784,7 +785,6 @@ void HWDrawInfo::RenderBSP(void *node) Bsp.Unclock(); MTWait.Clock(); future.wait(); - jobQueue.ReleaseAll(); MTWait.Unclock(); } else