Mesa (master): swr: [rasterizer] Avoid segv in thread creation on machines with non-consecutive NUMA topology.

Tim Rowley torowley at kemper.freedesktop.org
Tue Apr 12 17:13:47 UTC 2016


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

Author: Tim Rowley <timothy.o.rowley at intel.com>
Date:   Wed Mar 30 12:32:41 2016 -0600

swr: [rasterizer] Avoid segv in thread creation on machines with non-consecutive NUMA topology.

Acked-by: Brian Paul <brianp at vmware.com>

---

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

diff --git a/src/gallium/drivers/swr/rasterizer/core/threads.cpp b/src/gallium/drivers/swr/rasterizer/core/threads.cpp
index 1a11175..056003e 100644
--- a/src/gallium/drivers/swr/rasterizer/core/threads.cpp
+++ b/src/gallium/drivers/swr/rasterizer/core/threads.cpp
@@ -783,6 +783,10 @@ void CreateThreadPool(SWR_CONTEXT *pContext, THREAD_POOL *pPool)
         for (uint32_t n = 0; n < numNodes; ++n)
         {
             auto& node = nodes[n];
+            if (node.cores.size() == 0)
+            {
+               continue;
+            }
 
             uint32_t numCores = numCoresPerNode;
             for (uint32_t c = 0; c < numCores; ++c)




More information about the mesa-commit mailing list