[Mesa-dev] [PATCH 0/3][RFC v2] Clamp rgba floats with sse

Juha-Pekka Heikkila juhapekka.heikkila at gmail.com
Tue Nov 4 04:05:28 PST 2014


Here is new version of sse2 clamping, one patch grew into small set.

Now sse2 stuff is separated into its own object which will get
-msse2 compile flag. I did sse'ize also rest of _mesa_map_rgba function.
As previously there are ifdefs which I don't think look nice but I tried
to keep looks of the code (new versus old) similar.

What is now the biggest 'rfc' part here is where should all this sse2 stuff
really exist in. This patch set show my suggestion, I made 'x86' folder under
src/mesa/main. The idea here being if there is optimization targeting
architecture it'd exist directly under the place where it was used, in its
own subdirectly indicating targeted architecture. I don't think majority
of such code would be generic code thus this approach.

/Juha-Pekka

Juha-Pekka Heikkila (3):
  configure.ac: Add detection for sse2 compilation support
  mesa/main/x86: Add sse2 streaming clamping
  mesa/main: Clamp rgba with streamed sse

 configure.ac                      |   7 +++
 src/mesa/Makefile.am              |   8 +++
 src/mesa/main/pixeltransfer.c     |  62 ++++++++++++++++-------
 src/mesa/main/x86/sse2_clamping.c | 103 ++++++++++++++++++++++++++++++++++++++
 src/mesa/main/x86/sse2_clamping.h |  49 ++++++++++++++++++
 5 files changed, 210 insertions(+), 19 deletions(-)
 create mode 100644 src/mesa/main/x86/sse2_clamping.c
 create mode 100644 src/mesa/main/x86/sse2_clamping.h

-- 
1.8.5.1



More information about the mesa-dev mailing list