[Mesa-dev] [PATCH 0/5] Optimizing llvmpipe for POWER8 architecture

Oded Gabbay oded.gabbay at gmail.com
Tue Dec 29 08:12:30 PST 2015


I did a couple of modest optimizations in llvmpipe to increase the 
performance when running on a POWER8 machine. These optimizations are both 
for ppc64le and ppc64.

Basically, I looked at all the places where there are special code paths for 
SSE (using the PIPE_ARCH_SSE define), and implemented those code paths with
VMX/VSX instructions.

It wasn't trivial as there are some instructions in SSE which don't have an 
exact match in VMX/VSX, and using regular instructions to implement those 
functions made performance much worse. Finally, I managed to fix that by 
limiting the optimized code to run only on POWER8 architecture, as there are
important vector instructions which I needed that weren't implemented in 
previous architectures (POWER7 and below).

I used glmark2, openarena and xonotic for benchmarking. I run each 
test 10 times, and calculated the average result without the highest and 
lowest results. 

My goal was to arrive to roughly the same improvement the SSE optimizations 
made on Haswell.

On my Haswell laptop, I got the following results***:

Name 	          SSE Disabled   SSE Enabled     Delta
glmark2	(score)       228            235         3.07%
openarena             37.5           38.4        2.40%
xonotic               8.7825         9.3492      6.45%

*** It's important to note I run the benchmarks using 
LP_NATIVE_VECTOR_WIDTH=128 to make sure AVX is not used.

After applying all the patches below on my POWER8 machine, I got the 
following results:

  Name            Before     After    Delta
glmark2 (score)   136.6      143      4.69%
openarena         16.14      16.7     3.47%
xonotic           4.655      4.97     6.73%

Hopefully, this won't be the last optimizations for POWER8.

   - Oded

Oded Gabbay (5):
  configure.ac: Detect if running on POWER8 arch
  llvmpipe: add POWER8 portability file - u_pwr8.h
  llvmpipe: Optimize do_triangle_ccw for POWER8
  llvmpipe: Optimize BUILD_MASK(_LINEAR) for POWER8
  llvmpipe: Optimize lp_rast_triangle_32_3_16 for POWER8

 configure.ac                                |  30 +++
 src/gallium/auxiliary/util/u_pwr8.h         | 298 ++++++++++++++++++++++++++++
 src/gallium/drivers/llvmpipe/lp_rast_tri.c  | 290 +++++++++++++++++++++++----
 src/gallium/drivers/llvmpipe/lp_setup_tri.c |  96 +++++++++
 4 files changed, 674 insertions(+), 40 deletions(-)
 create mode 100644 src/gallium/auxiliary/util/u_pwr8.h


More information about the mesa-dev mailing list