[sldev] SSE/Vector stuff

Dirk Moerenhout blakar at gmail.com
Sat Jul 7 10:13:02 PDT 2007


I checked why my version won't use SSE and it might be related to the
fact that I use my own adaptation of the solution files. In llv4math.h
it checks for _M_IX86_FP which is a predefined macro that returns 0 if
you enabled no SSE, 1 for SSE and 2 for SSE2. As I did not enable
compiling SSE yet it'll return 0 and hence LL_VECTORIZE is not set.

Strange thing is that as far as I know LL is still building using VS
2003 and VS 2003 does not have the _M_IX86_FP macro so even if you
compile with /arch:SSE2 in VS2003 you'll not get SSE2 support.

1.17.3.0 is still build using VS2003 (linker version returned from exe
is 7.1) so I guess you won't have SSE support regardless of whether
they compiled with /arch:SSE2 or not.

I'm also not completely convinced their approach is safe as relying on
the macro outside the files that contain the actual SSE code means you
must enable /arch:SSE2 for files that may end up having things
translated into SSE for all platforms. As such your binary may no
longer run on non-SSE enabled CPU's even though you thought it would.

Dirk aka Blakar Ogre

On 7/7/07, Dirk Moerenhout <blakar at gmail.com> wrote:
> Output of 1.17.3.0
> 2007-07-07T16:30:19Z INFO: update_vector_performances: Vectorization
>       : ENABLED
> 2007-07-07T16:30:19Z INFO: update_vector_performances: Vector
> Processor      : SSE2
> 2007-07-07T16:30:19Z INFO: update_vector_performances: Vectorized
> Skinning   : ENABLED
>
> Output from my test 1.18.0.4 build:
> 2007-07-07T16:38:27Z INFO: update_vector_performances: Vectorization
>       : ENABLED
> 2007-07-07T16:38:27Z INFO: update_vector_performances: Vector
> Processor      : SSE2
> 2007-07-07T16:38:27Z INFO: update_vector_performances: Vectorized
> Skinning   : ENABLED
>
> BUT!
>
> If you check the source (llviewerjointmesh_sse.cpp and
> llviewerjointmesh_sse2.cpp) you'll find that if #LL_VECTORIZE is not
> defined SSE and SSE2 call the non-SSE version.
>
> In 1.18.0.4 it seems turned off by default. I guess same may apply to
> 1.17.3.0. So the log doesn't guarantee you you're actually using SSE.
>
> Dirk aka Blakar Ogre
>
> On 7/7/07, Nicholaz Beresford <nicholaz at blueflash.cc> wrote:
> >
> >  From what I saw it does a test run with and without
> > at the beginning and then saves an option.  Dunno if
> > that option is buried in the debug menus somewhere,
> > I was just looking at the source diffs.   But the
> > regular log should show a few new entries about
> > "Vector" ...
> >
> >
> > Nick
> >
> >
> > Second Life from the inside out:
> > http://nicholaz-beresford.blogspot.com/
> >
> >
> > Dirk Moerenhout wrote:
> > > Is it enabled? There's SSE stuff in 1.18.0.4 too but I don't think
> > > it's on by default.
> > >
> > > Dirk aka Blakar Ogre
> > >
> > > On 7/7/07, Nicholaz Beresford <nicholaz at blueflash.cc> wrote:
> > >>
> > >> Did anyone notice the changes about SSE optimization
> > >> in the 1.17.3 viewer?  I have not looked at them yet,
> > >> but I've seen comments on my blog (and Linden blog also)
> > >> that 1.17.3 was slow (e.g. with flexi prims) and that
> > >> stuff is the only I've seen in the source diff that could
> > >> account for that.
> > >>
> > >>
> > >> Nick
> > >>
> > >> --
> > >> Second Life from the inside out:
> > >> http://nicholaz-beresford.blogspot.com/
> > >> _______________________________________________
> > >> Click here to unsubscribe or manage your list subscription:
> > >> /index.html
> > >>
> >
>


More information about the SLDev mailing list