Remove ll_aligned_malloc from llspatialpartition
parent
892d70f5d5
commit
4b5ddf1c41
|
|
@ -236,7 +236,7 @@ void LLSpatialGroup::buildOcclusion()
|
|||
{
|
||||
if (!mOcclusionVerts)
|
||||
{
|
||||
mOcclusionVerts = (LLVector4a*) ll_aligned_malloc_16(sizeof(LLVector4a)*8);
|
||||
mOcclusionVerts = new LLVector4a[8];
|
||||
}
|
||||
|
||||
LLVector4a fudge;
|
||||
|
|
@ -339,14 +339,12 @@ LLSpatialGroup::~LLSpatialGroup()
|
|||
sQueryPool.release(mOcclusionQuery[LLViewerCamera::sCurCameraID]);
|
||||
}
|
||||
|
||||
ll_aligned_free_16(mOcclusionVerts);
|
||||
delete [] mOcclusionVerts;
|
||||
mOcclusionVerts = NULL;
|
||||
|
||||
LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
|
||||
clearDrawMap();
|
||||
clearAtlasList() ;
|
||||
|
||||
ll_aligned_free_16(mBounds);
|
||||
}
|
||||
|
||||
BOOL LLSpatialGroup::hasAtlas(LLTextureAtlas* atlasp)
|
||||
|
|
@ -1161,17 +1159,10 @@ LLSpatialGroup::LLSpatialGroup(OctreeNode* node, LLSpatialPartition* part) :
|
|||
sNodeCount++;
|
||||
LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
|
||||
|
||||
mBounds = (LLVector4a*) ll_aligned_malloc_16(sizeof(LLVector4a) * V4_COUNT);
|
||||
mExtents = mBounds + EXTENTS;
|
||||
mObjectBounds = mBounds + OBJECT_BOUNDS;
|
||||
mObjectExtents = mBounds + OBJECT_EXTENTS;
|
||||
mViewAngle = mBounds+VIEW_ANGLE;
|
||||
mLastUpdateViewAngle = mBounds+LAST_VIEW_ANGLE;
|
||||
|
||||
mViewAngle->splat(0.f);
|
||||
mLastUpdateViewAngle->splat(-1.f);
|
||||
mViewAngle.splat(0.f);
|
||||
mLastUpdateViewAngle.splat(-1.f);
|
||||
mExtents[0] = mExtents[1] = mObjectBounds[0] = mObjectBounds[0] = mObjectBounds[1] =
|
||||
mObjectExtents[0] = mObjectExtents[1] = *mViewAngle;
|
||||
mObjectExtents[0] = mObjectExtents[1] = mViewAngle;
|
||||
|
||||
sg_assert(mOctreeNode->getListenerCount() == 0);
|
||||
mOctreeNode->addListener(this);
|
||||
|
|
@ -1247,12 +1238,12 @@ F32 LLSpatialPartition::calcDistance(LLSpatialGroup* group, LLCamera& camera)
|
|||
LLVector4a view_angle = eye;
|
||||
|
||||
LLVector4a diff;
|
||||
diff.setSub(view_angle, *group->mLastUpdateViewAngle);
|
||||
diff.setSub(view_angle, group->mLastUpdateViewAngle);
|
||||
|
||||
if (diff.getLength3().getF32() > 0.64f)
|
||||
{
|
||||
*group->mViewAngle = view_angle;
|
||||
*group->mLastUpdateViewAngle = view_angle;
|
||||
group->mViewAngle = view_angle;
|
||||
group->mLastUpdateViewAngle = view_angle;
|
||||
//for occasional alpha sorting within the group
|
||||
//NOTE: If there is a trivial way to detect that alpha sorting here would not change the render order,
|
||||
//not setting this node to dirty would be a very good thing
|
||||
|
|
@ -1432,7 +1423,7 @@ void LLSpatialGroup::destroyGL()
|
|||
}
|
||||
}
|
||||
|
||||
ll_aligned_free_16(mOcclusionVerts);
|
||||
delete [] mOcclusionVerts;
|
||||
mOcclusionVerts = NULL;
|
||||
|
||||
for (LLSpatialGroup::element_iter i = getData().begin(); i != getData().end(); ++i)
|
||||
|
|
@ -4187,8 +4178,7 @@ LLDrawInfo::LLDrawInfo(U16 start, U16 end, U32 count, U32 offset,
|
|||
mDrawMode(LLRender::TRIANGLES)
|
||||
{
|
||||
mVertexBuffer->validateRange(mStart, mEnd, mCount, mOffset);
|
||||
mExtents = (LLVector4a*) ll_aligned_malloc_16(sizeof(LLVector4a)*2);
|
||||
|
||||
|
||||
mDebugColor = (rand() << 16) + rand();
|
||||
}
|
||||
|
||||
|
|
@ -4208,8 +4198,6 @@ LLDrawInfo::~LLDrawInfo()
|
|||
{
|
||||
gPipeline.checkReferences(this);
|
||||
}
|
||||
|
||||
ll_aligned_free_16(mExtents);
|
||||
}
|
||||
|
||||
void LLDrawInfo::validate()
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ public:
|
|||
|
||||
void validate();
|
||||
|
||||
LLVector4a* mExtents;
|
||||
LLVector4a mExtents[2];
|
||||
|
||||
LLPointer<LLVertexBuffer> mVertexBuffer;
|
||||
LLPointer<LLViewerTexture> mTexture;
|
||||
|
|
@ -357,12 +357,12 @@ public:
|
|||
V4_COUNT = 10
|
||||
} eV4Index;
|
||||
|
||||
LLVector4a* mBounds; // bounding box (center, size) of this node and all its children (tight fit to objects)
|
||||
LLVector4a* mExtents; // extents (min, max) of this node and all its children
|
||||
LLVector4a* mObjectExtents; // extents (min, max) of objects in this node
|
||||
LLVector4a* mObjectBounds; // bounding box (center, size) of objects in this node
|
||||
LLVector4a* mViewAngle;
|
||||
LLVector4a* mLastUpdateViewAngle;
|
||||
LLVector4a mBounds[2]; // bounding box (center, size) of this node and all its children (tight fit to objects)
|
||||
LLVector4a mExtents[2]; // extents (min, max) of this node and all its children
|
||||
LLVector4a mObjectExtents[2]; // extents (min, max) of objects in this node
|
||||
LLVector4a mObjectBounds[2]; // bounding box (center, size) of objects in this node
|
||||
LLVector4a mViewAngle;
|
||||
LLVector4a mLastUpdateViewAngle;
|
||||
|
||||
private:
|
||||
U32 mCurUpdatingTime ;
|
||||
|
|
|
|||
Loading…
Reference in New Issue