diff options
author | Aura Linden <aura@lindenlab.com> | 2015-10-01 09:35:58 -0700 |
---|---|---|
committer | Aura Linden <aura@lindenlab.com> | 2015-10-01 09:35:58 -0700 |
commit | 40316f8431279d925bc677a7e2ef7b4d79bc843a (patch) | |
tree | 218b97ae3d0173a9b8c106c09306aef03f42c7f6 /indra/llmath/llvolume.cpp | |
parent | a4fef135b110045500d9afc1b558127bc2f5cd89 (diff) | |
parent | 6c422a881499c0d7649a59db47905a584bbd2bc1 (diff) |
Pulled merge to use xcode 7.
Diffstat (limited to 'indra/llmath/llvolume.cpp')
-rwxr-xr-x | indra/llmath/llvolume.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 191a6b38cb..ae714c5bce 100755 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -6084,7 +6084,7 @@ void LLVolumeFace::pushVertex(const LLVector4a& pos, const LLVector4a& norm, con if (new_verts > mNumAllocatedVertices) { - //double buffer size on expansion + // double buffer size on expansion new_verts *= 2; S32 new_tc_size = ((new_verts*8)+0xF) & ~0xF; @@ -6100,21 +6100,21 @@ void LLVolumeFace::pushVertex(const LLVector4a& pos, const LLVector4a& norm, con mNormals = mPositions+new_verts; mTexCoords = (LLVector2*) (mNormals+new_verts); - if (old_buf) - { - //positions - LLVector4a::memcpyNonAliased16((F32*) mPositions, (F32*) old_buf, old_vsize); - - //normals - LLVector4a::memcpyNonAliased16((F32*) mNormals, (F32*) (old_buf+mNumVertices), old_vsize); + if (old_buf != NULL) + { + // copy old positions into new buffer + LLVector4a::memcpyNonAliased16((F32*)mPositions, (F32*)old_buf, old_vsize); - //tex coords - LLVector4a::memcpyNonAliased16((F32*) mTexCoords, (F32*) (old_buf+mNumVertices*2), old_tc_size); - } + // normals + LLVector4a::memcpyNonAliased16((F32*)mNormals, (F32*)(old_buf + mNumVertices), old_vsize); + + // tex coords + LLVector4a::memcpyNonAliased16((F32*)mTexCoords, (F32*)(old_buf + mNumVertices * 2), old_tc_size); + } - //just clear tangents - ll_aligned_free_16(mTangents); - mTangents = NULL; + // just clear tangents + ll_aligned_free_16(mTangents); + mTangents = NULL; ll_aligned_free<64>(old_buf); mNumAllocatedVertices = new_verts; |