summaryrefslogtreecommitdiff
path: root/indra/newview/llface.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2010-05-26 15:05:28 -0500
committerDave Parks <davep@lindenlab.com>2010-05-26 15:05:28 -0500
commit82c7088932061de1f1e5f75945a063be4d506447 (patch)
tree62a39b353e3e0363184e11b5b466d8977945aeaf /indra/newview/llface.cpp
parentfe2419b71a3a24d221a5da99c32c257dab92fcb1 (diff)
parentbac3623e26d62f6e1eb3c6be1f5fcfcf69a0e714 (diff)
merge
Diffstat (limited to 'indra/newview/llface.cpp')
-rw-r--r--indra/newview/llface.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 0f129c9d30..7a0aa9244d 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -1165,9 +1165,21 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
if (full_rebuild)
{
mVertexBuffer->getIndexStrider(indicesp, mIndicesIndex);
- for (U32 i = 0; i < (U32) num_indices; i++)
+ __m128i* dst = (__m128i*) indicesp.get();
+ __m128i* src = (__m128i*) vf.mIndices;
+ __m128i offset = _mm_set1_epi16(index_offset);
+
+ S32 end = num_indices/8;
+
+ for (S32 i = 0; i < end; i++)
+ {
+ __m128i res = _mm_add_epi16(src[i], offset);
+ _mm_storeu_si128(dst+i, res);
+ }
+
+ for (S32 i = end*8; i < num_indices; ++i)
{
- *indicesp++ = vf.mIndices[i] + index_offset;
+ indicesp[i] = vf.mIndices[i]+index_offset;
}
}