From 40c56bad09e0a4d3caf00fe7f4e4c7ed6b12e499 Mon Sep 17 00:00:00 2001 From: Tommy Nguyen Date: Wed, 31 Oct 2018 14:50:27 -0400 Subject: [PATCH] - fix _mm_pause() compiler error and zero initialize atomics --- src/hwrenderer/scene/hw_bsp.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/hwrenderer/scene/hw_bsp.cpp b/src/hwrenderer/scene/hw_bsp.cpp index dcd3af3bb..75be620f4 100644 --- a/src/hwrenderer/scene/hw_bsp.cpp +++ b/src/hwrenderer/scene/hw_bsp.cpp @@ -40,6 +40,7 @@ #include "hwrenderer/scene/hw_portal.h" #include "hwrenderer/utility/hw_clock.h" #include "hwrenderer/data/flatvertices.h" +#include CVAR(Bool, gl_multithread, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) @@ -67,8 +68,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; - std::atomic writeindex; + std::atomic readindex{}; + std::atomic writeindex{}; public: void AddJob(int type, subsector_t *sub, seg_t *seg = nullptr) {