From f40d07512ab54ba3da38c8a8b92cf0c6d1469bc6 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Fri, 4 Jun 2010 09:04:36 +0100 Subject: finish conversion to ll_aligned_*() wrappers --- indra/newview/lldrawable.cpp | 4 ++-- indra/newview/llface.cpp | 4 ++-- indra/newview/llspatialpartition.cpp | 14 +++++++------- 3 files changed, 11 insertions(+), 11 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index 04e433dcfd..96ec51300f 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -95,7 +95,7 @@ void LLDrawable::incrementVisible() void LLDrawable::init() { - mExtents = (LLVector4a*) _mm_malloc(sizeof(LLVector4a)*3, 32); + mExtents = (LLVector4a*) ll_aligned_malloc_32(sizeof(LLVector4a)*3, 32); mPositionGroup = mExtents + 2; // mXform @@ -150,7 +150,7 @@ void LLDrawable::destroy() llinfos << "- Zombie drawables: " << sNumZombieDrawables << llendl; }*/ - _mm_free(mExtents); + ll_aligned_free_32(mExtents); mExtents = mPositionGroup = NULL; } diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 0b5cf78261..9b5a1eb07c 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -152,7 +152,7 @@ void cylindricalProjection(LLVector2 &tc, const LLVector4a& normal, const LLVect void LLFace::init(LLDrawable* drawablep, LLViewerObject* objp) { - mExtents = (LLVector4a*) _mm_malloc(sizeof(LLVector4a)*2, 16); + mExtents = (LLVector4a*) ll_aligned_malloc_16(sizeof(LLVector4a)*2); mLastUpdateTime = gFrameTimeSeconds; mLastMoveTime = 0.f; @@ -269,7 +269,7 @@ void LLFace::destroy() mVObjp = NULL; } - _mm_free(mExtents); + ll_aligned_free_16(mExtents); mExtents = NULL; } diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 05e7bbb6cd..e5d0e064c6 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -239,7 +239,7 @@ void LLSpatialGroup::buildOcclusion() { if (!mOcclusionVerts) { - mOcclusionVerts = (LLVector4a*) _mm_malloc(sizeof(LLVector4a)*8, 16); + mOcclusionVerts = (LLVector4a*) ll_aligned_malloc_16(sizeof(LLVector4a)*8); } LLVector4a fudge; @@ -342,13 +342,13 @@ LLSpatialGroup::~LLSpatialGroup() sQueryPool.release(mOcclusionQuery[LLViewerCamera::sCurCameraID]); } - _mm_free(mOcclusionVerts); + ll_aligned_free_16(mOcclusionVerts); LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); clearDrawMap(); clearAtlasList() ; - _mm_free(mBounds); + ll_aligned_free_16(mBounds); } BOOL LLSpatialGroup::hasAtlas(LLTextureAtlas* atlasp) @@ -1163,7 +1163,7 @@ LLSpatialGroup::LLSpatialGroup(OctreeNode* node, LLSpatialPartition* part) : sNodeCount++; LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); - mBounds = (LLVector4a*) _mm_malloc(sizeof(LLVector4a) * V4_COUNT, 16); + mBounds = (LLVector4a*) ll_aligned_malloc_16(sizeof(LLVector4a) * V4_COUNT); mExtents = mBounds + EXTENTS; mObjectBounds = mBounds + OBJECT_BOUNDS; mObjectExtents = mBounds + OBJECT_EXTENTS; @@ -1434,7 +1434,7 @@ void LLSpatialGroup::destroyGL() } } - _mm_free(mOcclusionVerts); + ll_aligned_free_16(mOcclusionVerts); mOcclusionVerts = NULL; for (LLSpatialGroup::element_iter i = getData().begin(); i != getData().end(); ++i) @@ -3502,7 +3502,7 @@ LLDrawInfo::LLDrawInfo(U16 start, U16 end, U32 count, U32 offset, mDrawMode(LLRender::TRIANGLES) { mVertexBuffer->validateRange(mStart, mEnd, mCount, mOffset); - mExtents = (LLVector4a*) _mm_malloc(sizeof(LLVector4a)*2, 16); + mExtents = (LLVector4a*) ll_aligned_malloc_16(sizeof(LLVector4a)*2); mDebugColor = (rand() << 16) + rand(); } @@ -3524,7 +3524,7 @@ LLDrawInfo::~LLDrawInfo() gPipeline.checkReferences(this); } - _mm_free(mExtents); + ll_aligned_free_16(mExtents); } void LLDrawInfo::validate() -- cgit v1.2.3