summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDylan Baker <[email protected]>2018-03-14 09:30:17 -0700
committerDylan Baker <[email protected]>2018-03-14 09:30:17 -0700
commit848f2b6e31ec46f169c7898fa18579106ec2a30e (patch)
tree4c0ac76137667e548eab8ca25f7c4c7651e165dc /src
parent0f30c80932342e1e4dfef0b11012ab053d9d7ca8 (diff)
Revert "Add processor topology calculation implementation for Darwin/OSX targets."
This reverts commit de0d10db93d85de79c7b4451c4851ace2976f8f4. This breaks the build on at least Linux, probably other non-apple platforms. Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/swr/rasterizer/core/threads.cpp55
1 files changed, 0 insertions, 55 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/core/threads.cpp b/src/gallium/drivers/swr/rasterizer/core/threads.cpp
index fd7a42e4720..4d79168d2dc 100644
--- a/src/gallium/drivers/swr/rasterizer/core/threads.cpp
+++ b/src/gallium/drivers/swr/rasterizer/core/threads.cpp
@@ -36,11 +36,6 @@
#include <unistd.h>
#endif
-#ifdef __APPLE__
-#include <sys/types.h>
-#include <sys/sysctl.h>
-#endif
-
#include "common/os.h"
#include "context.h"
#include "frontend.h"
@@ -258,56 +253,6 @@ void CalculateProcessorTopology(CPUNumaNodes& out_nodes, uint32_t& out_numThread
}
}
- auto numProcessors = 0;
- auto numCores = 0;
- auto numPhysicalIds = 0;
-
- int value;
- size_t size = sizeof(value);
-
- int result = sysctlbyname("hw.packages", &value, &size, NULL, 0);
- SWR_ASSERT(result == 0);
- numPhysicalIds = value;
-
- result = sysctlbyname("hw.logicalcpu", &value, &size, NULL, 0);
- SWR_ASSERT(result == 0);
- numProcessors = value;
-
- result = sysctlbyname("hw.physicalcpu", &value, &size, NULL, 0);
- SWR_ASSERT(result == 0);
- numCores = value;
-
- out_nodes.resize(numPhysicalIds);
-
- for (auto physId = 0; physId < numPhysicalIds; ++physId)
- {
- auto &numaNode = out_nodes[physId];
- auto procId = 0;
-
- numaNode.cores.resize(numCores);
-
- while (procId < numProcessors)
- {
- for (auto coreId = 0; coreId < numaNode.cores.size(); ++coreId, ++procId)
- {
- auto &core = numaNode.cores[coreId];
-
- core.procGroup = coreId;
- core.threadIds.push_back(procId);
- }
- }
- }
-
- out_numThreadsPerProcGroup = 0;
-
- for (auto &node : out_nodes)
- {
- for (auto &core : node.cores)
- {
- out_numThreadsPerProcGroup += core.threadIds.size();
- }
- }
-
void bindThread(SWR_CONTEXT* pContext, uint32_t threadId, uint32_t procGroupId = 0, bool bindProcGroup=false)
{