Add processor topology calculation implementation for Darwin/OSX targets.
authorApple SWE <jeremyhu@apple.com>
Wed, 14 Mar 2018 01:24:26 +0000 (18:24 -0700)
committerJeremy Huddleston Sequoia <jeremyhu@apple.com>
Thu, 15 Mar 2018 05:08:34 +0000 (22:08 -0700)
commit67f27b1e18d8e68c795f2eb43c06abfe4b6fcaca
treea9dd640f26e5514cdf95427e2a66bfe2e403bec5
parent4b15b5e803eb4705f8532e6cc41cfdc8bd065de9
Add processor topology calculation implementation for Darwin/OSX targets.

The implementation for bootstrapping SWR on Darwin targets is based on the Linux version.
Instead of reading the output of /proc/cpuinfo, sysctlbyname is used to determine the
physical identifiers, processor identifiers, core counts and thread-processor affinities.

With this patch, it is possible to use SWR as an alternate renderer on OSX to softpipe and
llvmpipe.

Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
src/gallium/drivers/swr/rasterizer/core/threads.cpp