summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorbrad kittenbrink <brad@lindenlab.com>2011-05-12 16:09:42 -0700
committerbrad kittenbrink <brad@lindenlab.com>2011-05-12 16:09:42 -0700
commit2a843e9a6bb5cb70f69794419ab4a7d16ee3c6cb (patch)
treeb9ab49342513f0f3fc80c58df7657c92f67f1bc2 /indra/newview
parentb3dddbf30b42eff8ef7031c63e91244f07e8bd77 (diff)
Fix up alignment problems for debug build.
reviewed by davep.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llpolymesh.cpp4
-rw-r--r--indra/newview/llspatialpartition.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/indra/newview/llpolymesh.cpp b/indra/newview/llpolymesh.cpp
index 4b2c569cc3..450f9b2be7 100644
--- a/indra/newview/llpolymesh.cpp
+++ b/indra/newview/llpolymesh.cpp
@@ -770,7 +770,7 @@ LLPolyMesh::LLPolyMesh(LLPolyMeshSharedData *shared_data, LLPolyMesh *reference_
int nverts = mSharedData->mNumVertices;
int nfloats = nverts * (2*4 + 3*3 + 2 + 4);
//use 16 byte aligned vertex data to make LLPolyMesh SSE friendly
- mVertexData = (F32*) malloc(nfloats*4);
+ mVertexData = (F32*) ll_aligned_malloc_16(nfloats*4);
int offset = 0;
mCoords = (LLVector4*)(mVertexData + offset); offset += 4*nverts;
mNormals = (LLVector4*)(mVertexData + offset); offset += 4*nverts;
@@ -799,7 +799,7 @@ LLPolyMesh::~LLPolyMesh()
mJointRenderData[i] = NULL;
}
- free(mVertexData);
+ ll_aligned_free_16(mVertexData);
}
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index 65f7d299bc..34a42ff28b 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -3169,11 +3169,11 @@ void renderPhysicsShape(LLDrawable* drawable, LLVOVolume* volume)
LLConvexDecomposition::getInstance()->generateSingleHullMeshFromMesh( &mesh, &res );
//copy res into phys_volume
- phys_volume->mHullPoints = (LLVector4a*) malloc(sizeof(LLVector4a)*res.mNumVertices);
+ phys_volume->mHullPoints = (LLVector4a*) ll_aligned_malloc_16(sizeof(LLVector4a)*res.mNumVertices);
phys_volume->mNumHullPoints = res.mNumVertices;
S32 idx_size = (res.mNumTriangles*3*2+0xF) & ~0xF;
- phys_volume->mHullIndices = (U16*) malloc(idx_size);
+ phys_volume->mHullIndices = (U16*) ll_aligned_malloc_16(idx_size);
phys_volume->mNumHullIndices = res.mNumTriangles*3;
const F32* v = res.mVertexBase;