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>
Wed, 14 Mar 2018 05:50:27 +0000 (22:50 -0700)
commitde0d10db93d85de79c7b4451c4851ace2976f8f4
tree448bd7d9ca17a79cc13b9782384a3b6c010c3db7
parent274f8bf05ef526d65f01614313dda65bc7ec7a87
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>
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
src/gallium/drivers/swr/rasterizer/core/threads.cpp