OSDN Git Service

Linux build fix
authorAlexis Hetu <sugoi@google.com>
Wed, 27 Sep 2017 14:31:28 +0000 (10:31 -0400)
committerAlexis Hétu <sugoi@google.com>
Wed, 27 Sep 2017 14:47:48 +0000 (14:47 +0000)
The copy constructor of std::atomic is not allowed, so initialization
through operator= is not allowed. Explicitly using the AtomicInt
constructor to fix this issue.

Change-Id: If77763e89e0d958d8a4b5a83d5d7bd9e3ba08ff6
Reviewed-on: https://swiftshader-review.googlesource.com/12508
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
src/Renderer/Renderer.cpp

index 3e75253..1027ee0 100644 (file)
@@ -63,8 +63,8 @@ namespace sw
 
        int batchSize = 128;
        int threadCount = 1;
-       AtomicInt Renderer::unitCount = 1;
-       AtomicInt Renderer::clusterCount = 1;
+       AtomicInt Renderer::unitCount(1);
+       AtomicInt Renderer::clusterCount(1);
 
        TranscendentalPrecision logPrecision = ACCURATE;
        TranscendentalPrecision expPrecision = ACCURATE;