summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2010-10-28 17:40:28 -0500
committerDave Parks <davep@lindenlab.com>2010-10-28 17:40:28 -0500
commit94c2e4c0ae8e964f6be29ec82e20d647c2abb904 (patch)
treea0594aa88ec5cd10e71c4632f24ab42d4a2761fd
parent3084bd5209d3185a7edbabf8da14fe431d2041d1 (diff)
Fix for NAN getting copied for some color values (NAN is purple).
-rw-r--r--indra/newview/llface.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index e862d91aca..4de61964c7 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -1658,12 +1658,16 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
{
LLVector4a src;
- src.splat(reinterpret_cast<F32&>(color.mAll));
+ U32 vec[4];
+ vec[0] = vec[1] = vec[2] = vec[3] = color.mAll;
+
+ src.loadua((F32*) vec);
- F32* dst = (F32*) colors.get();
- for (S32 i = 0; i < num_vertices; i+=4)
+ LLVector4a* dst = (LLVector4a*) colors.get();
+ S32 num_vecs = num_vertices/4;
+ for (S32 i = 0; i < num_vecs; i++)
{
- LLVector4a::copy4a(dst+i, (F32*) &src);
+ dst[i] = src;
}
}