Commit f2520e19 by Alexis Hetu Committed by Alexis Hétu

Data race fix

There's a data race involving threadCount, so it is now an AtomicInt object. Also removed unused extern variables. Bug chromium:778254 chromium:776621 Change-Id: I93174e8f4e5e48f26414ba9c81bb9a2c317dbf73 Reviewed-on: https://swiftshader-review.googlesource.com/13290Tested-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent 74b91b5a
...@@ -61,8 +61,8 @@ namespace sw ...@@ -61,8 +61,8 @@ namespace sw
extern bool precacheSetup; extern bool precacheSetup;
extern bool precachePixel; extern bool precachePixel;
int batchSize = 128; static const int batchSize = 128;
int threadCount = 1; AtomicInt threadCount(1);
AtomicInt Renderer::unitCount(1); AtomicInt Renderer::unitCount(1);
AtomicInt Renderer::clusterCount(1); AtomicInt Renderer::clusterCount(1);
......
...@@ -37,9 +37,6 @@ namespace sw ...@@ -37,9 +37,6 @@ namespace sw
class Renderer; class Renderer;
struct Constants; struct Constants;
extern int batchSize;
extern int threadCount;
enum TranscendentalPrecision enum TranscendentalPrecision
{ {
APPROXIMATE, APPROXIMATE,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment