diff options
author | James Cook <james@lindenlab.com> | 2007-07-11 21:10:53 +0000 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2007-07-11 21:10:53 +0000 |
commit | a6769f262ff910949a7e1c81cf98e52ddfc2d44a (patch) | |
tree | 636700d8e2b4a040d39cfd5daa8e890660a8ec37 /indra/llmath | |
parent | 873b83c2424524845c19339a08d7fd5e0f1ae805 (diff) |
SL-47720 Crash on startup due to SSE instructions. Disable SSE code generation on Windows build. This prevents global constants from being initialized with SSE instructions. We can use the SSE code on Intel Mac (since they all support SSE) and if we enable SSE compilation for the entire Windows viewer. Reviewed by Kelly.
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 |