diff options
Diffstat (limited to 'indra/llmath')
-rw-r--r-- | indra/llmath/llv4math.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/indra/llmath/llv4math.h b/indra/llmath/llv4math.h index 4a299716b1..f064b39947 100644 --- a/indra/llmath/llv4math.h +++ b/indra/llmath/llv4math.h @@ -9,6 +9,25 @@ #ifndef LL_LLV4MATH_H #define LL_LLV4MATH_H +// *NOTE: We do not support SSE acceleration on Windows builds. +// Our minimum specification for the viewer includes 1 GHz Athlon processors, +// which covers the Athlon Thunderbird series that does not support SSE. +// +// Our header files include statements like this +// const F32 HAVOK_TIMESTEP = 1.f / 45.f; +// This creates "globals" that are included in each .obj file. If a single +// .cpp file has SSE code generation turned on (eg, llviewerjointmesh_sse.cpp) +// these globals will be initialized using SSE instructions. This causes SL +// to crash before main() on processors without SSE. Untangling all these +// headers/variables is too much work for the small performance gains of +// vectorization. +// +// Therefore we only support vectorization on builds where the everything is +// built with SSE or Altivec. See https://jira.secondlife.com/browse/VWR-1610 +// and https://jira.lindenlab.com/browse/SL-47720 for details. +// +// Sorry the code is such a mess. JC + //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- // LLV4MATH - GNUC @@ -46,6 +65,9 @@ typedef float V4F32 __attribute__((vector_size(16))); //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- +// Only vectorize if the entire Windows build uses SSE. +// _M_IX86_FP is set when SSE code generation is turned on, and I have +// confirmed this in VS2003, VS2003 SP1, and VS2005. JC #if LL_MSVC && _M_IX86_FP #define LL_VECTORIZE 1 |