summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorBruce Cherniak <[email protected]>2017-12-12 17:18:23 -0600
committerGeorge Kyriazis <[email protected]>2017-12-13 14:44:01 -0600
commit709f5bdc4a2bf31f422f5cf60797224c0463c10a (patch)
treed48dc08b187fce4490e55ff6744da87204872581 /src/gallium
parent1774c1036168b8cc043d1b3c865ca594c0c06c4f (diff)
swr: Fix KNOB_MAX_WORKER_THREADS thread creation override.
Environment variable KNOB_MAX_WORKER_THREADS allows the user to override default thread creation and thread binding. Previous commit to adjust linux cpu topology caused setting this KNOB to bind all threads to a single core. This patch restores correct functionality of override. Cc: <[email protected]> Reviewed-by: Tim Rowley <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/swr/rasterizer/core/threads.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/core/threads.cpp b/src/gallium/drivers/swr/rasterizer/core/threads.cpp
index f4ddc212264..6242cb3fc7c 100644
--- a/src/gallium/drivers/swr/rasterizer/core/threads.cpp
+++ b/src/gallium/drivers/swr/rasterizer/core/threads.cpp
@@ -213,8 +213,7 @@ void CalculateProcessorTopology(CPUNumaNodes& out_nodes, uint32_t& out_numThread
{
for (auto &core : node.cores)
{
- out_numThreadsPerProcGroup = std::max((size_t)out_numThreadsPerProcGroup,
- core.threadIds.size());
+ out_numThreadsPerProcGroup += core.threadIds.size();
}
}