Difference between revisions of "Porting/LLVMpipe"

From RCS Wiki
Jump to navigation Jump to search
(Link to LLVMpipe website)
(Add Luke's patch)
Line 1: Line 1:
 
== Thread Count ==
 
== Thread Count ==
  
[https://docs.mesa3d.org/drivers/llvmpipe.html LLVMpipe] is [https://gitlab.freedesktop.org/mesa/mesa/-/blob/19682028eb0a2143c18ab2a26f3b23b7f74b2335/src/gallium/drivers/llvmpipe/lp_limits.h#L69 limited to 16 threads].  The only easily findable justification for this limit is in [https://gitlab.freedesktop.org/mesa/mesa/-/commit/38a751cbe85b7e31925931dc4994e7def5e5af96 a commit from 2013], where it was increased from 8 because a user reported on a mailing list that 16 was faster for them.
+
[https://docs.mesa3d.org/drivers/llvmpipe.html LLVMpipe] is [https://gitlab.freedesktop.org/mesa/mesa/-/blob/19682028eb0a2143c18ab2a26f3b23b7f74b2335/src/gallium/drivers/llvmpipe/lp_limits.h#L69 limited to 16 threads].  The only easily findable justification for this limit is in [https://gitlab.freedesktop.org/mesa/mesa/-/commit/38a751cbe85b7e31925931dc4994e7def5e5af96 a commit from 2013], where it was increased from 8 because a user reported on a mailing list that 16 was faster for them. Given that POWER9 systems often have much higher thread counts than this, this limit may be suboptimal for POWER9.
 +
 
 +
[[User:Luke-jr|luke-jr]] anecdotally reports that bumping the limit to 128 threads noticeably improved performance in 3D games, e.g. Jedi Academy became playable.  However, it also had the side effect that most GUI applications spawned 128 LLVMpipe threads, which was annoying in <code>gdb</code>/<code>top</code>.  Luke's patch is:
 +
 
 +
diff -ur mesa-17.3.9.orig/src/gallium/drivers/llvmpipe/lp_limits.h mesa-17.3.9/src/gallium/drivers/llvmpipe/lp_limits.h
 +
--- mesa-17.3.9.orig/src/gallium/drivers/llvmpipe/lp_limits.h 2018-04-18 04:44:00.000000000 -0400
 +
+++ mesa-17.3.9/src/gallium/drivers/llvmpipe/lp_limits.h 2018-05-02 05:20:57.586000000 -0400
 +
@@ -61,7 +61,7 @@
 +
  #define LP_MAX_WIDTH  (1 &lt;&lt; (LP_MAX_TEXTURE_LEVELS - 1))
 +
 
 +
 
 +
-#define LP_MAX_THREADS 16
 +
+#define LP_MAX_THREADS 128
 +
 
 +
 
 +
  /**
 +
Only in mesa-17.3.9/src/gallium/drivers/llvmpipe: lp_limits.h~
  
 
[[Category:Ports]]
 
[[Category:Ports]]

Revision as of 09:48, 10 June 2022

Thread Count

LLVMpipe is limited to 16 threads. The only easily findable justification for this limit is in a commit from 2013, where it was increased from 8 because a user reported on a mailing list that 16 was faster for them. Given that POWER9 systems often have much higher thread counts than this, this limit may be suboptimal for POWER9.

luke-jr anecdotally reports that bumping the limit to 128 threads noticeably improved performance in 3D games, e.g. Jedi Academy became playable. However, it also had the side effect that most GUI applications spawned 128 LLVMpipe threads, which was annoying in gdb/top. Luke's patch is:

diff -ur mesa-17.3.9.orig/src/gallium/drivers/llvmpipe/lp_limits.h mesa-17.3.9/src/gallium/drivers/llvmpipe/lp_limits.h
--- mesa-17.3.9.orig/src/gallium/drivers/llvmpipe/lp_limits.h	2018-04-18 04:44:00.000000000 -0400
+++ mesa-17.3.9/src/gallium/drivers/llvmpipe/lp_limits.h	2018-05-02 05:20:57.586000000 -0400
@@ -61,7 +61,7 @@
 #define LP_MAX_WIDTH  (1 << (LP_MAX_TEXTURE_LEVELS - 1))
 
 
-#define LP_MAX_THREADS 16
+#define LP_MAX_THREADS 128
 
 
 /**
Only in mesa-17.3.9/src/gallium/drivers/llvmpipe: lp_limits.h~