summaryrefslogtreecommitdiff
path: root/indra/llappearance
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llappearance')
-rw-r--r--indra/llappearance/lldriverparam.h5
-rw-r--r--indra/llappearance/llpolymesh.cpp2
-rw-r--r--indra/llappearance/llpolymorph.cpp18
-rw-r--r--indra/llappearance/llpolymorph.h6
-rw-r--r--indra/llappearance/llpolyskeletaldistortion.h5
-rw-r--r--indra/llappearance/lltexlayerparams.h18
-rw-r--r--indra/llappearance/llviewervisualparam.h3
7 files changed, 35 insertions, 22 deletions
diff --git a/indra/llappearance/lldriverparam.h b/indra/llappearance/lldriverparam.h
index 00f43156bb..040c9cf5be 100644
--- a/indra/llappearance/lldriverparam.h
+++ b/indra/llappearance/lldriverparam.h
@@ -76,6 +76,7 @@ protected:
//-----------------------------------------------------------------------------
+LL_ALIGN_PREFIX(16)
class LLDriverParam : public LLViewerVisualParam
{
private:
@@ -131,13 +132,13 @@ protected:
void setDrivenWeight(LLDrivenEntry *driven, F32 driven_weight, bool upload_bake);
- LLVector4a mDefaultVec; // temp holder
+ LL_ALIGN_16(LLVector4a mDefaultVec); // temp holder
typedef std::vector<LLDrivenEntry> entry_list_t;
entry_list_t mDriven;
LLViewerVisualParam* mCurrentDistortionParam;
// Backlink only; don't make this an LLPointer.
LLAvatarAppearance* mAvatarAppearance;
LLWearable* mWearablep;
-};
+} LL_ALIGN_POSTFIX(16);
#endif // LL_LLDRIVERPARAM_H
diff --git a/indra/llappearance/llpolymesh.cpp b/indra/llappearance/llpolymesh.cpp
index b1370ab1e3..a01457246e 100644
--- a/indra/llappearance/llpolymesh.cpp
+++ b/indra/llappearance/llpolymesh.cpp
@@ -749,8 +749,6 @@ const LLVector2 &LLPolyMeshSharedData::getUVs(U32 index)
//-----------------------------------------------------------------------------
LLPolyMesh::LLPolyMesh(LLPolyMeshSharedData *shared_data, LLPolyMesh *reference_mesh)
{
- LLMemType mt(LLMemType::MTYPE_AVATAR_MESH);
-
llassert(shared_data);
mSharedData = shared_data;
diff --git a/indra/llappearance/llpolymorph.cpp b/indra/llappearance/llpolymorph.cpp
index f7c4a69186..8a17819083 100644
--- a/indra/llappearance/llpolymorph.cpp
+++ b/indra/llappearance/llpolymorph.cpp
@@ -74,9 +74,11 @@ LLPolyMorphData::LLPolyMorphData(const LLPolyMorphData &rhs) :
{
const S32 numVertices = mNumIndices;
- mCoords = static_cast<LLVector4a*>(ll_aligned_malloc_16(numVertices * sizeof(LLVector4a)));
- mNormals = static_cast<LLVector4a*>(ll_aligned_malloc_16(numVertices * sizeof(LLVector4a)));
- mBinormals = static_cast<LLVector4a*>(ll_aligned_malloc_16(numVertices * sizeof(LLVector4a)));
+ U32 size = sizeof(LLVector4a)*numVertices;
+
+ mCoords = static_cast<LLVector4a*>( ll_aligned_malloc_16(size) );
+ mNormals = static_cast<LLVector4a*>( ll_aligned_malloc_16(size) );
+ mBinormals = static_cast<LLVector4a*>( ll_aligned_malloc_16(size) );
mTexCoords = new LLVector2[numVertices];
mVertexIndices = new U32[numVertices];
@@ -122,9 +124,13 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh)
//-------------------------------------------------------------------------
// allocate vertices
//-------------------------------------------------------------------------
- mCoords = static_cast<LLVector4a*>(ll_aligned_malloc_16(numVertices * sizeof(LLVector4a)));
- mNormals = static_cast<LLVector4a*>(ll_aligned_malloc_16(numVertices * sizeof(LLVector4a)));
- mBinormals = static_cast<LLVector4a*>(ll_aligned_malloc_16(numVertices * sizeof(LLVector4a)));
+
+ U32 size = sizeof(LLVector4a)*numVertices;
+
+ mCoords = static_cast<LLVector4a*>(ll_aligned_malloc_16(size));
+ mNormals = static_cast<LLVector4a*>(ll_aligned_malloc_16(size));
+ mBinormals = static_cast<LLVector4a*>(ll_aligned_malloc_16(size));
+
mTexCoords = new LLVector2[numVertices];
// Actually, we are allocating more space than we need for the skiplist
mVertexIndices = new U32[numVertices];
diff --git a/indra/llappearance/llpolymorph.h b/indra/llappearance/llpolymorph.h
index ce76ec17ff..ee380ae7c3 100644
--- a/indra/llappearance/llpolymorph.h
+++ b/indra/llappearance/llpolymorph.h
@@ -41,6 +41,7 @@ class LLWearable;
//-----------------------------------------------------------------------------
// LLPolyMorphData()
//-----------------------------------------------------------------------------
+LL_ALIGN_PREFIX(16)
class LLPolyMorphData
{
public:
@@ -75,12 +76,13 @@ public:
F32 mTotalDistortion; // vertex distortion summed over entire morph
F32 mMaxDistortion; // maximum single vertex distortion in a given morph
- LLVector4a mAvgDistortion; // average vertex distortion, to infer directionality of the morph
+ LL_ALIGN_16(LLVector4a mAvgDistortion); // average vertex distortion, to infer directionality of the morph
LLPolyMeshSharedData* mMesh;
private:
void freeData();
-};
+} LL_ALIGN_POSTFIX(16);
+
//-----------------------------------------------------------------------------
// LLPolyVertexMask()
diff --git a/indra/llappearance/llpolyskeletaldistortion.h b/indra/llappearance/llpolyskeletaldistortion.h
index b9c3c3628d..170f8e8771 100644
--- a/indra/llappearance/llpolyskeletaldistortion.h
+++ b/indra/llappearance/llpolyskeletaldistortion.h
@@ -63,6 +63,7 @@ struct LLPolySkeletalBoneInfo
BOOL mHasPositionDeformation;
};
+LL_ALIGN_PREFIX(16)
class LLPolySkeletalDistortionInfo : public LLViewerVisualParamInfo
{
friend class LLPolySkeletalDistortion;
@@ -118,13 +119,13 @@ public:
/*virtual*/ const LLVector4a* getNextDistortion(U32 *index, LLPolyMesh **poly_mesh){index = 0; poly_mesh = NULL; return NULL;};
protected:
+ LL_ALIGN_16(LLVector4a>-mDefaultVec);
typedef std::map<LLJoint*, LLVector3> joint_vec_map_t;
joint_vec_map_t mJointScales;
joint_vec_map_t mJointOffsets;
- LLVector4a mDefaultVec;
// Backlink only; don't make this an LLPointer.
LLAvatarAppearance *mAvatar;
-};
+} LL_ALIGN_POSTFIX(16);
#endif // LL_LLPOLYSKELETALDISTORTION_H
diff --git a/indra/llappearance/lltexlayerparams.h b/indra/llappearance/lltexlayerparams.h
index ca1497ebf3..b38d28d3eb 100644
--- a/indra/llappearance/lltexlayerparams.h
+++ b/indra/llappearance/lltexlayerparams.h
@@ -60,6 +60,7 @@ protected:
// LLTexLayerParamAlpha
//
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+LL_ALIGN_PREFIX(16)
class LLTexLayerParamAlpha : public LLTexLayerParam
{
public:
@@ -67,8 +68,6 @@ public:
LLTexLayerParamAlpha( LLAvatarAppearance* appearance );
/*virtual*/ ~LLTexLayerParamAlpha();
- /*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable = NULL) const;
-
void* operator new(size_t size)
{
return ll_aligned_malloc_16(size);
@@ -79,6 +78,8 @@ public:
ll_aligned_free_16(ptr);
}
+ /*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable = NULL) const;
+
// LLVisualParam Virtual functions
///*virtual*/ BOOL parseData(LLXmlTreeNode* node);
/*virtual*/ void apply( ESex avatar_sex ) {}
@@ -106,7 +107,7 @@ private:
LLPointer<LLImageRaw> mStaticImageRaw;
BOOL mNeedsCreateTexture;
BOOL mStaticImageInvalid;
- LLVector4a mAvgDistortionVec;
+ LL_ALIGN_16(LLVector4a mAvgDistortionVec);
F32 mCachedEffectiveWeight;
public:
@@ -116,7 +117,7 @@ public:
typedef std::list< LLTexLayerParamAlpha* > param_alpha_ptr_list_t;
static param_alpha_ptr_list_t sInstances;
-};
+} LL_ALIGN_POSTFIX(16);
class LLTexLayerParamAlphaInfo : public LLViewerVisualParamInfo
{
friend class LLTexLayerParamAlpha;
@@ -140,6 +141,8 @@ private:
// LLTexLayerParamColor
//
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+LL_ALIGN_PREFIX(16)
class LLTexLayerParamColor : public LLTexLayerParam
{
public:
@@ -153,7 +156,6 @@ public:
LLTexLayerParamColor( LLTexLayerInterface* layer );
LLTexLayerParamColor( LLAvatarAppearance* appearance );
- /* virtual */ ~LLTexLayerParamColor();
void* operator new(size_t size)
{
@@ -165,6 +167,8 @@ public:
ll_aligned_free_16(ptr);
}
+ /* virtual */ ~LLTexLayerParamColor();
+
/*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable = NULL) const;
// LLVisualParam Virtual functions
@@ -188,8 +192,8 @@ public:
protected:
virtual void onGlobalColorChanged(bool upload_bake) {}
private:
- LLVector4a mAvgDistortionVec;
-};
+ LL_ALIGN_16(LLVector4a mAvgDistortionVec);
+} LL_ALIGN_POSTFIX(16);
class LLTexLayerParamColorInfo : public LLViewerVisualParamInfo
{
diff --git a/indra/llappearance/llviewervisualparam.h b/indra/llappearance/llviewervisualparam.h
index 3bc95cbfbf..2826e6c316 100644
--- a/indra/llappearance/llviewervisualparam.h
+++ b/indra/llappearance/llviewervisualparam.h
@@ -65,6 +65,7 @@ protected:
// VIRTUAL CLASS
// a viewer side interface class for a generalized parametric modification of the avatar mesh
//-----------------------------------------------------------------------------
+LL_ALIGN_PREFIX(16)
class LLViewerVisualParam : public LLVisualParam
{
public:
@@ -104,6 +105,6 @@ public:
BOOL getCrossWearable() const { return getInfo()->mCrossWearable; }
-};
+} LL_ALIGN_POSTFIX(16);
#endif // LL_LLViewerVisualParam_H