summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llface.cpp16
-rw-r--r--indra/newview/llvovolume.cpp1
2 files changed, 14 insertions, 3 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;
}
}
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index c03ec67c79..a9f3abeef8 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -3354,7 +3354,6 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
model_mat = &(drawable->getRegion()->mRenderMatrix);
}
-
U8 bump = (type == LLRenderPass::PASS_BUMP || type == LLRenderPass::PASS_POST_BUMP) ? facep->getTextureEntry()->getBumpmap() : 0;
LLViewerTexture* tex = facep->getTexture();