Mesa (master): swr/rast: Minor changes for os-x

Tim Rowley torowley at kemper.freedesktop.org
Thu Oct 19 18:21:19 UTC 2017


Module: Mesa
Branch: master
Commit: ed1db803faf5f325b0d5928106e682a217b2a6f6
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ed1db803faf5f325b0d5928106e682a217b2a6f6

Author: Tim Rowley <timothy.o.rowley at intel.com>
Date:   Wed Sep 27 12:22:35 2017 -0500

swr/rast: Minor changes for os-x

Reviewed-by: Bruce Cherniak <bruce.cherniak at intel.com>

---

 src/gallium/drivers/swr/rasterizer/core/threads.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/swr/rasterizer/core/threads.cpp b/src/gallium/drivers/swr/rasterizer/core/threads.cpp
index 4bb395dec3..9ece0649b9 100644
--- a/src/gallium/drivers/swr/rasterizer/core/threads.cpp
+++ b/src/gallium/drivers/swr/rasterizer/core/threads.cpp
@@ -30,7 +30,7 @@
 #include <fstream>
 #include <string>
 
-#if defined(__linux__) || defined(__gnu_linux__)
+#if defined(__linux__) || defined(__gnu_linux__) || defined(__APPLE__)
 #include <pthread.h>
 #include <sched.h>
 #include <unistd.h>
@@ -218,6 +218,8 @@ void CalculateProcessorTopology(CPUNumaNodes& out_nodes, uint32_t& out_numThread
         }
     }
 
+#elif defined(__APPLE__)
+
 #else
 
 #error Unsupported platform
@@ -291,7 +293,7 @@ void bindThread(SWR_CONTEXT* pContext, uint32_t threadId, uint32_t procGroupId =
 
     SetThreadGroupAffinity(GetCurrentThread(), &affinity, nullptr);
 
-#else
+#elif defined(__linux__) || defined(__gnu_linux__)
 
     cpu_set_t cpuset;
     pthread_t thread = pthread_self();




More information about the mesa-commit mailing list