diff options
| author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2010-11-05 16:17:54 -0400 |
|---|---|---|
| committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2010-11-05 16:17:54 -0400 |
| commit | 7318214ed30f57fe04dd7828fffede949fee6245 (patch) | |
| tree | 71f22a09fe50176e9b7664611f7ad3addc254ec9 /indra/newview/llface.cpp | |
| parent | ddff1c68f22fbee00178d223eaac382836dba5f7 (diff) | |
| parent | 4a8066856756cc9153cfab398a9a9b277a9a5e5d (diff) | |
merge
Diffstat (limited to 'indra/newview/llface.cpp')
| -rw-r--r-- | indra/newview/llface.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index e862d91aca..f5a04c8c81 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -1658,12 +1658,21 @@ 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); + + LLVector4a* dst = (LLVector4a*) colors.get(); + S32 num_vecs = num_vertices/4; + if (num_vertices%4 > 0) + { + ++num_vecs; + } - F32* dst = (F32*) colors.get(); - for (S32 i = 0; i < num_vertices; i+=4) + for (S32 i = 0; i < num_vecs; i++) { - LLVector4a::copy4a(dst+i, (F32*) &src); + dst[i] = src; } } |
