Commit a0355b74 by Nicolas Capens

Use a symbolic constant for the default thread count.

Bug 23073037 Change-Id: I7da215ceff23f9a5c8188d3566a7c478b9489117 Reviewed-on: https://swiftshader-review.googlesource.com/3841Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <capn@google.com> Tested-by: 's avatarNicolas Capens <capn@google.com>
parent 20248ddb
...@@ -16,12 +16,20 @@ ...@@ -16,12 +16,20 @@
#define PERF_HUD 0 // Display time spent on vertex, setup and pixel processing for each thread #define PERF_HUD 0 // Display time spent on vertex, setup and pixel processing for each thread
#define PERF_PROFILE 0 // Profile various pipeline stages and display the timing in SwiftConfig #define PERF_PROFILE 0 // Profile various pipeline stages and display the timing in SwiftConfig
#if defined(_WIN32) #if defined(_WIN32)
#define S3TC_SUPPORT 1 #define S3TC_SUPPORT 1
#else #else
#define S3TC_SUPPORT 0 #define S3TC_SUPPORT 0
#endif #endif
// Worker thread count when not set by SwiftConfig
// 0 = process affinity count (recommended)
// 1 = rendering on main thread (no worker threads), useful for debugging
#ifndef DEFAULT_THREAD_COUNT
#define DEFAULT_THREAD_COUNT 0
#endif
enum enum
{ {
PERF_PIXEL, PERF_PIXEL,
......
...@@ -726,7 +726,7 @@ namespace sw ...@@ -726,7 +726,7 @@ namespace sw
config.perspectiveCorrection = ini.getBoolean("Quality", "PerspectiveCorrection", true); config.perspectiveCorrection = ini.getBoolean("Quality", "PerspectiveCorrection", true);
config.transcendentalPrecision = ini.getInteger("Quality", "TranscendentalPrecision", 2); config.transcendentalPrecision = ini.getInteger("Quality", "TranscendentalPrecision", 2);
config.transparencyAntialiasing = ini.getInteger("Quality", "TransparencyAntialiasing", 0); config.transparencyAntialiasing = ini.getInteger("Quality", "TransparencyAntialiasing", 0);
config.threadCount = ini.getInteger("Processor", "ThreadCount", 0); config.threadCount = ini.getInteger("Processor", "ThreadCount", DEFAULT_THREAD_COUNT);
config.enableSSE = ini.getBoolean("Processor", "EnableSSE", true); config.enableSSE = ini.getBoolean("Processor", "EnableSSE", true);
config.enableSSE2 = ini.getBoolean("Processor", "EnableSSE2", true); config.enableSSE2 = ini.getBoolean("Processor", "EnableSSE2", true);
config.enableSSE3 = ini.getBoolean("Processor", "EnableSSE3", true); config.enableSSE3 = ini.getBoolean("Processor", "EnableSSE3", true);
......
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