SL-16148 SL-16244 SL-16270 SL-16253 Remove most BlockTimers, remove LLMemTracked, introduce alignas, hook most/all reamining allocs, disable synchronous occlusion, and convert frequently accessed LLSingletons to LLSimpleton
parent
aa7ca0aea1
commit
8d20480c5f
|
|
@ -1590,7 +1590,7 @@ BOOL LLAvatarAppearance::allocateCollisionVolumes( U32 num )
|
|||
delete_and_clear_array(mCollisionVolumes);
|
||||
mNumCollisionVolumes = 0;
|
||||
|
||||
mCollisionVolumes = new(std::nothrow) LLAvatarJointCollisionVolume[num];
|
||||
mCollisionVolumes = new LLAvatarJointCollisionVolume[num];
|
||||
if (!mCollisionVolumes)
|
||||
{
|
||||
LL_WARNS() << "Failed to allocate collision volumes" << LL_ENDL;
|
||||
|
|
|
|||
|
|
@ -77,73 +77,63 @@ protected:
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
LL_ALIGN_PREFIX(16)
|
||||
class LLDriverParam : public LLViewerVisualParam
|
||||
class alignas(16) LLDriverParam : public LLViewerVisualParam
|
||||
{
|
||||
LL_ALIGN_NEW
|
||||
private:
|
||||
// Hide the default constructor. Force construction with LLAvatarAppearance.
|
||||
LLDriverParam() {}
|
||||
// Hide the default constructor. Force construction with LLAvatarAppearance.
|
||||
LLDriverParam() {}
|
||||
public:
|
||||
LLDriverParam(LLAvatarAppearance *appearance, LLWearable* wearable = NULL);
|
||||
~LLDriverParam();
|
||||
LLDriverParam(LLAvatarAppearance* appearance, LLWearable* wearable = NULL);
|
||||
~LLDriverParam();
|
||||
|
||||
void* operator new(size_t size)
|
||||
{
|
||||
return ll_aligned_malloc_16(size);
|
||||
}
|
||||
// Special: These functions are overridden by child classes
|
||||
LLDriverParamInfo* getInfo() const { return (LLDriverParamInfo*)mInfo; }
|
||||
// This sets mInfo and calls initialization functions
|
||||
BOOL setInfo(LLDriverParamInfo* info);
|
||||
|
||||
void operator delete(void* ptr)
|
||||
{
|
||||
ll_aligned_free_16(ptr);
|
||||
}
|
||||
LLAvatarAppearance* getAvatarAppearance() { return mAvatarAppearance; }
|
||||
const LLAvatarAppearance* getAvatarAppearance() const { return mAvatarAppearance; }
|
||||
|
||||
// Special: These functions are overridden by child classes
|
||||
LLDriverParamInfo* getInfo() const { return (LLDriverParamInfo*)mInfo; }
|
||||
// This sets mInfo and calls initialization functions
|
||||
BOOL setInfo(LLDriverParamInfo *info);
|
||||
void updateCrossDrivenParams(LLWearableType::EType driven_type);
|
||||
|
||||
LLAvatarAppearance* getAvatarAppearance() { return mAvatarAppearance; }
|
||||
const LLAvatarAppearance* getAvatarAppearance() const { return mAvatarAppearance; }
|
||||
/*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable) const;
|
||||
|
||||
void updateCrossDrivenParams(LLWearableType::EType driven_type);
|
||||
// LLVisualParam Virtual functions
|
||||
/*virtual*/ void apply(ESex sex) {} // apply is called separately for each driven param.
|
||||
/*virtual*/ void setWeight(F32 weight);
|
||||
/*virtual*/ void setAnimationTarget(F32 target_value);
|
||||
/*virtual*/ void stopAnimating();
|
||||
/*virtual*/ BOOL linkDrivenParams(visual_param_mapper mapper, BOOL only_cross_params);
|
||||
/*virtual*/ void resetDrivenParams();
|
||||
|
||||
/*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable) const;
|
||||
// LLViewerVisualParam Virtual functions
|
||||
/*virtual*/ F32 getTotalDistortion();
|
||||
/*virtual*/ const LLVector4a& getAvgDistortion();
|
||||
/*virtual*/ F32 getMaxDistortion();
|
||||
/*virtual*/ LLVector4a getVertexDistortion(S32 index, LLPolyMesh* poly_mesh);
|
||||
/*virtual*/ const LLVector4a* getFirstDistortion(U32* index, LLPolyMesh** poly_mesh);
|
||||
/*virtual*/ const LLVector4a* getNextDistortion(U32* index, LLPolyMesh** poly_mesh);
|
||||
|
||||
// LLVisualParam Virtual functions
|
||||
/*virtual*/ void apply( ESex sex ) {} // apply is called separately for each driven param.
|
||||
/*virtual*/ void setWeight(F32 weight);
|
||||
/*virtual*/ void setAnimationTarget( F32 target_value);
|
||||
/*virtual*/ void stopAnimating();
|
||||
/*virtual*/ BOOL linkDrivenParams(visual_param_mapper mapper, BOOL only_cross_params);
|
||||
/*virtual*/ void resetDrivenParams();
|
||||
|
||||
// LLViewerVisualParam Virtual functions
|
||||
/*virtual*/ F32 getTotalDistortion();
|
||||
/*virtual*/ const LLVector4a& getAvgDistortion();
|
||||
/*virtual*/ F32 getMaxDistortion();
|
||||
/*virtual*/ LLVector4a getVertexDistortion(S32 index, LLPolyMesh *poly_mesh);
|
||||
/*virtual*/ const LLVector4a* getFirstDistortion(U32 *index, LLPolyMesh **poly_mesh);
|
||||
/*virtual*/ const LLVector4a* getNextDistortion(U32 *index, LLPolyMesh **poly_mesh);
|
||||
S32 getDrivenParamsCount() const;
|
||||
const LLViewerVisualParam* getDrivenParam(S32 index) const;
|
||||
|
||||
S32 getDrivenParamsCount() const;
|
||||
const LLViewerVisualParam* getDrivenParam(S32 index) const;
|
||||
|
||||
typedef std::vector<LLDrivenEntry> entry_list_t;
|
||||
entry_list_t& getDrivenList() { return mDriven; }
|
||||
typedef std::vector<LLDrivenEntry> entry_list_t;
|
||||
entry_list_t& getDrivenList() { return mDriven; }
|
||||
void setDrivenList(entry_list_t& driven_list) { mDriven = driven_list; }
|
||||
|
||||
protected:
|
||||
LLDriverParam(const LLDriverParam& pOther);
|
||||
F32 getDrivenWeight(const LLDrivenEntry* driven, F32 input_weight);
|
||||
void setDrivenWeight(LLDrivenEntry *driven, F32 driven_weight);
|
||||
LLDriverParam(const LLDriverParam& pOther);
|
||||
F32 getDrivenWeight(const LLDrivenEntry* driven, F32 input_weight);
|
||||
void setDrivenWeight(LLDrivenEntry* driven, F32 driven_weight);
|
||||
|
||||
|
||||
LL_ALIGN_16(LLVector4a mDefaultVec); // temp holder
|
||||
entry_list_t mDriven;
|
||||
LLViewerVisualParam* mCurrentDistortionParam;
|
||||
// Backlink only; don't make this an LLPointer.
|
||||
LLAvatarAppearance* mAvatarAppearance;
|
||||
LLWearable* mWearablep;
|
||||
} LL_ALIGN_POSTFIX(16);
|
||||
LL_ALIGN_16(LLVector4a mDefaultVec); // temp holder
|
||||
entry_list_t mDriven;
|
||||
LLViewerVisualParam* mCurrentDistortionParam;
|
||||
// Backlink only; don't make this an LLPointer.
|
||||
LLAvatarAppearance* mAvatarAppearance;
|
||||
LLWearable* mWearablep;
|
||||
};
|
||||
|
||||
#endif // LL_LLDRIVERPARAM_H
|
||||
|
|
|
|||
|
|
@ -539,8 +539,6 @@ F32 LLPolyMorphTarget::getMaxDistortion()
|
|||
//-----------------------------------------------------------------------------
|
||||
// apply()
|
||||
//-----------------------------------------------------------------------------
|
||||
static LLTrace::BlockTimerStatHandle FTM_APPLY_MORPH_TARGET("Apply Morph");
|
||||
|
||||
void LLPolyMorphTarget::apply( ESex avatar_sex )
|
||||
{
|
||||
if (!mMorphData || mNumMorphMasksPending > 0)
|
||||
|
|
@ -548,7 +546,7 @@ void LLPolyMorphTarget::apply( ESex avatar_sex )
|
|||
return;
|
||||
}
|
||||
|
||||
LL_RECORD_BLOCK_TIME(FTM_APPLY_MORPH_TARGET);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
|
||||
mLastSex = avatar_sex;
|
||||
|
||||
|
|
|
|||
|
|
@ -41,24 +41,14 @@ class LLWearable;
|
|||
//-----------------------------------------------------------------------------
|
||||
// LLPolyMorphData()
|
||||
//-----------------------------------------------------------------------------
|
||||
LL_ALIGN_PREFIX(16)
|
||||
class LLPolyMorphData
|
||||
class alignas(16) LLPolyMorphData
|
||||
{
|
||||
LL_ALIGN_NEW
|
||||
public:
|
||||
LLPolyMorphData(const std::string& morph_name);
|
||||
~LLPolyMorphData();
|
||||
LLPolyMorphData(const LLPolyMorphData &rhs);
|
||||
|
||||
void* operator new(size_t size)
|
||||
{
|
||||
return ll_aligned_malloc_16(size);
|
||||
}
|
||||
|
||||
void operator delete(void* ptr)
|
||||
{
|
||||
ll_aligned_free_16(ptr);
|
||||
}
|
||||
|
||||
BOOL loadBinary(LLFILE* fp, LLPolyMeshSharedData *mesh);
|
||||
const std::string& getName() { return mName; }
|
||||
|
||||
|
|
@ -76,7 +66,7 @@ public:
|
|||
|
||||
F32 mTotalDistortion; // vertex distortion summed over entire morph
|
||||
F32 mMaxDistortion; // maximum single vertex distortion in a given morph
|
||||
LL_ALIGN_16(LLVector4a mAvgDistortion); // average vertex distortion, to infer directionality of the morph
|
||||
LLVector4a mAvgDistortion; // average vertex distortion, to infer directionality of the morph
|
||||
LLPolyMeshSharedData* mMesh;
|
||||
|
||||
private:
|
||||
|
|
@ -154,8 +144,9 @@ protected:
|
|||
// These morph targets must be topologically consistent with a given Polymesh
|
||||
// (share face sets)
|
||||
//-----------------------------------------------------------------------------
|
||||
class LLPolyMorphTarget : public LLViewerVisualParam
|
||||
class alignas(16) LLPolyMorphTarget : public LLViewerVisualParam
|
||||
{
|
||||
LL_ALIGN_NEW
|
||||
public:
|
||||
LLPolyMorphTarget(LLPolyMesh *poly_mesh);
|
||||
~LLPolyMorphTarget();
|
||||
|
|
@ -184,16 +175,6 @@ public:
|
|||
|
||||
void applyVolumeChanges(F32 delta_weight); // SL-315 - for resetSkeleton()
|
||||
|
||||
void* operator new(size_t size)
|
||||
{
|
||||
return ll_aligned_malloc_16(size);
|
||||
}
|
||||
|
||||
void operator delete(void* ptr)
|
||||
{
|
||||
ll_aligned_free_16(ptr);
|
||||
}
|
||||
|
||||
protected:
|
||||
LLPolyMorphTarget(const LLPolyMorphTarget& pOther);
|
||||
|
||||
|
|
|
|||
|
|
@ -188,11 +188,9 @@ BOOL LLPolySkeletalDistortion::setInfo(LLPolySkeletalDistortionInfo *info)
|
|||
//-----------------------------------------------------------------------------
|
||||
// apply()
|
||||
//-----------------------------------------------------------------------------
|
||||
static LLTrace::BlockTimerStatHandle FTM_POLYSKELETAL_DISTORTION_APPLY("Skeletal Distortion");
|
||||
|
||||
void LLPolySkeletalDistortion::apply( ESex avatar_sex )
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_POLYSKELETAL_DISTORTION_APPLY);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
|
||||
F32 effective_weight = ( getSex() & avatar_sex ) ? mCurWeight : getDefaultWeight();
|
||||
|
||||
|
|
|
|||
|
|
@ -62,9 +62,9 @@ struct LLPolySkeletalBoneInfo
|
|||
BOOL mHasPositionDeformation;
|
||||
};
|
||||
|
||||
LL_ALIGN_PREFIX(16)
|
||||
class LLPolySkeletalDistortionInfo : public LLViewerVisualParamInfo
|
||||
class alignas(16) LLPolySkeletalDistortionInfo : public LLViewerVisualParamInfo
|
||||
{
|
||||
LL_ALIGN_NEW
|
||||
friend class LLPolySkeletalDistortion;
|
||||
public:
|
||||
|
||||
|
|
@ -73,19 +73,6 @@ public:
|
|||
|
||||
/*virtual*/ BOOL parseXml(LLXmlTreeNode* node);
|
||||
|
||||
|
||||
|
||||
void* operator new(size_t size)
|
||||
{
|
||||
return ll_aligned_malloc_16(size);
|
||||
}
|
||||
|
||||
void operator delete(void* ptr)
|
||||
{
|
||||
ll_aligned_free_16(ptr);
|
||||
}
|
||||
|
||||
|
||||
protected:
|
||||
typedef std::vector<LLPolySkeletalBoneInfo> bone_info_list_t;
|
||||
bone_info_list_t mBoneInfoList;
|
||||
|
|
@ -95,19 +82,10 @@ protected:
|
|||
// LLPolySkeletalDeformation
|
||||
// A set of joint scale data for deforming the avatar mesh
|
||||
//-----------------------------------------------------------------------------
|
||||
class LLPolySkeletalDistortion : public LLViewerVisualParam
|
||||
class alignas(16) LLPolySkeletalDistortion : public LLViewerVisualParam
|
||||
{
|
||||
LL_ALIGN_NEW
|
||||
public:
|
||||
void* operator new(size_t size)
|
||||
{
|
||||
return ll_aligned_malloc_16(size);
|
||||
}
|
||||
|
||||
void operator delete(void* ptr)
|
||||
{
|
||||
ll_aligned_free_16(ptr);
|
||||
}
|
||||
|
||||
LLPolySkeletalDistortion(LLAvatarAppearance *avatarp);
|
||||
~LLPolySkeletalDistortion();
|
||||
|
||||
|
|
|
|||
|
|
@ -522,10 +522,9 @@ const LLTexLayerSetBuffer* LLTexLayerSet::getComposite() const
|
|||
return mComposite;
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_GATHER_MORPH_MASK_ALPHA("gatherMorphMaskAlpha");
|
||||
void LLTexLayerSet::gatherMorphMaskAlpha(U8 *data, S32 origin_x, S32 origin_y, S32 width, S32 height, LLRenderTarget* bound_target)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_GATHER_MORPH_MASK_ALPHA);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
memset(data, 255, width * height);
|
||||
|
||||
for( layer_list_t::iterator iter = mLayerList.begin(); iter != mLayerList.end(); iter++ )
|
||||
|
|
@ -538,10 +537,9 @@ void LLTexLayerSet::gatherMorphMaskAlpha(U8 *data, S32 origin_x, S32 origin_y, S
|
|||
renderAlphaMaskTextures(origin_x, origin_y, width, height, bound_target, true);
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_RENDER_ALPHA_MASK_TEXTURES("renderAlphaMaskTextures");
|
||||
void LLTexLayerSet::renderAlphaMaskTextures(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target, bool forceClear)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA_MASK_TEXTURES);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
const LLTexLayerSetInfo *info = getInfo();
|
||||
|
||||
bool use_shaders = LLGLSLShader::sNoFixedFunction;
|
||||
|
|
@ -1433,7 +1431,6 @@ BOOL LLTexLayer::blendAlphaTexture(S32 x, S32 y, S32 width, S32 height)
|
|||
addAlphaMask(data, originX, originY, width, height, bound_target);
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_RENDER_MORPH_MASKS("renderMorphMasks");
|
||||
void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLColor4 &layer_color, LLRenderTarget* bound_target, bool force_render)
|
||||
{
|
||||
if (!force_render && !hasMorph())
|
||||
|
|
@ -1441,7 +1438,7 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
|
|||
LL_DEBUGS() << "skipping renderMorphMasks for " << getUUID() << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
LL_RECORD_BLOCK_TIME(FTM_RENDER_MORPH_MASKS);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
BOOL success = TRUE;
|
||||
|
||||
llassert( !mParamAlphaList.empty() );
|
||||
|
|
@ -1639,10 +1636,9 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
|
|||
}
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_ADD_ALPHA_MASK("addAlphaMask");
|
||||
void LLTexLayer::addAlphaMask(U8 *data, S32 originX, S32 originY, S32 width, S32 height, LLRenderTarget* bound_target)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_ADD_ALPHA_MASK);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
S32 size = width * height;
|
||||
const U8* alphaData = getAlphaData();
|
||||
if (!alphaData && hasAlphaParams())
|
||||
|
|
@ -1983,10 +1979,9 @@ void LLTexLayerStaticImageList::deleteCachedImages()
|
|||
|
||||
// Returns an LLImageTGA that contains the encoded data from a tga file named file_name.
|
||||
// Caches the result to speed identical subsequent requests.
|
||||
static LLTrace::BlockTimerStatHandle FTM_LOAD_STATIC_TGA("getImageTGA");
|
||||
LLImageTGA* LLTexLayerStaticImageList::getImageTGA(const std::string& file_name)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_LOAD_STATIC_TGA);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
const char *namekey = mImageNames.addString(file_name);
|
||||
image_tga_map_t::const_iterator iter = mStaticImageListTGA.find(namekey);
|
||||
if( iter != mStaticImageListTGA.end() )
|
||||
|
|
@ -2013,10 +2008,9 @@ LLImageTGA* LLTexLayerStaticImageList::getImageTGA(const std::string& file_name)
|
|||
|
||||
// Returns a GL Image (without a backing ImageRaw) that contains the decoded data from a tga file named file_name.
|
||||
// Caches the result to speed identical subsequent requests.
|
||||
static LLTrace::BlockTimerStatHandle FTM_LOAD_STATIC_TEXTURE("getTexture");
|
||||
LLGLTexture* LLTexLayerStaticImageList::getTexture(const std::string& file_name, BOOL is_mask)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_LOAD_STATIC_TEXTURE);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
LLPointer<LLGLTexture> tex;
|
||||
const char *namekey = mImageNames.addString(file_name);
|
||||
|
||||
|
|
@ -2063,10 +2057,9 @@ LLGLTexture* LLTexLayerStaticImageList::getTexture(const std::string& file_name,
|
|||
|
||||
// Reads a .tga file, decodes it, and puts the decoded data in image_raw.
|
||||
// Returns TRUE if successful.
|
||||
static LLTrace::BlockTimerStatHandle FTM_LOAD_IMAGE_RAW("loadImageRaw");
|
||||
BOOL LLTexLayerStaticImageList::loadImageRaw(const std::string& file_name, LLImageRaw* image_raw)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_LOAD_IMAGE_RAW);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
BOOL success = FALSE;
|
||||
std::string path;
|
||||
path = gDirUtilp->getExpandedFilename(LL_PATH_CHARACTER,file_name);
|
||||
|
|
|
|||
|
|
@ -261,10 +261,9 @@ BOOL LLTexLayerParamAlpha::getSkip() const
|
|||
}
|
||||
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_TEX_LAYER_PARAM_ALPHA("alpha render");
|
||||
BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_TEX_LAYER_PARAM_ALPHA);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
BOOL success = TRUE;
|
||||
|
||||
if (!mTexLayer)
|
||||
|
|
|
|||
|
|
@ -63,23 +63,14 @@ protected:
|
|||
//
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
LL_ALIGN_PREFIX(16)
|
||||
class LLTexLayerParamAlpha : public LLTexLayerParam
|
||||
class alignas(16) LLTexLayerParamAlpha : public LLTexLayerParam
|
||||
{
|
||||
LL_ALIGN_NEW
|
||||
public:
|
||||
LLTexLayerParamAlpha( LLTexLayerInterface* layer );
|
||||
LLTexLayerParamAlpha( LLAvatarAppearance* appearance );
|
||||
/*virtual*/ ~LLTexLayerParamAlpha();
|
||||
|
||||
void* operator new(size_t size)
|
||||
{
|
||||
return ll_aligned_malloc_16(size);
|
||||
}
|
||||
|
||||
void operator delete(void* ptr)
|
||||
{
|
||||
ll_aligned_free_16(ptr);
|
||||
}
|
||||
|
||||
/*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable = NULL) const;
|
||||
|
||||
// LLVisualParam Virtual functions
|
||||
|
|
@ -146,9 +137,9 @@ private:
|
|||
//
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
LL_ALIGN_PREFIX(16)
|
||||
class LLTexLayerParamColor : public LLTexLayerParam
|
||||
class alignas(16) LLTexLayerParamColor : public LLTexLayerParam
|
||||
{
|
||||
LL_ALIGN_NEW
|
||||
public:
|
||||
enum EColorOperation
|
||||
{
|
||||
|
|
@ -161,16 +152,6 @@ public:
|
|||
LLTexLayerParamColor( LLTexLayerInterface* layer );
|
||||
LLTexLayerParamColor( LLAvatarAppearance* appearance );
|
||||
|
||||
void* operator new(size_t size)
|
||||
{
|
||||
return ll_aligned_malloc_16(size);
|
||||
}
|
||||
|
||||
void operator delete(void* ptr)
|
||||
{
|
||||
ll_aligned_free_16(ptr);
|
||||
}
|
||||
|
||||
/* virtual */ ~LLTexLayerParamColor();
|
||||
|
||||
/*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable = NULL) const;
|
||||
|
|
@ -198,8 +179,8 @@ protected:
|
|||
|
||||
virtual void onGlobalColorChanged() {}
|
||||
private:
|
||||
LL_ALIGN_16(LLVector4a mAvgDistortionVec);
|
||||
} LL_ALIGN_POSTFIX(16);
|
||||
LLVector4a mAvgDistortionVec;
|
||||
};
|
||||
|
||||
class LLTexLayerParamColorInfo : public LLViewerVisualParamInfo
|
||||
{
|
||||
|
|
|
|||
|
|
@ -188,20 +188,15 @@ void LLCharacter::requestStopMotion( LLMotion* motion)
|
|||
//-----------------------------------------------------------------------------
|
||||
// updateMotions()
|
||||
//-----------------------------------------------------------------------------
|
||||
static LLTrace::BlockTimerStatHandle FTM_UPDATE_ANIMATION("Update Animation");
|
||||
static LLTrace::BlockTimerStatHandle FTM_UPDATE_HIDDEN_ANIMATION("Update Hidden Anim");
|
||||
static LLTrace::BlockTimerStatHandle FTM_UPDATE_MOTIONS("Update Motions");
|
||||
|
||||
void LLCharacter::updateMotions(e_update_t update_type)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
if (update_type == HIDDEN_UPDATE)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_UPDATE_HIDDEN_ANIMATION);
|
||||
mMotionController.updateMotionsMinimal();
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_UPDATE_ANIMATION);
|
||||
// unpause if the number of outstanding pause requests has dropped to the initial one
|
||||
if (mMotionController.isPaused() && mPauseRequest->getNumRefs() == 1)
|
||||
{
|
||||
|
|
@ -209,7 +204,6 @@ void LLCharacter::updateMotions(e_update_t update_type)
|
|||
}
|
||||
bool force_update = (update_type == FORCE_UPDATE);
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_UPDATE_MOTIONS);
|
||||
mMotionController.updateMotions(force_update);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -163,6 +163,7 @@ BOOL LLEditingMotion::onActivate()
|
|||
//-----------------------------------------------------------------------------
|
||||
BOOL LLEditingMotion::onUpdate(F32 time, U8* joint_mask)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
LLVector3 focus_pt;
|
||||
LLVector3* pointAtPt = (LLVector3*)mCharacter->getAnimationData("PointAtPoint");
|
||||
|
||||
|
|
|
|||
|
|
@ -121,6 +121,7 @@ BOOL LLHandMotion::onActivate()
|
|||
//-----------------------------------------------------------------------------
|
||||
BOOL LLHandMotion::onUpdate(F32 time, U8* joint_mask)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
eHandPose *requestedHandPose;
|
||||
|
||||
F32 timeDelta = time - mLastTime;
|
||||
|
|
|
|||
|
|
@ -175,6 +175,7 @@ BOOL LLHeadRotMotion::onActivate()
|
|||
//-----------------------------------------------------------------------------
|
||||
BOOL LLHeadRotMotion::onUpdate(F32 time, U8* joint_mask)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
LLQuaternion targetHeadRotWorld;
|
||||
LLQuaternion currentRootRotWorld = mRootJoint->getWorldRotation();
|
||||
LLQuaternion currentInvRootRotWorld = ~currentRootRotWorld;
|
||||
|
|
@ -458,6 +459,7 @@ void LLEyeMotion::adjustEyeTarget(LLVector3* targetPos, LLJointState& left_eye_s
|
|||
//-----------------------------------------------------------------------------
|
||||
BOOL LLEyeMotion::onUpdate(F32 time, U8* joint_mask)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
//calculate jitter
|
||||
if (mEyeJitterTimer.getElapsedTimeF32() > mEyeJitterTime)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -116,6 +116,7 @@ BOOL LLKeyframeFallMotion::onActivate()
|
|||
//-----------------------------------------------------------------------------
|
||||
BOOL LLKeyframeFallMotion::onUpdate(F32 activeTime, U8* joint_mask)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
BOOL result = LLKeyframeMotion::onUpdate(activeTime, joint_mask);
|
||||
F32 slerp_amt = clamp_rescale(activeTime / getDuration(), 0.5f, 0.75f, 0.f, 1.f);
|
||||
|
||||
|
|
|
|||
|
|
@ -683,6 +683,7 @@ BOOL LLKeyframeMotion::onActivate()
|
|||
//-----------------------------------------------------------------------------
|
||||
BOOL LLKeyframeMotion::onUpdate(F32 time, U8* joint_mask)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
// llassert(time >= 0.f); // This will fire
|
||||
time = llmax(0.f, time);
|
||||
|
||||
|
|
|
|||
|
|
@ -158,6 +158,7 @@ BOOL LLKeyframeMotionParam::onActivate()
|
|||
//-----------------------------------------------------------------------------
|
||||
BOOL LLKeyframeMotionParam::onUpdate(F32 time, U8* joint_mask)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
F32 weightFactor = 1.f / (F32)mParameterizedMotions.size();
|
||||
|
||||
// zero out all pose weights
|
||||
|
|
|
|||
|
|
@ -105,6 +105,7 @@ void LLKeyframeWalkMotion::onDeactivate()
|
|||
//-----------------------------------------------------------------------------
|
||||
BOOL LLKeyframeWalkMotion::onUpdate(F32 time, U8* joint_mask)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
// compute time since last update
|
||||
F32 deltaTime = time - mRealTimeLast;
|
||||
|
||||
|
|
@ -198,6 +199,7 @@ BOOL LLWalkAdjustMotion::onActivate()
|
|||
//-----------------------------------------------------------------------------
|
||||
BOOL LLWalkAdjustMotion::onUpdate(F32 time, U8* joint_mask)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
// delta_time is guaranteed to be non zero
|
||||
F32 delta_time = llclamp(time - mLastTime, TIME_EPSILON, MAX_TIME_DELTA);
|
||||
mLastTime = time;
|
||||
|
|
@ -373,6 +375,7 @@ BOOL LLFlyAdjustMotion::onActivate()
|
|||
//-----------------------------------------------------------------------------
|
||||
BOOL LLFlyAdjustMotion::onUpdate(F32 time, U8* joint_mask)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
LLVector3 ang_vel = mCharacter->getCharacterAngularVelocity() * mCharacter->getTimeDilation();
|
||||
F32 speed = mCharacter->getCharacterVelocity().magVec();
|
||||
|
||||
|
|
|
|||
|
|
@ -503,6 +503,7 @@ void LLMotionController::resetJointSignatures()
|
|||
//-----------------------------------------------------------------------------
|
||||
void LLMotionController::updateIdleMotion(LLMotion* motionp)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
if (motionp->isStopped() && mAnimTime > motionp->getStopTime() + motionp->getEaseOutDuration())
|
||||
{
|
||||
deactivateMotionInstance(motionp);
|
||||
|
|
@ -541,6 +542,7 @@ void LLMotionController::updateIdleMotion(LLMotion* motionp)
|
|||
//-----------------------------------------------------------------------------
|
||||
void LLMotionController::updateIdleActiveMotions()
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
for (motion_list_t::iterator iter = mActiveMotions.begin();
|
||||
iter != mActiveMotions.end(); )
|
||||
{
|
||||
|
|
@ -553,10 +555,9 @@ void LLMotionController::updateIdleActiveMotions()
|
|||
//-----------------------------------------------------------------------------
|
||||
// updateMotionsByType()
|
||||
//-----------------------------------------------------------------------------
|
||||
static LLTrace::BlockTimerStatHandle FTM_MOTION_ON_UPDATE("Motion onUpdate");
|
||||
|
||||
void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_type)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
BOOL update_result = TRUE;
|
||||
U8 last_joint_signature[LL_CHARACTER_MAX_ANIMATED_JOINTS];
|
||||
|
||||
|
|
@ -712,7 +713,6 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty
|
|||
|
||||
// perform motion update
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_MOTION_ON_UPDATE);
|
||||
update_result = motionp->onUpdate(mAnimTime - motionp->mActivationTimestamp, last_joint_signature);
|
||||
}
|
||||
}
|
||||
|
|
@ -768,6 +768,7 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty
|
|||
//-----------------------------------------------------------------------------
|
||||
void LLMotionController::updateLoadingMotions()
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
// query pending motions for completion
|
||||
for (motion_set_t::iterator iter = mLoadingMotions.begin();
|
||||
iter != mLoadingMotions.end(); )
|
||||
|
|
@ -815,6 +816,7 @@ void LLMotionController::updateLoadingMotions()
|
|||
//-----------------------------------------------------------------------------
|
||||
void LLMotionController::updateMotions(bool force_update)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
// SL-763: "Distant animated objects run at super fast speed"
|
||||
// The use_quantum optimization or possibly the associated code in setTimeStamp()
|
||||
// does not work as implemented.
|
||||
|
|
@ -907,6 +909,7 @@ void LLMotionController::updateMotions(bool force_update)
|
|||
//-----------------------------------------------------------------------------
|
||||
void LLMotionController::updateMotionsMinimal()
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
// Always update mPrevTimerElapsed
|
||||
mPrevTimerElapsed = mTimer.getElapsedTimeF32();
|
||||
|
||||
|
|
@ -924,6 +927,7 @@ void LLMotionController::updateMotionsMinimal()
|
|||
//-----------------------------------------------------------------------------
|
||||
BOOL LLMotionController::activateMotionInstance(LLMotion *motion, F32 time)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
// It's not clear why the getWeight() line seems to be crashing this, but
|
||||
// hopefully this fixes it.
|
||||
if (motion == NULL || motion->getPose() == NULL)
|
||||
|
|
|
|||
|
|
@ -103,6 +103,7 @@ BOOL LLTargetingMotion::onActivate()
|
|||
//-----------------------------------------------------------------------------
|
||||
BOOL LLTargetingMotion::onUpdate(F32 time, U8* joint_mask)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
F32 slerp_amt = LLSmoothInterpolation::getInterpolant(TORSO_TARGET_HALF_LIFE);
|
||||
|
||||
LLVector3 target;
|
||||
|
|
|
|||
|
|
@ -86,11 +86,9 @@ std::string LLDate::asRFC1123() const
|
|||
return toHTTPDateString (std::string ("%A, %d %b %Y %H:%M:%S GMT"));
|
||||
}
|
||||
|
||||
LLTrace::BlockTimerStatHandle FT_DATE_FORMAT("Date Format");
|
||||
|
||||
std::string LLDate::toHTTPDateString (std::string fmt) const
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FT_DATE_FORMAT);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
|
||||
time_t locSeconds = (time_t) mSecondsSinceEpoch;
|
||||
struct tm * gmt = gmtime (&locSeconds);
|
||||
|
|
@ -99,7 +97,7 @@ std::string LLDate::toHTTPDateString (std::string fmt) const
|
|||
|
||||
std::string LLDate::toHTTPDateString (tm * gmt, std::string fmt)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FT_DATE_FORMAT);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
|
||||
// avoid calling setlocale() unnecessarily - it's expensive.
|
||||
static std::string prev_locale = "";
|
||||
|
|
|
|||
|
|
@ -191,29 +191,30 @@ TimeBlockTreeNode& BlockTimerStatHandle::getTreeNode() const
|
|||
}
|
||||
|
||||
|
||||
|
||||
void BlockTimer::bootstrapTimerTree()
|
||||
{
|
||||
for (auto& base : BlockTimerStatHandle::instance_snapshot())
|
||||
{
|
||||
// because of indirect derivation from LLInstanceTracker, have to downcast
|
||||
BlockTimerStatHandle& timer = static_cast<BlockTimerStatHandle&>(base);
|
||||
if (&timer == &BlockTimer::getRootTimeBlock()) continue;
|
||||
for (auto& base : BlockTimerStatHandle::instance_snapshot())
|
||||
{
|
||||
// because of indirect derivation from LLInstanceTracker, have to downcast
|
||||
BlockTimerStatHandle& timer = static_cast<BlockTimerStatHandle&>(base);
|
||||
if (&timer == &BlockTimer::getRootTimeBlock()) continue;
|
||||
|
||||
// bootstrap tree construction by attaching to last timer to be on stack
|
||||
// when this timer was called
|
||||
if (timer.getParent() == &BlockTimer::getRootTimeBlock())
|
||||
{
|
||||
TimeBlockAccumulator& accumulator = timer.getCurrentAccumulator();
|
||||
// bootstrap tree construction by attaching to last timer to be on stack
|
||||
// when this timer was called
|
||||
if (timer.getParent() == &BlockTimer::getRootTimeBlock())
|
||||
{
|
||||
TimeBlockAccumulator& accumulator = timer.getCurrentAccumulator();
|
||||
|
||||
if (accumulator.mLastCaller)
|
||||
{
|
||||
timer.setParent(accumulator.mLastCaller);
|
||||
accumulator.mParent = accumulator.mLastCaller;
|
||||
}
|
||||
// no need to push up tree on first use, flag can be set spuriously
|
||||
accumulator.mMoveUpTree = false;
|
||||
}
|
||||
}
|
||||
if (accumulator.mLastCaller)
|
||||
{
|
||||
timer.setParent(accumulator.mLastCaller);
|
||||
accumulator.mParent = accumulator.mLastCaller;
|
||||
}
|
||||
// no need to push up tree on first use, flag can be set spuriously
|
||||
accumulator.mMoveUpTree = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// bump timers up tree if they have been flagged as being in the wrong place
|
||||
|
|
@ -221,6 +222,7 @@ void BlockTimer::bootstrapTimerTree()
|
|||
// this preserves partial order derived from current frame's observations
|
||||
void BlockTimer::incrementalUpdateTimerTree()
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
for(block_timer_tree_df_post_iterator_t it = begin_block_timer_tree_df_post(BlockTimer::getRootTimeBlock());
|
||||
it != end_block_timer_tree_df_post();
|
||||
++it)
|
||||
|
|
@ -260,7 +262,8 @@ void BlockTimer::incrementalUpdateTimerTree()
|
|||
|
||||
|
||||
void BlockTimer::updateTimes()
|
||||
{
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
// walk up stack of active timers and accumulate current time while leaving timing structures active
|
||||
BlockTimerStackRecord* stack_record = LLThreadLocalSingletonPointer<BlockTimerStackRecord>::getInstance();
|
||||
if (!stack_record) return;
|
||||
|
|
@ -271,7 +274,7 @@ void BlockTimer::updateTimes()
|
|||
|
||||
while(cur_timer
|
||||
&& cur_timer->mParentTimerData.mActiveTimer != cur_timer) // root defined by parent pointing to self
|
||||
{
|
||||
{
|
||||
U64 cumulative_time_delta = cur_time - cur_timer->mStartTime;
|
||||
cur_timer->mStartTime = cur_time;
|
||||
|
||||
|
|
|
|||
|
|
@ -109,6 +109,16 @@ public: \
|
|||
} \
|
||||
\
|
||||
void operator delete(void* ptr) \
|
||||
{ \
|
||||
ll_aligned_free_16(ptr); \
|
||||
} \
|
||||
\
|
||||
void* operator new[](size_t size) \
|
||||
{ \
|
||||
return ll_aligned_malloc_16(size); \
|
||||
} \
|
||||
\
|
||||
void operator delete[](void* ptr) \
|
||||
{ \
|
||||
ll_aligned_free_16(ptr); \
|
||||
}
|
||||
|
|
@ -126,8 +136,9 @@ public: \
|
|||
#else
|
||||
inline void* ll_aligned_malloc_fallback( size_t size, int align )
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
#if defined(LL_WINDOWS)
|
||||
return _aligned_malloc(size, align);
|
||||
void* ret = _aligned_malloc(size, align);
|
||||
#else
|
||||
char* aligned = NULL;
|
||||
void* mem = malloc( size + (align - 1) + sizeof(void*) );
|
||||
|
|
@ -138,12 +149,16 @@ public: \
|
|||
|
||||
((void**)aligned)[-1] = mem;
|
||||
}
|
||||
return aligned;
|
||||
void* ret = aligned;
|
||||
#endif
|
||||
LL_PROFILE_ALLOC(ret, size);
|
||||
return ret;
|
||||
}
|
||||
|
||||
inline void ll_aligned_free_fallback( void* ptr )
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
LL_PROFILE_FREE(ptr);
|
||||
#if defined(LL_WINDOWS)
|
||||
_aligned_free(ptr);
|
||||
#else
|
||||
|
|
@ -159,21 +174,24 @@ public: \
|
|||
|
||||
inline void* ll_aligned_malloc_16(size_t size) // returned hunk MUST be freed with ll_aligned_free_16().
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
#if defined(LL_WINDOWS)
|
||||
return _aligned_malloc(size, 16);
|
||||
void* ret = _aligned_malloc(size, 16);
|
||||
#elif defined(LL_DARWIN)
|
||||
return malloc(size); // default osx malloc is 16 byte aligned.
|
||||
void* ret = malloc(size); // default osx malloc is 16 byte aligned.
|
||||
#else
|
||||
void *rtn;
|
||||
if (LL_LIKELY(0 == posix_memalign(&rtn, 16, size)))
|
||||
return rtn;
|
||||
else // bad alignment requested, or out of memory
|
||||
return NULL;
|
||||
void *ret;
|
||||
if (0 != posix_memalign(&ret, 16, size))
|
||||
return nullptr;
|
||||
#endif
|
||||
LL_PROFILE_ALLOC(ret, size);
|
||||
return ret;
|
||||
}
|
||||
|
||||
inline void ll_aligned_free_16(void *p)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
LL_PROFILE_FREE(p);
|
||||
#if defined(LL_WINDOWS)
|
||||
_aligned_free(p);
|
||||
#elif defined(LL_DARWIN)
|
||||
|
|
@ -185,10 +203,12 @@ inline void ll_aligned_free_16(void *p)
|
|||
|
||||
inline void* ll_aligned_realloc_16(void* ptr, size_t size, size_t old_size) // returned hunk MUST be freed with ll_aligned_free_16().
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
LL_PROFILE_FREE(ptr);
|
||||
#if defined(LL_WINDOWS)
|
||||
return _aligned_realloc(ptr, size, 16);
|
||||
void* ret = _aligned_realloc(ptr, size, 16);
|
||||
#elif defined(LL_DARWIN)
|
||||
return realloc(ptr,size); // default osx malloc is 16 byte aligned.
|
||||
void* ret = realloc(ptr,size); // default osx malloc is 16 byte aligned.
|
||||
#else
|
||||
//FIXME: memcpy is SLOW
|
||||
void* ret = ll_aligned_malloc_16(size);
|
||||
|
|
@ -201,27 +221,31 @@ inline void* ll_aligned_realloc_16(void* ptr, size_t size, size_t old_size) // r
|
|||
}
|
||||
ll_aligned_free_16(ptr);
|
||||
}
|
||||
return ret;
|
||||
#endif
|
||||
LL_PROFILE_ALLOC(ptr, size);
|
||||
return ret;
|
||||
}
|
||||
|
||||
inline void* ll_aligned_malloc_32(size_t size) // returned hunk MUST be freed with ll_aligned_free_32().
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
#if defined(LL_WINDOWS)
|
||||
return _aligned_malloc(size, 32);
|
||||
void* ret = _aligned_malloc(size, 32);
|
||||
#elif defined(LL_DARWIN)
|
||||
return ll_aligned_malloc_fallback( size, 32 );
|
||||
void* ret = ll_aligned_malloc_fallback( size, 32 );
|
||||
#else
|
||||
void *rtn;
|
||||
if (LL_LIKELY(0 == posix_memalign(&rtn, 32, size)))
|
||||
return rtn;
|
||||
else // bad alignment requested, or out of memory
|
||||
return NULL;
|
||||
void *ret;
|
||||
if (0 != posix_memalign(&ret, 32, size))
|
||||
return nullptr;
|
||||
#endif
|
||||
LL_PROFILE_ALLOC(ret, size);
|
||||
return ret;
|
||||
}
|
||||
|
||||
inline void ll_aligned_free_32(void *p)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
LL_PROFILE_FREE(p);
|
||||
#if defined(LL_WINDOWS)
|
||||
_aligned_free(p);
|
||||
#elif defined(LL_DARWIN)
|
||||
|
|
@ -235,29 +259,35 @@ inline void ll_aligned_free_32(void *p)
|
|||
template<size_t ALIGNMENT>
|
||||
LL_FORCE_INLINE void* ll_aligned_malloc(size_t size)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
void* ret;
|
||||
if (LL_DEFAULT_HEAP_ALIGN % ALIGNMENT == 0)
|
||||
{
|
||||
return malloc(size);
|
||||
ret = malloc(size);
|
||||
LL_PROFILE_ALLOC(ret, size);
|
||||
}
|
||||
else if (ALIGNMENT == 16)
|
||||
{
|
||||
return ll_aligned_malloc_16(size);
|
||||
ret = ll_aligned_malloc_16(size);
|
||||
}
|
||||
else if (ALIGNMENT == 32)
|
||||
{
|
||||
return ll_aligned_malloc_32(size);
|
||||
ret = ll_aligned_malloc_32(size);
|
||||
}
|
||||
else
|
||||
{
|
||||
return ll_aligned_malloc_fallback(size, ALIGNMENT);
|
||||
ret = ll_aligned_malloc_fallback(size, ALIGNMENT);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
template<size_t ALIGNMENT>
|
||||
LL_FORCE_INLINE void ll_aligned_free(void* ptr)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
if (ALIGNMENT == LL_DEFAULT_HEAP_ALIGN)
|
||||
{
|
||||
LL_PROFILE_FREE(ptr);
|
||||
free(ptr);
|
||||
}
|
||||
else if (ALIGNMENT == 16)
|
||||
|
|
@ -279,6 +309,7 @@ LL_FORCE_INLINE void ll_aligned_free(void* ptr)
|
|||
//
|
||||
inline void ll_memcpy_nonaliased_aligned_16(char* __restrict dst, const char* __restrict src, size_t bytes)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
assert(src != NULL);
|
||||
assert(dst != NULL);
|
||||
assert(bytes > 0);
|
||||
|
|
|
|||
|
|
@ -66,6 +66,8 @@ extern thread_local bool gProfilerEnabled;
|
|||
#define LL_PROFILE_ZONE_ERR(name) LL_PROFILE_ZONE_NAMED_COLOR( name, 0XFF0000 ) // RGB yellow
|
||||
#define LL_PROFILE_ZONE_INFO(name) LL_PROFILE_ZONE_NAMED_COLOR( name, 0X00FFFF ) // RGB cyan
|
||||
#define LL_PROFILE_ZONE_WARN(name) LL_PROFILE_ZONE_NAMED_COLOR( name, 0x0FFFF00 ) // RGB red
|
||||
#define LL_PROFILE_ALLOC(ptr, size) TracyAlloc(ptr, size)
|
||||
#define LL_PROFILE_FREE(ptr) TracyFree(ptr)
|
||||
#endif
|
||||
#if LL_PROFILER_CONFIGURATION == LL_PROFILER_CONFIG_FAST_TIMER
|
||||
#define LL_PROFILER_FRAME_END
|
||||
|
|
@ -81,11 +83,13 @@ extern thread_local bool gProfilerEnabled;
|
|||
#define LL_PROFILE_ZONE_ERR(name) (void)(name); // Not supported
|
||||
#define LL_PROFILE_ZONE_INFO(name) (void)(name); // Not supported
|
||||
#define LL_PROFILE_ZONE_WARN(name) (void)(name); // Not supported
|
||||
#define LL_PROFILE_ALLOC(ptr, size) (void)(ptr); (void)(size);
|
||||
#define LL_PROFILE_FREE(ptr) (void)(ptr);
|
||||
#endif
|
||||
#if LL_PROFILER_CONFIGURATION == LL_PROFILER_CONFIG_TRACY_FAST_TIMER
|
||||
#define LL_PROFILER_FRAME_END FrameMark
|
||||
#define LL_PROFILER_SET_THREAD_NAME( name ) tracy::SetThreadName( name ); gProfilerEnabled = true;
|
||||
#define LL_RECORD_BLOCK_TIME(name) ZoneScoped const LLTrace::BlockTimer& LL_GLUE_TOKENS(block_time_recorder, __LINE__)(LLTrace::timeThisBlock(name)); (void)LL_GLUE_TOKENS(block_time_recorder, __LINE__);
|
||||
#define LL_RECORD_BLOCK_TIME(name) ZoneNamedN(___tracy_scoped_zone, #name, true); const LLTrace::BlockTimer& LL_GLUE_TOKENS(block_time_recorder, __LINE__)(LLTrace::timeThisBlock(name)); (void)LL_GLUE_TOKENS(block_time_recorder, __LINE__);
|
||||
#define LL_PROFILE_ZONE_NAMED(name) ZoneNamedN( ___tracy_scoped_zone, #name, true );
|
||||
#define LL_PROFILE_ZONE_NAMED_COLOR(name,color) ZoneNamedNC( ___tracy_scopped_zone, name, color, true ) // RGB
|
||||
#define LL_PROFILE_ZONE_SCOPED ZoneScoped
|
||||
|
|
@ -96,6 +100,8 @@ extern thread_local bool gProfilerEnabled;
|
|||
#define LL_PROFILE_ZONE_ERR(name) LL_PROFILE_ZONE_NAMED_COLOR( name, 0XFF0000 ) // RGB yellow
|
||||
#define LL_PROFILE_ZONE_INFO(name) LL_PROFILE_ZONE_NAMED_COLOR( name, 0X00FFFF ) // RGB cyan
|
||||
#define LL_PROFILE_ZONE_WARN(name) LL_PROFILE_ZONE_NAMED_COLOR( name, 0x0FFFF00 ) // RGB red
|
||||
#define LL_PROFILE_ALLOC(ptr, size) TracyAlloc(ptr, size)
|
||||
#define LL_PROFILE_FREE(ptr) TracyFree(ptr)
|
||||
#endif
|
||||
#else
|
||||
#define LL_PROFILER_FRAME_END
|
||||
|
|
|
|||
|
|
@ -37,8 +37,6 @@ static LLInitParam::Parser::parser_write_func_map_t sWriteFuncs;
|
|||
static LLInitParam::Parser::parser_inspect_func_map_t sInspectFuncs;
|
||||
static const LLSD NO_VALUE_MARKER;
|
||||
|
||||
LLTrace::BlockTimerStatHandle FTM_SD_PARAM_ADAPTOR("LLSD to LLInitParam conversion");
|
||||
|
||||
//
|
||||
// LLParamSDParser
|
||||
//
|
||||
|
|
|
|||
|
|
@ -110,7 +110,6 @@ private:
|
|||
};
|
||||
|
||||
|
||||
extern LL_COMMON_API LLTrace::BlockTimerStatHandle FTM_SD_PARAM_ADAPTOR;
|
||||
template<typename T>
|
||||
class LLSDParamAdapter : public T
|
||||
{
|
||||
|
|
@ -118,7 +117,7 @@ public:
|
|||
LLSDParamAdapter() {}
|
||||
LLSDParamAdapter(const LLSD& sd)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_SD_PARAM_ADAPTOR);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
LLParamSDParser parser;
|
||||
// don't spam for implicit parsing of LLSD, as we want to allow arbitrary freeform data and ignore most of it
|
||||
bool parse_silently = true;
|
||||
|
|
|
|||
|
|
@ -839,4 +839,30 @@ private: \
|
|||
/* LLSINGLETON() is carefully implemented to permit exactly this */ \
|
||||
LLSINGLETON_C11(DERIVED_CLASS) {}
|
||||
|
||||
// Relatively unsafe singleton implementation that is much faster
|
||||
// and simpler than LLSingleton, but has no dependency tracking
|
||||
// or inherent thread safety and requires manual invocation of
|
||||
// createInstance before first use.
|
||||
template<class T>
|
||||
class LLSimpleton
|
||||
{
|
||||
public:
|
||||
static T* sInstance;
|
||||
|
||||
static void createInstance()
|
||||
{
|
||||
llassert(sInstance == nullptr);
|
||||
sInstance = new T();
|
||||
}
|
||||
|
||||
static inline T* getInstance() { return sInstance; }
|
||||
static inline T& instance() { return *getInstance(); }
|
||||
static inline bool instanceExists() { return sInstance != nullptr; }
|
||||
|
||||
static void deleteSingleton() {
|
||||
delete sInstance;
|
||||
sInstance = nullptr;
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -37,9 +37,6 @@
|
|||
#include <winnls.h> // for WideCharToMultiByte
|
||||
#endif
|
||||
|
||||
LLTrace::BlockTimerStatHandle FT_STRING_FORMAT("String Format");
|
||||
|
||||
|
||||
std::string ll_safe_string(const char* in)
|
||||
{
|
||||
if(in) return std::string(in);
|
||||
|
|
@ -1356,7 +1353,7 @@ bool LLStringUtil::formatDatetime(std::string& replacement, std::string token,
|
|||
template<>
|
||||
S32 LLStringUtil::format(std::string& s, const format_map_t& substitutions)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FT_STRING_FORMAT);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
S32 res = 0;
|
||||
|
||||
std::string output;
|
||||
|
|
@ -1429,7 +1426,7 @@ S32 LLStringUtil::format(std::string& s, const format_map_t& substitutions)
|
|||
template<>
|
||||
S32 LLStringUtil::format(std::string& s, const LLSD& substitutions)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FT_STRING_FORMAT);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
S32 res = 0;
|
||||
|
||||
if (!substitutions.isMap())
|
||||
|
|
|
|||
|
|
@ -871,11 +871,9 @@ LLMemoryInfo& LLMemoryInfo::refresh()
|
|||
return *this;
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_MEMINFO_LOAD_STATS("MemInfo Load Stats");
|
||||
|
||||
LLSD LLMemoryInfo::loadStatsMap()
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_MEMINFO_LOAD_STATS);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
|
||||
// This implementation is derived from stream() code (as of 2011-06-29).
|
||||
Stats stats;
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@ TimeBlockTreeNode::TimeBlockTreeNode()
|
|||
|
||||
void TimeBlockTreeNode::setParent( BlockTimerStatHandle* parent )
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
llassert_always(parent != mBlock);
|
||||
llassert_always(parent != NULL);
|
||||
|
||||
|
|
|
|||
|
|
@ -227,6 +227,7 @@ public:
|
|||
|
||||
void setName(const char* name)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
mName = name;
|
||||
setKey(name);
|
||||
}
|
||||
|
|
@ -234,12 +235,14 @@ public:
|
|||
/*virtual*/ const char* getUnitLabel() const { return "KB"; }
|
||||
|
||||
StatType<MemAccumulator::AllocationFacet>& allocations()
|
||||
{
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
return static_cast<StatType<MemAccumulator::AllocationFacet>&>(*(StatType<MemAccumulator>*)this);
|
||||
}
|
||||
|
||||
StatType<MemAccumulator::DeallocationFacet>& deallocations()
|
||||
{
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
return static_cast<StatType<MemAccumulator::DeallocationFacet>&>(*(StatType<MemAccumulator>*)this);
|
||||
}
|
||||
};
|
||||
|
|
@ -261,6 +264,7 @@ struct MeasureMem<T, typename T::mem_trackable_tag_t, IS_BYTES>
|
|||
{
|
||||
static size_t measureFootprint(const T& value)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
return sizeof(T) + value.getMemFootprint();
|
||||
}
|
||||
};
|
||||
|
|
@ -270,6 +274,7 @@ struct MeasureMem<T, IS_MEM_TRACKABLE, typename T::is_unit_t>
|
|||
{
|
||||
static size_t measureFootprint(const T& value)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
return U32Bytes(value).value();
|
||||
}
|
||||
};
|
||||
|
|
@ -279,6 +284,7 @@ struct MeasureMem<T*, IS_MEM_TRACKABLE, IS_BYTES>
|
|||
{
|
||||
static size_t measureFootprint(const T* value)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
if (!value)
|
||||
{
|
||||
return 0;
|
||||
|
|
@ -323,6 +329,7 @@ struct MeasureMem<std::basic_string<T>, IS_MEM_TRACKABLE, IS_BYTES>
|
|||
{
|
||||
static size_t measureFootprint(const std::basic_string<T>& value)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
return value.capacity() * sizeof(T);
|
||||
}
|
||||
};
|
||||
|
|
@ -331,6 +338,7 @@ struct MeasureMem<std::basic_string<T>, IS_MEM_TRACKABLE, IS_BYTES>
|
|||
template<typename T>
|
||||
inline void claim_alloc(MemStatHandle& measurement, const T& value)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
#if LL_TRACE_ENABLED
|
||||
S32 size = MeasureMem<T>::measureFootprint(value);
|
||||
if(size == 0) return;
|
||||
|
|
@ -343,6 +351,7 @@ inline void claim_alloc(MemStatHandle& measurement, const T& value)
|
|||
template<typename T>
|
||||
inline void disclaim_alloc(MemStatHandle& measurement, const T& value)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
#if LL_TRACE_ENABLED
|
||||
S32 size = MeasureMem<T>::measureFootprint(value);
|
||||
if(size == 0) return;
|
||||
|
|
@ -352,141 +361,6 @@ inline void disclaim_alloc(MemStatHandle& measurement, const T& value)
|
|||
#endif
|
||||
}
|
||||
|
||||
template<typename DERIVED, size_t ALIGNMENT = LL_DEFAULT_HEAP_ALIGN>
|
||||
class MemTrackableNonVirtual
|
||||
{
|
||||
public:
|
||||
typedef void mem_trackable_tag_t;
|
||||
|
||||
MemTrackableNonVirtual(const char* name)
|
||||
#if LL_TRACE_ENABLED
|
||||
: mMemFootprint(0)
|
||||
#endif
|
||||
{
|
||||
#if LL_TRACE_ENABLED
|
||||
static bool name_initialized = false;
|
||||
if (!name_initialized)
|
||||
{
|
||||
name_initialized = true;
|
||||
sMemStat.setName(name);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if LL_TRACE_ENABLED
|
||||
~MemTrackableNonVirtual()
|
||||
{
|
||||
disclaimMem(mMemFootprint);
|
||||
}
|
||||
|
||||
static MemStatHandle& getMemStatHandle()
|
||||
{
|
||||
return sMemStat;
|
||||
}
|
||||
|
||||
S32 getMemFootprint() const { return mMemFootprint; }
|
||||
#endif
|
||||
|
||||
void* operator new(size_t size)
|
||||
{
|
||||
#if LL_TRACE_ENABLED
|
||||
claim_alloc(sMemStat, size);
|
||||
#endif
|
||||
return ll_aligned_malloc<ALIGNMENT>(size);
|
||||
}
|
||||
|
||||
template<int CUSTOM_ALIGNMENT>
|
||||
static void* aligned_new(size_t size)
|
||||
{
|
||||
#if LL_TRACE_ENABLED
|
||||
claim_alloc(sMemStat, size);
|
||||
#endif
|
||||
return ll_aligned_malloc<CUSTOM_ALIGNMENT>(size);
|
||||
}
|
||||
|
||||
void operator delete(void* ptr, size_t size)
|
||||
{
|
||||
#if LL_TRACE_ENABLED
|
||||
disclaim_alloc(sMemStat, size);
|
||||
#endif
|
||||
ll_aligned_free<ALIGNMENT>(ptr);
|
||||
}
|
||||
|
||||
template<int CUSTOM_ALIGNMENT>
|
||||
static void aligned_delete(void* ptr, size_t size)
|
||||
{
|
||||
#if LL_TRACE_ENABLED
|
||||
disclaim_alloc(sMemStat, size);
|
||||
#endif
|
||||
ll_aligned_free<CUSTOM_ALIGNMENT>(ptr);
|
||||
}
|
||||
|
||||
void* operator new [](size_t size)
|
||||
{
|
||||
#if LL_TRACE_ENABLED
|
||||
claim_alloc(sMemStat, size);
|
||||
#endif
|
||||
return ll_aligned_malloc<ALIGNMENT>(size);
|
||||
}
|
||||
|
||||
void operator delete[](void* ptr, size_t size)
|
||||
{
|
||||
#if LL_TRACE_ENABLED
|
||||
disclaim_alloc(sMemStat, size);
|
||||
#endif
|
||||
ll_aligned_free<ALIGNMENT>(ptr);
|
||||
}
|
||||
|
||||
// claim memory associated with other objects/data as our own, adding to our calculated footprint
|
||||
template<typename CLAIM_T>
|
||||
void claimMem(const CLAIM_T& value) const
|
||||
{
|
||||
#if LL_TRACE_ENABLED
|
||||
S32 size = MeasureMem<CLAIM_T>::measureFootprint(value);
|
||||
claim_alloc(sMemStat, size);
|
||||
mMemFootprint += size;
|
||||
#endif
|
||||
}
|
||||
|
||||
// remove memory we had claimed from our calculated footprint
|
||||
template<typename CLAIM_T>
|
||||
void disclaimMem(const CLAIM_T& value) const
|
||||
{
|
||||
#if LL_TRACE_ENABLED
|
||||
S32 size = MeasureMem<CLAIM_T>::measureFootprint(value);
|
||||
disclaim_alloc(sMemStat, size);
|
||||
mMemFootprint -= size;
|
||||
#endif
|
||||
}
|
||||
|
||||
private:
|
||||
#if LL_TRACE_ENABLED
|
||||
// use signed values so that we can temporarily go negative
|
||||
// and reconcile in destructor
|
||||
// NB: this assumes that no single class is responsible for > 2GB of allocations
|
||||
mutable S32 mMemFootprint;
|
||||
|
||||
static MemStatHandle sMemStat;
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
#if LL_TRACE_ENABLED
|
||||
template<typename DERIVED, size_t ALIGNMENT>
|
||||
MemStatHandle MemTrackableNonVirtual<DERIVED, ALIGNMENT>::sMemStat(typeid(MemTrackableNonVirtual<DERIVED, ALIGNMENT>).name());
|
||||
#endif
|
||||
|
||||
template<typename DERIVED, size_t ALIGNMENT = LL_DEFAULT_HEAP_ALIGN>
|
||||
class MemTrackable : public MemTrackableNonVirtual<DERIVED, ALIGNMENT>
|
||||
{
|
||||
public:
|
||||
MemTrackable(const char* name)
|
||||
: MemTrackableNonVirtual<DERIVED, ALIGNMENT>(name)
|
||||
{}
|
||||
|
||||
virtual ~MemTrackable()
|
||||
{}
|
||||
};
|
||||
}
|
||||
|
||||
#endif // LL_LLTRACE_H
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ extern MemStatHandle gTraceMemStat;
|
|||
|
||||
AccumulatorBufferGroup::AccumulatorBufferGroup()
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
claim_alloc(gTraceMemStat, mCounts.capacity() * sizeof(CountAccumulator));
|
||||
claim_alloc(gTraceMemStat, mSamples.capacity() * sizeof(SampleAccumulator));
|
||||
claim_alloc(gTraceMemStat, mEvents.capacity() * sizeof(EventAccumulator));
|
||||
|
|
@ -55,6 +56,7 @@ AccumulatorBufferGroup::AccumulatorBufferGroup(const AccumulatorBufferGroup& oth
|
|||
mStackTimers(other.mStackTimers),
|
||||
mMemStats(other.mMemStats)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
claim_alloc(gTraceMemStat, mCounts.capacity() * sizeof(CountAccumulator));
|
||||
claim_alloc(gTraceMemStat, mSamples.capacity() * sizeof(SampleAccumulator));
|
||||
claim_alloc(gTraceMemStat, mEvents.capacity() * sizeof(EventAccumulator));
|
||||
|
|
@ -64,6 +66,7 @@ AccumulatorBufferGroup::AccumulatorBufferGroup(const AccumulatorBufferGroup& oth
|
|||
|
||||
AccumulatorBufferGroup::~AccumulatorBufferGroup()
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
disclaim_alloc(gTraceMemStat, mCounts.capacity() * sizeof(CountAccumulator));
|
||||
disclaim_alloc(gTraceMemStat, mSamples.capacity() * sizeof(SampleAccumulator));
|
||||
disclaim_alloc(gTraceMemStat, mEvents.capacity() * sizeof(EventAccumulator));
|
||||
|
|
@ -73,6 +76,7 @@ AccumulatorBufferGroup::~AccumulatorBufferGroup()
|
|||
|
||||
void AccumulatorBufferGroup::handOffTo(AccumulatorBufferGroup& other)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
other.mCounts.reset(&mCounts);
|
||||
other.mSamples.reset(&mSamples);
|
||||
other.mEvents.reset(&mEvents);
|
||||
|
|
@ -82,6 +86,7 @@ void AccumulatorBufferGroup::handOffTo(AccumulatorBufferGroup& other)
|
|||
|
||||
void AccumulatorBufferGroup::makeCurrent()
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
mCounts.makeCurrent();
|
||||
mSamples.makeCurrent();
|
||||
mEvents.makeCurrent();
|
||||
|
|
@ -104,6 +109,7 @@ void AccumulatorBufferGroup::makeCurrent()
|
|||
//static
|
||||
void AccumulatorBufferGroup::clearCurrent()
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
AccumulatorBuffer<CountAccumulator>::clearCurrent();
|
||||
AccumulatorBuffer<SampleAccumulator>::clearCurrent();
|
||||
AccumulatorBuffer<EventAccumulator>::clearCurrent();
|
||||
|
|
@ -118,6 +124,7 @@ bool AccumulatorBufferGroup::isCurrent() const
|
|||
|
||||
void AccumulatorBufferGroup::append( const AccumulatorBufferGroup& other )
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
mCounts.addSamples(other.mCounts, SEQUENTIAL);
|
||||
mSamples.addSamples(other.mSamples, SEQUENTIAL);
|
||||
mEvents.addSamples(other.mEvents, SEQUENTIAL);
|
||||
|
|
@ -127,6 +134,7 @@ void AccumulatorBufferGroup::append( const AccumulatorBufferGroup& other )
|
|||
|
||||
void AccumulatorBufferGroup::merge( const AccumulatorBufferGroup& other)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
mCounts.addSamples(other.mCounts, NON_SEQUENTIAL);
|
||||
mSamples.addSamples(other.mSamples, NON_SEQUENTIAL);
|
||||
mEvents.addSamples(other.mEvents, NON_SEQUENTIAL);
|
||||
|
|
@ -137,6 +145,7 @@ void AccumulatorBufferGroup::merge( const AccumulatorBufferGroup& other)
|
|||
|
||||
void AccumulatorBufferGroup::reset(AccumulatorBufferGroup* other)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
mCounts.reset(other ? &other->mCounts : NULL);
|
||||
mSamples.reset(other ? &other->mSamples : NULL);
|
||||
mEvents.reset(other ? &other->mEvents : NULL);
|
||||
|
|
@ -146,6 +155,7 @@ void AccumulatorBufferGroup::reset(AccumulatorBufferGroup* other)
|
|||
|
||||
void AccumulatorBufferGroup::sync()
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
if (isCurrent())
|
||||
{
|
||||
F64SecondsImplicit time_stamp = LLTimer::getTotalSeconds();
|
||||
|
|
@ -190,7 +200,7 @@ F64 SampleAccumulator::mergeSumsOfSquares(const SampleAccumulator& a, const Samp
|
|||
|
||||
void SampleAccumulator::addSamples( const SampleAccumulator& other, EBufferAppendType append_type )
|
||||
{
|
||||
if (append_type == NON_SEQUENTIAL)
|
||||
if (append_type == NON_SEQUENTIAL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -289,7 +299,7 @@ void EventAccumulator::addSamples( const EventAccumulator& other, EBufferAppendT
|
|||
|
||||
void EventAccumulator::reset( const EventAccumulator* other )
|
||||
{
|
||||
mNumSamples = 0;
|
||||
mNumSamples = 0;
|
||||
mSum = 0;
|
||||
mMin = F32(NaN);
|
||||
mMax = F32(NaN);
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ namespace LLTrace
|
|||
: mStorageSize(0),
|
||||
mStorage(NULL)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
const AccumulatorBuffer& other = *getDefaultBuffer();
|
||||
resize(sNextStorageSlot);
|
||||
for (S32 i = 0; i < sNextStorageSlot; i++)
|
||||
|
|
@ -76,6 +77,7 @@ namespace LLTrace
|
|||
|
||||
~AccumulatorBuffer()
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
if (isCurrent())
|
||||
{
|
||||
LLThreadLocalSingletonPointer<ACCUMULATOR>::setInstance(NULL);
|
||||
|
|
@ -98,6 +100,7 @@ namespace LLTrace
|
|||
: mStorageSize(0),
|
||||
mStorage(NULL)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
resize(sNextStorageSlot);
|
||||
for (S32 i = 0; i < sNextStorageSlot; i++)
|
||||
{
|
||||
|
|
@ -107,6 +110,7 @@ namespace LLTrace
|
|||
|
||||
void addSamples(const AccumulatorBuffer<ACCUMULATOR>& other, EBufferAppendType append_type)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
llassert(mStorageSize >= sNextStorageSlot && other.mStorageSize >= sNextStorageSlot);
|
||||
for (size_t i = 0; i < sNextStorageSlot; i++)
|
||||
{
|
||||
|
|
@ -116,6 +120,7 @@ namespace LLTrace
|
|||
|
||||
void copyFrom(const AccumulatorBuffer<ACCUMULATOR>& other)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
llassert(mStorageSize >= sNextStorageSlot && other.mStorageSize >= sNextStorageSlot);
|
||||
for (size_t i = 0; i < sNextStorageSlot; i++)
|
||||
{
|
||||
|
|
@ -125,6 +130,7 @@ namespace LLTrace
|
|||
|
||||
void reset(const AccumulatorBuffer<ACCUMULATOR>* other = NULL)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
llassert(mStorageSize >= sNextStorageSlot);
|
||||
for (size_t i = 0; i < sNextStorageSlot; i++)
|
||||
{
|
||||
|
|
@ -134,6 +140,7 @@ namespace LLTrace
|
|||
|
||||
void sync(F64SecondsImplicit time_stamp)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
llassert(mStorageSize >= sNextStorageSlot);
|
||||
for (size_t i = 0; i < sNextStorageSlot; i++)
|
||||
{
|
||||
|
|
@ -153,12 +160,13 @@ namespace LLTrace
|
|||
|
||||
static void clearCurrent()
|
||||
{
|
||||
LLThreadLocalSingletonPointer<ACCUMULATOR>::setInstance(NULL);
|
||||
LLThreadLocalSingletonPointer<ACCUMULATOR>::setInstance(NULL);
|
||||
}
|
||||
|
||||
// NOTE: this is not thread-safe. We assume that slots are reserved in the main thread before any child threads are spawned
|
||||
size_t reserveSlot()
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
size_t next_slot = sNextStorageSlot++;
|
||||
if (next_slot >= mStorageSize)
|
||||
{
|
||||
|
|
@ -172,6 +180,7 @@ namespace LLTrace
|
|||
|
||||
void resize(size_t new_size)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
if (new_size <= mStorageSize) return;
|
||||
|
||||
ACCUMULATOR* old_storage = mStorage;
|
||||
|
|
@ -212,6 +221,7 @@ namespace LLTrace
|
|||
|
||||
static self_t* getDefaultBuffer()
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
static bool sInitialized = false;
|
||||
if (!sInitialized)
|
||||
{
|
||||
|
|
@ -326,6 +336,7 @@ namespace LLTrace
|
|||
|
||||
void sample(F64 value)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
F64SecondsImplicit time_stamp = LLTimer::getTotalSeconds();
|
||||
|
||||
// store effect of last value
|
||||
|
|
@ -444,9 +455,9 @@ namespace LLTrace
|
|||
S32 mNumSamples;
|
||||
};
|
||||
|
||||
class TimeBlockAccumulator
|
||||
class alignas(32) TimeBlockAccumulator
|
||||
{
|
||||
public:
|
||||
public:
|
||||
typedef F64Seconds value_t;
|
||||
static F64Seconds getDefaultValue() { return F64Seconds(0); }
|
||||
|
||||
|
|
@ -539,6 +550,7 @@ namespace LLTrace
|
|||
|
||||
void addSamples(const MemAccumulator& other, EBufferAppendType append_type)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
mAllocations.addSamples(other.mAllocations, append_type);
|
||||
mDeallocations.addSamples(other.mDeallocations, append_type);
|
||||
|
||||
|
|
@ -557,6 +569,7 @@ namespace LLTrace
|
|||
|
||||
void reset(const MemAccumulator* other)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
mSize.reset(other ? &other->mSize : NULL);
|
||||
mAllocations.reset(other ? &other->mAllocations : NULL);
|
||||
mDeallocations.reset(other ? &other->mDeallocations : NULL);
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ Recording::Recording(EPlayState state)
|
|||
: mElapsedSeconds(0),
|
||||
mActiveBuffers(NULL)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
claim_alloc(gTraceMemStat, this);
|
||||
mBuffers = new AccumulatorBufferGroup();
|
||||
claim_alloc(gTraceMemStat, mBuffers);
|
||||
|
|
@ -59,12 +60,14 @@ Recording::Recording(EPlayState state)
|
|||
Recording::Recording( const Recording& other )
|
||||
: mActiveBuffers(NULL)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
claim_alloc(gTraceMemStat, this);
|
||||
*this = other;
|
||||
}
|
||||
|
||||
Recording& Recording::operator = (const Recording& other)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
// this will allow us to seamlessly start without affecting any data we've acquired from other
|
||||
setPlayState(PAUSED);
|
||||
|
||||
|
|
@ -85,6 +88,7 @@ Recording& Recording::operator = (const Recording& other)
|
|||
|
||||
Recording::~Recording()
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
disclaim_alloc(gTraceMemStat, this);
|
||||
disclaim_alloc(gTraceMemStat, mBuffers);
|
||||
|
||||
|
|
@ -103,6 +107,7 @@ void Recording::update()
|
|||
#if LL_TRACE_ENABLED
|
||||
if (isStarted())
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
mElapsedSeconds += mSamplingTimer.getElapsedTimeF64();
|
||||
|
||||
// must have
|
||||
|
|
@ -123,6 +128,7 @@ void Recording::update()
|
|||
|
||||
void Recording::handleReset()
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
#if LL_TRACE_ENABLED
|
||||
mBuffers.write()->reset();
|
||||
|
||||
|
|
@ -133,6 +139,7 @@ void Recording::handleReset()
|
|||
|
||||
void Recording::handleStart()
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
#if LL_TRACE_ENABLED
|
||||
mSamplingTimer.reset();
|
||||
mBuffers.setStayUnique(true);
|
||||
|
|
@ -144,6 +151,7 @@ void Recording::handleStart()
|
|||
|
||||
void Recording::handleStop()
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
#if LL_TRACE_ENABLED
|
||||
mElapsedSeconds += mSamplingTimer.getElapsedTimeF64();
|
||||
// must have thread recorder running on this thread
|
||||
|
|
@ -273,7 +281,7 @@ F64Kilobytes Recording::getMean(const StatType<MemAccumulator>& stat)
|
|||
|
||||
F64Kilobytes Recording::getMax(const StatType<MemAccumulator>& stat)
|
||||
{
|
||||
update();
|
||||
update();
|
||||
const MemAccumulator& accumulator = mBuffers->mMemStats[stat.getIndex()];
|
||||
const MemAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mMemStats[stat.getIndex()] : NULL;
|
||||
return F64Bytes(llmax(accumulator.mSize.getMax(), active_accumulator && active_accumulator->mSize.hasValue() ? active_accumulator->mSize.getMax() : F32_MIN));
|
||||
|
|
@ -281,7 +289,7 @@ F64Kilobytes Recording::getMax(const StatType<MemAccumulator>& stat)
|
|||
|
||||
F64Kilobytes Recording::getStandardDeviation(const StatType<MemAccumulator>& stat)
|
||||
{
|
||||
update();
|
||||
update();
|
||||
const MemAccumulator& accumulator = mBuffers->mMemStats[stat.getIndex()];
|
||||
const MemAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mMemStats[stat.getIndex()] : NULL;
|
||||
if (active_accumulator && active_accumulator->hasValue())
|
||||
|
|
@ -297,7 +305,7 @@ F64Kilobytes Recording::getStandardDeviation(const StatType<MemAccumulator>& sta
|
|||
|
||||
F64Kilobytes Recording::getLastValue(const StatType<MemAccumulator>& stat)
|
||||
{
|
||||
update();
|
||||
update();
|
||||
const MemAccumulator& accumulator = mBuffers->mMemStats[stat.getIndex()];
|
||||
const MemAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mMemStats[stat.getIndex()] : NULL;
|
||||
return F64Bytes(active_accumulator ? active_accumulator->mSize.getLastValue() : accumulator.mSize.getLastValue());
|
||||
|
|
@ -305,7 +313,7 @@ F64Kilobytes Recording::getLastValue(const StatType<MemAccumulator>& stat)
|
|||
|
||||
bool Recording::hasValue(const StatType<MemAccumulator::AllocationFacet>& stat)
|
||||
{
|
||||
update();
|
||||
update();
|
||||
const MemAccumulator& accumulator = mBuffers->mMemStats[stat.getIndex()];
|
||||
const MemAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mMemStats[stat.getIndex()] : NULL;
|
||||
return accumulator.mAllocations.hasValue() || (active_accumulator ? active_accumulator->mAllocations.hasValue() : false);
|
||||
|
|
@ -313,7 +321,7 @@ bool Recording::hasValue(const StatType<MemAccumulator::AllocationFacet>& stat)
|
|||
|
||||
F64Kilobytes Recording::getSum(const StatType<MemAccumulator::AllocationFacet>& stat)
|
||||
{
|
||||
update();
|
||||
update();
|
||||
const MemAccumulator& accumulator = mBuffers->mMemStats[stat.getIndex()];
|
||||
const MemAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mMemStats[stat.getIndex()] : NULL;
|
||||
return F64Bytes(accumulator.mAllocations.getSum() + (active_accumulator ? active_accumulator->mAllocations.getSum() : 0));
|
||||
|
|
@ -321,7 +329,7 @@ F64Kilobytes Recording::getSum(const StatType<MemAccumulator::AllocationFacet>&
|
|||
|
||||
F64Kilobytes Recording::getPerSec(const StatType<MemAccumulator::AllocationFacet>& stat)
|
||||
{
|
||||
update();
|
||||
update();
|
||||
const MemAccumulator& accumulator = mBuffers->mMemStats[stat.getIndex()];
|
||||
const MemAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mMemStats[stat.getIndex()] : NULL;
|
||||
return F64Bytes((accumulator.mAllocations.getSum() + (active_accumulator ? active_accumulator->mAllocations.getSum() : 0)) / mElapsedSeconds.value());
|
||||
|
|
@ -329,7 +337,7 @@ F64Kilobytes Recording::getPerSec(const StatType<MemAccumulator::AllocationFacet
|
|||
|
||||
S32 Recording::getSampleCount(const StatType<MemAccumulator::AllocationFacet>& stat)
|
||||
{
|
||||
update();
|
||||
update();
|
||||
const MemAccumulator& accumulator = mBuffers->mMemStats[stat.getIndex()];
|
||||
const MemAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mMemStats[stat.getIndex()] : NULL;
|
||||
return accumulator.mAllocations.getSampleCount() + (active_accumulator ? active_accumulator->mAllocations.getSampleCount() : 0);
|
||||
|
|
@ -337,7 +345,7 @@ S32 Recording::getSampleCount(const StatType<MemAccumulator::AllocationFacet>& s
|
|||
|
||||
bool Recording::hasValue(const StatType<MemAccumulator::DeallocationFacet>& stat)
|
||||
{
|
||||
update();
|
||||
update();
|
||||
const MemAccumulator& accumulator = mBuffers->mMemStats[stat.getIndex()];
|
||||
const MemAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mMemStats[stat.getIndex()] : NULL;
|
||||
return accumulator.mDeallocations.hasValue() || (active_accumulator ? active_accumulator->mDeallocations.hasValue() : false);
|
||||
|
|
@ -346,7 +354,7 @@ bool Recording::hasValue(const StatType<MemAccumulator::DeallocationFacet>& stat
|
|||
|
||||
F64Kilobytes Recording::getSum(const StatType<MemAccumulator::DeallocationFacet>& stat)
|
||||
{
|
||||
update();
|
||||
update();
|
||||
const MemAccumulator& accumulator = mBuffers->mMemStats[stat.getIndex()];
|
||||
const MemAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mMemStats[stat.getIndex()] : NULL;
|
||||
return F64Bytes(accumulator.mDeallocations.getSum() + (active_accumulator ? active_accumulator->mDeallocations.getSum() : 0));
|
||||
|
|
@ -354,7 +362,7 @@ F64Kilobytes Recording::getSum(const StatType<MemAccumulator::DeallocationFacet>
|
|||
|
||||
F64Kilobytes Recording::getPerSec(const StatType<MemAccumulator::DeallocationFacet>& stat)
|
||||
{
|
||||
update();
|
||||
update();
|
||||
const MemAccumulator& accumulator = mBuffers->mMemStats[stat.getIndex()];
|
||||
const MemAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mMemStats[stat.getIndex()] : NULL;
|
||||
return F64Bytes((accumulator.mDeallocations.getSum() + (active_accumulator ? active_accumulator->mDeallocations.getSum() : 0)) / mElapsedSeconds.value());
|
||||
|
|
@ -362,7 +370,7 @@ F64Kilobytes Recording::getPerSec(const StatType<MemAccumulator::DeallocationFac
|
|||
|
||||
S32 Recording::getSampleCount(const StatType<MemAccumulator::DeallocationFacet>& stat)
|
||||
{
|
||||
update();
|
||||
update();
|
||||
const MemAccumulator& accumulator = mBuffers->mMemStats[stat.getIndex()];
|
||||
const MemAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mMemStats[stat.getIndex()] : NULL;
|
||||
return accumulator.mDeallocations.getSampleCount() + (active_accumulator ? active_accumulator->mDeallocations.getSampleCount() : 0);
|
||||
|
|
@ -370,7 +378,7 @@ S32 Recording::getSampleCount(const StatType<MemAccumulator::DeallocationFacet>&
|
|||
|
||||
bool Recording::hasValue(const StatType<CountAccumulator>& stat)
|
||||
{
|
||||
update();
|
||||
update();
|
||||
const CountAccumulator& accumulator = mBuffers->mCounts[stat.getIndex()];
|
||||
const CountAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mCounts[stat.getIndex()] : NULL;
|
||||
return accumulator.hasValue() || (active_accumulator ? active_accumulator->hasValue() : false);
|
||||
|
|
@ -378,7 +386,7 @@ bool Recording::hasValue(const StatType<CountAccumulator>& stat)
|
|||
|
||||
F64 Recording::getSum(const StatType<CountAccumulator>& stat)
|
||||
{
|
||||
update();
|
||||
update();
|
||||
const CountAccumulator& accumulator = mBuffers->mCounts[stat.getIndex()];
|
||||
const CountAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mCounts[stat.getIndex()] : NULL;
|
||||
return accumulator.getSum() + (active_accumulator ? active_accumulator->getSum() : 0);
|
||||
|
|
@ -386,7 +394,7 @@ F64 Recording::getSum(const StatType<CountAccumulator>& stat)
|
|||
|
||||
F64 Recording::getPerSec( const StatType<CountAccumulator>& stat )
|
||||
{
|
||||
update();
|
||||
update();
|
||||
const CountAccumulator& accumulator = mBuffers->mCounts[stat.getIndex()];
|
||||
const CountAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mCounts[stat.getIndex()] : NULL;
|
||||
F64 sum = accumulator.getSum() + (active_accumulator ? active_accumulator->getSum() : 0);
|
||||
|
|
@ -395,7 +403,7 @@ F64 Recording::getPerSec( const StatType<CountAccumulator>& stat )
|
|||
|
||||
S32 Recording::getSampleCount( const StatType<CountAccumulator>& stat )
|
||||
{
|
||||
update();
|
||||
update();
|
||||
const CountAccumulator& accumulator = mBuffers->mCounts[stat.getIndex()];
|
||||
const CountAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mCounts[stat.getIndex()] : NULL;
|
||||
return accumulator.getSampleCount() + (active_accumulator ? active_accumulator->getSampleCount() : 0);
|
||||
|
|
@ -403,7 +411,7 @@ S32 Recording::getSampleCount( const StatType<CountAccumulator>& stat )
|
|||
|
||||
bool Recording::hasValue(const StatType<SampleAccumulator>& stat)
|
||||
{
|
||||
update();
|
||||
update();
|
||||
const SampleAccumulator& accumulator = mBuffers->mSamples[stat.getIndex()];
|
||||
const SampleAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mSamples[stat.getIndex()] : NULL;
|
||||
return accumulator.hasValue() || (active_accumulator && active_accumulator->hasValue());
|
||||
|
|
@ -411,7 +419,7 @@ bool Recording::hasValue(const StatType<SampleAccumulator>& stat)
|
|||
|
||||
F64 Recording::getMin( const StatType<SampleAccumulator>& stat )
|
||||
{
|
||||
update();
|
||||
update();
|
||||
const SampleAccumulator& accumulator = mBuffers->mSamples[stat.getIndex()];
|
||||
const SampleAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mSamples[stat.getIndex()] : NULL;
|
||||
return llmin(accumulator.getMin(), active_accumulator && active_accumulator->hasValue() ? active_accumulator->getMin() : F32_MAX);
|
||||
|
|
@ -419,7 +427,7 @@ F64 Recording::getMin( const StatType<SampleAccumulator>& stat )
|
|||
|
||||
F64 Recording::getMax( const StatType<SampleAccumulator>& stat )
|
||||
{
|
||||
update();
|
||||
update();
|
||||
const SampleAccumulator& accumulator = mBuffers->mSamples[stat.getIndex()];
|
||||
const SampleAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mSamples[stat.getIndex()] : NULL;
|
||||
return llmax(accumulator.getMax(), active_accumulator && active_accumulator->hasValue() ? active_accumulator->getMax() : F32_MIN);
|
||||
|
|
@ -427,7 +435,7 @@ F64 Recording::getMax( const StatType<SampleAccumulator>& stat )
|
|||
|
||||
F64 Recording::getMean( const StatType<SampleAccumulator>& stat )
|
||||
{
|
||||
update();
|
||||
update();
|
||||
const SampleAccumulator& accumulator = mBuffers->mSamples[stat.getIndex()];
|
||||
const SampleAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mSamples[stat.getIndex()] : NULL;
|
||||
if (active_accumulator && active_accumulator->hasValue())
|
||||
|
|
@ -448,7 +456,7 @@ F64 Recording::getMean( const StatType<SampleAccumulator>& stat )
|
|||
|
||||
F64 Recording::getStandardDeviation( const StatType<SampleAccumulator>& stat )
|
||||
{
|
||||
update();
|
||||
update();
|
||||
const SampleAccumulator& accumulator = mBuffers->mSamples[stat.getIndex()];
|
||||
const SampleAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mSamples[stat.getIndex()] : NULL;
|
||||
|
||||
|
|
@ -465,7 +473,7 @@ F64 Recording::getStandardDeviation( const StatType<SampleAccumulator>& stat )
|
|||
|
||||
F64 Recording::getLastValue( const StatType<SampleAccumulator>& stat )
|
||||
{
|
||||
update();
|
||||
update();
|
||||
const SampleAccumulator& accumulator = mBuffers->mSamples[stat.getIndex()];
|
||||
const SampleAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mSamples[stat.getIndex()] : NULL;
|
||||
return (active_accumulator && active_accumulator->hasValue() ? active_accumulator->getLastValue() : accumulator.getLastValue());
|
||||
|
|
@ -473,7 +481,7 @@ F64 Recording::getLastValue( const StatType<SampleAccumulator>& stat )
|
|||
|
||||
S32 Recording::getSampleCount( const StatType<SampleAccumulator>& stat )
|
||||
{
|
||||
update();
|
||||
update();
|
||||
const SampleAccumulator& accumulator = mBuffers->mSamples[stat.getIndex()];
|
||||
const SampleAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mSamples[stat.getIndex()] : NULL;
|
||||
return accumulator.getSampleCount() + (active_accumulator && active_accumulator->hasValue() ? active_accumulator->getSampleCount() : 0);
|
||||
|
|
@ -481,7 +489,7 @@ S32 Recording::getSampleCount( const StatType<SampleAccumulator>& stat )
|
|||
|
||||
bool Recording::hasValue(const StatType<EventAccumulator>& stat)
|
||||
{
|
||||
update();
|
||||
update();
|
||||
const EventAccumulator& accumulator = mBuffers->mEvents[stat.getIndex()];
|
||||
const EventAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mEvents[stat.getIndex()] : NULL;
|
||||
return accumulator.hasValue() || (active_accumulator && active_accumulator->hasValue());
|
||||
|
|
@ -489,7 +497,7 @@ bool Recording::hasValue(const StatType<EventAccumulator>& stat)
|
|||
|
||||
F64 Recording::getSum( const StatType<EventAccumulator>& stat)
|
||||
{
|
||||
update();
|
||||
update();
|
||||
const EventAccumulator& accumulator = mBuffers->mEvents[stat.getIndex()];
|
||||
const EventAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mEvents[stat.getIndex()] : NULL;
|
||||
return (F64)(accumulator.getSum() + (active_accumulator && active_accumulator->hasValue() ? active_accumulator->getSum() : 0));
|
||||
|
|
@ -497,7 +505,7 @@ F64 Recording::getSum( const StatType<EventAccumulator>& stat)
|
|||
|
||||
F64 Recording::getMin( const StatType<EventAccumulator>& stat )
|
||||
{
|
||||
update();
|
||||
update();
|
||||
const EventAccumulator& accumulator = mBuffers->mEvents[stat.getIndex()];
|
||||
const EventAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mEvents[stat.getIndex()] : NULL;
|
||||
return llmin(accumulator.getMin(), active_accumulator && active_accumulator->hasValue() ? active_accumulator->getMin() : F32_MAX);
|
||||
|
|
@ -505,7 +513,7 @@ F64 Recording::getMin( const StatType<EventAccumulator>& stat )
|
|||
|
||||
F64 Recording::getMax( const StatType<EventAccumulator>& stat )
|
||||
{
|
||||
update();
|
||||
update();
|
||||
const EventAccumulator& accumulator = mBuffers->mEvents[stat.getIndex()];
|
||||
const EventAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mEvents[stat.getIndex()] : NULL;
|
||||
return llmax(accumulator.getMax(), active_accumulator && active_accumulator->hasValue() ? active_accumulator->getMax() : F32_MIN);
|
||||
|
|
@ -513,7 +521,7 @@ F64 Recording::getMax( const StatType<EventAccumulator>& stat )
|
|||
|
||||
F64 Recording::getMean( const StatType<EventAccumulator>& stat )
|
||||
{
|
||||
update();
|
||||
update();
|
||||
const EventAccumulator& accumulator = mBuffers->mEvents[stat.getIndex()];
|
||||
const EventAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mEvents[stat.getIndex()] : NULL;
|
||||
if (active_accumulator && active_accumulator->hasValue())
|
||||
|
|
@ -534,7 +542,7 @@ F64 Recording::getMean( const StatType<EventAccumulator>& stat )
|
|||
|
||||
F64 Recording::getStandardDeviation( const StatType<EventAccumulator>& stat )
|
||||
{
|
||||
update();
|
||||
update();
|
||||
const EventAccumulator& accumulator = mBuffers->mEvents[stat.getIndex()];
|
||||
const EventAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mEvents[stat.getIndex()] : NULL;
|
||||
|
||||
|
|
@ -551,7 +559,7 @@ F64 Recording::getStandardDeviation( const StatType<EventAccumulator>& stat )
|
|||
|
||||
F64 Recording::getLastValue( const StatType<EventAccumulator>& stat )
|
||||
{
|
||||
update();
|
||||
update();
|
||||
const EventAccumulator& accumulator = mBuffers->mEvents[stat.getIndex()];
|
||||
const EventAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mEvents[stat.getIndex()] : NULL;
|
||||
return active_accumulator ? active_accumulator->getLastValue() : accumulator.getLastValue();
|
||||
|
|
@ -559,7 +567,7 @@ F64 Recording::getLastValue( const StatType<EventAccumulator>& stat )
|
|||
|
||||
S32 Recording::getSampleCount( const StatType<EventAccumulator>& stat )
|
||||
{
|
||||
update();
|
||||
update();
|
||||
const EventAccumulator& accumulator = mBuffers->mEvents[stat.getIndex()];
|
||||
const EventAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mEvents[stat.getIndex()] : NULL;
|
||||
return accumulator.getSampleCount() + (active_accumulator ? active_accumulator->getSampleCount() : 0);
|
||||
|
|
@ -575,17 +583,20 @@ PeriodicRecording::PeriodicRecording( S32 num_periods, EPlayState state)
|
|||
mNumRecordedPeriods(0),
|
||||
mRecordingPeriods(num_periods ? num_periods : 1)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
setPlayState(state);
|
||||
claim_alloc(gTraceMemStat, this);
|
||||
}
|
||||
|
||||
PeriodicRecording::~PeriodicRecording()
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
disclaim_alloc(gTraceMemStat, this);
|
||||
}
|
||||
|
||||
void PeriodicRecording::nextPeriod()
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
if (mAutoResize)
|
||||
{
|
||||
mRecordingPeriods.push_back(Recording());
|
||||
|
|
@ -600,6 +611,7 @@ void PeriodicRecording::nextPeriod()
|
|||
|
||||
void PeriodicRecording::appendRecording(Recording& recording)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
getCurRecording().appendRecording(recording);
|
||||
nextPeriod();
|
||||
}
|
||||
|
|
@ -607,6 +619,7 @@ void PeriodicRecording::appendRecording(Recording& recording)
|
|||
|
||||
void PeriodicRecording::appendPeriodicRecording( PeriodicRecording& other )
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
if (other.mRecordingPeriods.empty()) return;
|
||||
|
||||
getCurRecording().update();
|
||||
|
|
@ -680,6 +693,7 @@ void PeriodicRecording::appendPeriodicRecording( PeriodicRecording& other )
|
|||
|
||||
F64Seconds PeriodicRecording::getDuration() const
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
F64Seconds duration;
|
||||
S32 num_periods = mRecordingPeriods.size();
|
||||
for (S32 i = 1; i <= num_periods; i++)
|
||||
|
|
@ -693,6 +707,7 @@ F64Seconds PeriodicRecording::getDuration() const
|
|||
|
||||
LLTrace::Recording PeriodicRecording::snapshotCurRecording() const
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
Recording recording_copy(getCurRecording());
|
||||
recording_copy.stop();
|
||||
return recording_copy;
|
||||
|
|
@ -735,16 +750,19 @@ const Recording& PeriodicRecording::getPrevRecording( S32 offset ) const
|
|||
|
||||
void PeriodicRecording::handleStart()
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
getCurRecording().start();
|
||||
}
|
||||
|
||||
void PeriodicRecording::handleStop()
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
getCurRecording().pause();
|
||||
}
|
||||
|
||||
void PeriodicRecording::handleReset()
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
getCurRecording().stop();
|
||||
|
||||
if (mAutoResize)
|
||||
|
|
@ -768,11 +786,13 @@ void PeriodicRecording::handleReset()
|
|||
|
||||
void PeriodicRecording::handleSplitTo(PeriodicRecording& other)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
getCurRecording().splitTo(other.getCurRecording());
|
||||
}
|
||||
|
||||
F64 PeriodicRecording::getPeriodMin( const StatType<EventAccumulator>& stat, S32 num_periods /*= S32_MAX*/ )
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
num_periods = llmin(num_periods, getNumRecordedPeriods());
|
||||
|
||||
bool has_value = false;
|
||||
|
|
@ -794,6 +814,7 @@ F64 PeriodicRecording::getPeriodMin( const StatType<EventAccumulator>& stat, S32
|
|||
|
||||
F64 PeriodicRecording::getPeriodMax( const StatType<EventAccumulator>& stat, S32 num_periods /*= S32_MAX*/ )
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
num_periods = llmin(num_periods, getNumRecordedPeriods());
|
||||
|
||||
bool has_value = false;
|
||||
|
|
@ -816,6 +837,7 @@ F64 PeriodicRecording::getPeriodMax( const StatType<EventAccumulator>& stat, S32
|
|||
// calculates means using aggregates per period
|
||||
F64 PeriodicRecording::getPeriodMean( const StatType<EventAccumulator>& stat, S32 num_periods /*= S32_MAX*/ )
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
num_periods = llmin(num_periods, getNumRecordedPeriods());
|
||||
|
||||
F64 mean = 0;
|
||||
|
|
@ -839,6 +861,7 @@ F64 PeriodicRecording::getPeriodMean( const StatType<EventAccumulator>& stat, S3
|
|||
|
||||
F64 PeriodicRecording::getPeriodStandardDeviation( const StatType<EventAccumulator>& stat, S32 num_periods /*= S32_MAX*/ )
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
num_periods = llmin(num_periods, getNumRecordedPeriods());
|
||||
|
||||
F64 period_mean = getPeriodMean(stat, num_periods);
|
||||
|
|
@ -863,6 +886,7 @@ F64 PeriodicRecording::getPeriodStandardDeviation( const StatType<EventAccumulat
|
|||
|
||||
F64 PeriodicRecording::getPeriodMin( const StatType<SampleAccumulator>& stat, S32 num_periods /*= S32_MAX*/ )
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
num_periods = llmin(num_periods, getNumRecordedPeriods());
|
||||
|
||||
bool has_value = false;
|
||||
|
|
@ -884,6 +908,7 @@ F64 PeriodicRecording::getPeriodMin( const StatType<SampleAccumulator>& stat, S3
|
|||
|
||||
F64 PeriodicRecording::getPeriodMax(const StatType<SampleAccumulator>& stat, S32 num_periods /*= S32_MAX*/)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
num_periods = llmin(num_periods, getNumRecordedPeriods());
|
||||
|
||||
bool has_value = false;
|
||||
|
|
@ -906,6 +931,7 @@ F64 PeriodicRecording::getPeriodMax(const StatType<SampleAccumulator>& stat, S32
|
|||
|
||||
F64 PeriodicRecording::getPeriodMean( const StatType<SampleAccumulator>& stat, S32 num_periods /*= S32_MAX*/ )
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
num_periods = llmin(num_periods, getNumRecordedPeriods());
|
||||
|
||||
S32 valid_period_count = 0;
|
||||
|
|
@ -928,6 +954,7 @@ F64 PeriodicRecording::getPeriodMean( const StatType<SampleAccumulator>& stat, S
|
|||
|
||||
F64 PeriodicRecording::getPeriodStandardDeviation( const StatType<SampleAccumulator>& stat, S32 num_periods /*= S32_MAX*/ )
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
num_periods = llmin(num_periods, getNumRecordedPeriods());
|
||||
|
||||
F64 period_mean = getPeriodMean(stat, num_periods);
|
||||
|
|
@ -953,6 +980,7 @@ F64 PeriodicRecording::getPeriodStandardDeviation( const StatType<SampleAccumula
|
|||
|
||||
F64Kilobytes PeriodicRecording::getPeriodMin( const StatType<MemAccumulator>& stat, S32 num_periods /*= S32_MAX*/ )
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
num_periods = llmin(num_periods, getNumRecordedPeriods());
|
||||
|
||||
F64Kilobytes min_val(std::numeric_limits<F64>::max());
|
||||
|
|
@ -972,6 +1000,7 @@ F64Kilobytes PeriodicRecording::getPeriodMin(const MemStatHandle& stat, S32 num_
|
|||
|
||||
F64Kilobytes PeriodicRecording::getPeriodMax(const StatType<MemAccumulator>& stat, S32 num_periods /*= S32_MAX*/)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
num_periods = llmin(num_periods, getNumRecordedPeriods());
|
||||
|
||||
F64Kilobytes max_val(0.0);
|
||||
|
|
@ -991,6 +1020,7 @@ F64Kilobytes PeriodicRecording::getPeriodMax(const MemStatHandle& stat, S32 num_
|
|||
|
||||
F64Kilobytes PeriodicRecording::getPeriodMean( const StatType<MemAccumulator>& stat, S32 num_periods /*= S32_MAX*/ )
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
num_periods = llmin(num_periods, getNumRecordedPeriods());
|
||||
|
||||
F64Kilobytes mean(0);
|
||||
|
|
@ -1011,6 +1041,7 @@ F64Kilobytes PeriodicRecording::getPeriodMean(const MemStatHandle& stat, S32 num
|
|||
|
||||
F64Kilobytes PeriodicRecording::getPeriodStandardDeviation( const StatType<MemAccumulator>& stat, S32 num_periods /*= S32_MAX*/ )
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
num_periods = llmin(num_periods, getNumRecordedPeriods());
|
||||
|
||||
F64Kilobytes period_mean = getPeriodMean(stat, num_periods);
|
||||
|
|
@ -1044,6 +1075,7 @@ F64Kilobytes PeriodicRecording::getPeriodStandardDeviation(const MemStatHandle&
|
|||
|
||||
void ExtendableRecording::extend()
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
// push the data back to accepted recording
|
||||
mAcceptedRecording.appendRecording(mPotentialRecording);
|
||||
// flush data, so we can start from scratch
|
||||
|
|
@ -1052,22 +1084,26 @@ void ExtendableRecording::extend()
|
|||
|
||||
void ExtendableRecording::handleStart()
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
mPotentialRecording.start();
|
||||
}
|
||||
|
||||
void ExtendableRecording::handleStop()
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
mPotentialRecording.pause();
|
||||
}
|
||||
|
||||
void ExtendableRecording::handleReset()
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
mAcceptedRecording.reset();
|
||||
mPotentialRecording.reset();
|
||||
}
|
||||
|
||||
void ExtendableRecording::handleSplitTo(ExtendableRecording& other)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
mPotentialRecording.splitTo(other.mPotentialRecording);
|
||||
}
|
||||
|
||||
|
|
@ -1084,6 +1120,7 @@ ExtendablePeriodicRecording::ExtendablePeriodicRecording()
|
|||
|
||||
void ExtendablePeriodicRecording::extend()
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
// push the data back to accepted recording
|
||||
mAcceptedRecording.appendPeriodicRecording(mPotentialRecording);
|
||||
// flush data, so we can start from scratch
|
||||
|
|
@ -1093,22 +1130,26 @@ void ExtendablePeriodicRecording::extend()
|
|||
|
||||
void ExtendablePeriodicRecording::handleStart()
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
mPotentialRecording.start();
|
||||
}
|
||||
|
||||
void ExtendablePeriodicRecording::handleStop()
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
mPotentialRecording.pause();
|
||||
}
|
||||
|
||||
void ExtendablePeriodicRecording::handleReset()
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
mAcceptedRecording.reset();
|
||||
mPotentialRecording.reset();
|
||||
}
|
||||
|
||||
void ExtendablePeriodicRecording::handleSplitTo(ExtendablePeriodicRecording& other)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
mPotentialRecording.splitTo(other.mPotentialRecording);
|
||||
}
|
||||
|
||||
|
|
@ -1123,6 +1164,7 @@ PeriodicRecording& get_frame_recording()
|
|||
|
||||
void LLStopWatchControlsMixinCommon::start()
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
switch (mPlayState)
|
||||
{
|
||||
case STOPPED:
|
||||
|
|
@ -1144,6 +1186,7 @@ void LLStopWatchControlsMixinCommon::start()
|
|||
|
||||
void LLStopWatchControlsMixinCommon::stop()
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
switch (mPlayState)
|
||||
{
|
||||
case STOPPED:
|
||||
|
|
@ -1163,6 +1206,7 @@ void LLStopWatchControlsMixinCommon::stop()
|
|||
|
||||
void LLStopWatchControlsMixinCommon::pause()
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
switch (mPlayState)
|
||||
{
|
||||
case STOPPED:
|
||||
|
|
@ -1182,6 +1226,7 @@ void LLStopWatchControlsMixinCommon::pause()
|
|||
|
||||
void LLStopWatchControlsMixinCommon::unpause()
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
switch (mPlayState)
|
||||
{
|
||||
case STOPPED:
|
||||
|
|
@ -1201,6 +1246,7 @@ void LLStopWatchControlsMixinCommon::unpause()
|
|||
|
||||
void LLStopWatchControlsMixinCommon::resume()
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
switch (mPlayState)
|
||||
{
|
||||
case STOPPED:
|
||||
|
|
@ -1221,6 +1267,7 @@ void LLStopWatchControlsMixinCommon::resume()
|
|||
|
||||
void LLStopWatchControlsMixinCommon::restart()
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
switch (mPlayState)
|
||||
{
|
||||
case STOPPED:
|
||||
|
|
@ -1244,11 +1291,13 @@ void LLStopWatchControlsMixinCommon::restart()
|
|||
|
||||
void LLStopWatchControlsMixinCommon::reset()
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
handleReset();
|
||||
}
|
||||
|
||||
void LLStopWatchControlsMixinCommon::setPlayState( EPlayState state )
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
switch(state)
|
||||
{
|
||||
case STOPPED:
|
||||
|
|
|
|||
|
|
@ -355,6 +355,7 @@ namespace LLTrace
|
|||
template <typename T>
|
||||
S32 getSampleCount(const StatType<T>& stat, S32 num_periods = S32_MAX)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
num_periods = llmin(num_periods, getNumRecordedPeriods());
|
||||
|
||||
S32 num_samples = 0;
|
||||
|
|
@ -374,6 +375,7 @@ namespace LLTrace
|
|||
template <typename T>
|
||||
typename T::value_t getPeriodMin(const StatType<T>& stat, S32 num_periods = S32_MAX)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
num_periods = llmin(num_periods, getNumRecordedPeriods());
|
||||
|
||||
bool has_value = false;
|
||||
|
|
@ -396,6 +398,7 @@ namespace LLTrace
|
|||
template<typename T>
|
||||
T getPeriodMin(const CountStatHandle<T>& stat, S32 num_periods = S32_MAX)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
return T(getPeriodMin(static_cast<const StatType<CountAccumulator>&>(stat), num_periods));
|
||||
}
|
||||
|
||||
|
|
@ -403,6 +406,7 @@ namespace LLTrace
|
|||
template<typename T>
|
||||
T getPeriodMin(const SampleStatHandle<T>& stat, S32 num_periods = S32_MAX)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
return T(getPeriodMin(static_cast<const StatType<SampleAccumulator>&>(stat), num_periods));
|
||||
}
|
||||
|
||||
|
|
@ -410,6 +414,7 @@ namespace LLTrace
|
|||
template<typename T>
|
||||
T getPeriodMin(const EventStatHandle<T>& stat, S32 num_periods = S32_MAX)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
return T(getPeriodMin(static_cast<const StatType<EventAccumulator>&>(stat), num_periods));
|
||||
}
|
||||
|
||||
|
|
@ -419,6 +424,7 @@ namespace LLTrace
|
|||
template <typename T>
|
||||
typename RelatedTypes<typename T::value_t>::fractional_t getPeriodMinPerSec(const StatType<T>& stat, S32 num_periods = S32_MAX)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
num_periods = llmin(num_periods, getNumRecordedPeriods());
|
||||
|
||||
typename RelatedTypes<typename T::value_t>::fractional_t min_val(std::numeric_limits<F64>::max());
|
||||
|
|
@ -433,6 +439,7 @@ namespace LLTrace
|
|||
template<typename T>
|
||||
typename RelatedTypes<T>::fractional_t getPeriodMinPerSec(const CountStatHandle<T>& stat, S32 num_periods = S32_MAX)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
return typename RelatedTypes<T>::fractional_t(getPeriodMinPerSec(static_cast<const StatType<CountAccumulator>&>(stat), num_periods));
|
||||
}
|
||||
|
||||
|
|
@ -444,6 +451,7 @@ namespace LLTrace
|
|||
template <typename T>
|
||||
typename T::value_t getPeriodMax(const StatType<T>& stat, S32 num_periods = S32_MAX)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
num_periods = llmin(num_periods, getNumRecordedPeriods());
|
||||
|
||||
bool has_value = false;
|
||||
|
|
@ -466,6 +474,7 @@ namespace LLTrace
|
|||
template<typename T>
|
||||
T getPeriodMax(const CountStatHandle<T>& stat, S32 num_periods = S32_MAX)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
return T(getPeriodMax(static_cast<const StatType<CountAccumulator>&>(stat), num_periods));
|
||||
}
|
||||
|
||||
|
|
@ -473,6 +482,7 @@ namespace LLTrace
|
|||
template<typename T>
|
||||
T getPeriodMax(const SampleStatHandle<T>& stat, S32 num_periods = S32_MAX)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
return T(getPeriodMax(static_cast<const StatType<SampleAccumulator>&>(stat), num_periods));
|
||||
}
|
||||
|
||||
|
|
@ -480,6 +490,7 @@ namespace LLTrace
|
|||
template<typename T>
|
||||
T getPeriodMax(const EventStatHandle<T>& stat, S32 num_periods = S32_MAX)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
return T(getPeriodMax(static_cast<const StatType<EventAccumulator>&>(stat), num_periods));
|
||||
}
|
||||
|
||||
|
|
@ -489,6 +500,7 @@ namespace LLTrace
|
|||
template <typename T>
|
||||
typename RelatedTypes<typename T::value_t>::fractional_t getPeriodMaxPerSec(const StatType<T>& stat, S32 num_periods = S32_MAX)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
num_periods = llmin(num_periods, getNumRecordedPeriods());
|
||||
|
||||
F64 max_val = std::numeric_limits<F64>::min();
|
||||
|
|
@ -503,6 +515,7 @@ namespace LLTrace
|
|||
template<typename T>
|
||||
typename RelatedTypes<T>::fractional_t getPeriodMaxPerSec(const CountStatHandle<T>& stat, S32 num_periods = S32_MAX)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
return typename RelatedTypes<T>::fractional_t(getPeriodMaxPerSec(static_cast<const StatType<CountAccumulator>&>(stat), num_periods));
|
||||
}
|
||||
|
||||
|
|
@ -514,6 +527,7 @@ namespace LLTrace
|
|||
template <typename T>
|
||||
typename RelatedTypes<typename T::value_t>::fractional_t getPeriodMean(const StatType<T >& stat, S32 num_periods = S32_MAX)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
num_periods = llmin(num_periods, getNumRecordedPeriods());
|
||||
|
||||
typename RelatedTypes<typename T::value_t>::fractional_t mean(0);
|
||||
|
|
@ -534,12 +548,14 @@ namespace LLTrace
|
|||
template<typename T>
|
||||
typename RelatedTypes<T>::fractional_t getPeriodMean(const CountStatHandle<T>& stat, S32 num_periods = S32_MAX)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
return typename RelatedTypes<T>::fractional_t(getPeriodMean(static_cast<const StatType<CountAccumulator>&>(stat), num_periods));
|
||||
}
|
||||
F64 getPeriodMean(const StatType<SampleAccumulator>& stat, S32 num_periods = S32_MAX);
|
||||
template<typename T>
|
||||
typename RelatedTypes<T>::fractional_t getPeriodMean(const SampleStatHandle<T>& stat, S32 num_periods = S32_MAX)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
return typename RelatedTypes<T>::fractional_t(getPeriodMean(static_cast<const StatType<SampleAccumulator>&>(stat), num_periods));
|
||||
}
|
||||
|
||||
|
|
@ -547,6 +563,7 @@ namespace LLTrace
|
|||
template<typename T>
|
||||
typename RelatedTypes<T>::fractional_t getPeriodMean(const EventStatHandle<T>& stat, S32 num_periods = S32_MAX)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
return typename RelatedTypes<T>::fractional_t(getPeriodMean(static_cast<const StatType<EventAccumulator>&>(stat), num_periods));
|
||||
}
|
||||
|
||||
|
|
@ -556,6 +573,7 @@ namespace LLTrace
|
|||
template <typename T>
|
||||
typename RelatedTypes<typename T::value_t>::fractional_t getPeriodMeanPerSec(const StatType<T>& stat, S32 num_periods = S32_MAX)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
num_periods = llmin(num_periods, getNumRecordedPeriods());
|
||||
|
||||
typename RelatedTypes<typename T::value_t>::fractional_t mean = 0;
|
||||
|
|
@ -577,6 +595,7 @@ namespace LLTrace
|
|||
template<typename T>
|
||||
typename RelatedTypes<T>::fractional_t getPeriodMeanPerSec(const CountStatHandle<T>& stat, S32 num_periods = S32_MAX)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
return typename RelatedTypes<T>::fractional_t(getPeriodMeanPerSec(static_cast<const StatType<CountAccumulator>&>(stat), num_periods));
|
||||
}
|
||||
|
||||
|
|
@ -589,6 +608,7 @@ namespace LLTrace
|
|||
template<typename T>
|
||||
typename RelatedTypes<T>::fractional_t getPeriodStandardDeviation(const SampleStatHandle<T>& stat, S32 num_periods = S32_MAX)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
return typename RelatedTypes<T>::fractional_t(getPeriodStandardDeviation(static_cast<const StatType<SampleAccumulator>&>(stat), num_periods));
|
||||
}
|
||||
|
||||
|
|
@ -596,6 +616,7 @@ namespace LLTrace
|
|||
template<typename T>
|
||||
typename RelatedTypes<T>::fractional_t getPeriodStandardDeviation(const EventStatHandle<T>& stat, S32 num_periods = S32_MAX)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
return typename RelatedTypes<T>::fractional_t(getPeriodStandardDeviation(static_cast<const StatType<EventAccumulator>&>(stat), num_periods));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -274,12 +274,10 @@ void ThreadRecorder::pushToParent()
|
|||
}
|
||||
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_PULL_TRACE_DATA_FROM_CHILDREN("Pull child thread trace data");
|
||||
|
||||
void ThreadRecorder::pullFromChildren()
|
||||
{
|
||||
#if LL_TRACE_ENABLED
|
||||
LL_RECORD_BLOCK_TIME(FTM_PULL_TRACE_DATA_FROM_CHILDREN);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
if (mActiveRecordings.empty()) return;
|
||||
|
||||
{ LLMutexLock lock(&mChildListMutex);
|
||||
|
|
|
|||
|
|
@ -623,8 +623,7 @@ void LLImage::setLastError(const std::string& message)
|
|||
//---------------------------------------------------------------------------
|
||||
|
||||
LLImageBase::LLImageBase()
|
||||
: LLTrace::MemTrackable<LLImageBase>("LLImage"),
|
||||
mData(NULL),
|
||||
: mData(NULL),
|
||||
mDataSize(0),
|
||||
mWidth(0),
|
||||
mHeight(0),
|
||||
|
|
@ -673,7 +672,6 @@ void LLImageBase::sanityCheck()
|
|||
void LLImageBase::deleteData()
|
||||
{
|
||||
ll_aligned_free_16(mData);
|
||||
disclaimMem(mDataSize);
|
||||
mDataSize = 0;
|
||||
mData = NULL;
|
||||
}
|
||||
|
|
@ -731,7 +729,6 @@ U8* LLImageBase::allocateData(S32 size)
|
|||
}
|
||||
}
|
||||
mDataSize = size;
|
||||
claimMem(mDataSize);
|
||||
|
||||
return mData;
|
||||
}
|
||||
|
|
@ -752,9 +749,7 @@ U8* LLImageBase::reallocateData(S32 size)
|
|||
ll_aligned_free_16(mData) ;
|
||||
}
|
||||
mData = new_datap;
|
||||
disclaimMem(mDataSize);
|
||||
mDataSize = size;
|
||||
claimMem(mDataSize);
|
||||
mBadBufferAllocation = false;
|
||||
return mData;
|
||||
}
|
||||
|
|
@ -2258,9 +2253,7 @@ void LLImageBase::setDataAndSize(U8 *data, S32 size)
|
|||
{
|
||||
ll_assert_aligned(data, 16);
|
||||
mData = data;
|
||||
disclaimMem(mDataSize);
|
||||
mDataSize = size;
|
||||
claimMem(mDataSize);
|
||||
}
|
||||
|
||||
//static
|
||||
|
|
|
|||
|
|
@ -112,8 +112,7 @@ protected:
|
|||
// Image base class
|
||||
|
||||
class LLImageBase
|
||||
: public LLThreadSafeRefCount,
|
||||
public LLTrace::MemTrackable<LLImageBase>
|
||||
: public LLThreadSafeRefCount
|
||||
{
|
||||
protected:
|
||||
virtual ~LLImageBase();
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ LLImageJ2C::LLImageJ2C() : LLImageFormatted(IMG_CODEC_J2C),
|
|||
mAreaUsedForDataSizeCalcs(0)
|
||||
{
|
||||
mImpl.reset(fallbackCreateLLImageJ2CImpl());
|
||||
claimMem(mImpl);
|
||||
|
||||
// Clear data size table
|
||||
for( S32 i = 0; i <= MAX_DISCARD_LEVEL; i++)
|
||||
|
|
|
|||
|
|
@ -393,9 +393,7 @@ boolean LLImageJPEG::encodeEmptyOutputBuffer( j_compress_ptr cinfo )
|
|||
|
||||
cinfo->dest->next_output_byte = self->mOutputBuffer + self->mOutputBufferSize;
|
||||
cinfo->dest->free_in_buffer = self->mOutputBufferSize;
|
||||
self->disclaimMem(self->mOutputBufferSize);
|
||||
self->mOutputBufferSize = new_buffer_size;
|
||||
self->claimMem(new_buffer_size);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -501,13 +499,10 @@ bool LLImageJPEG::encode( const LLImageRaw* raw_image, F32 encode_time )
|
|||
// Allocate a temporary buffer big enough to hold the entire compressed image (and then some)
|
||||
// (Note: we make it bigger in emptyOutputBuffer() if we need to)
|
||||
delete[] mOutputBuffer;
|
||||
disclaimMem(mOutputBufferSize);
|
||||
mOutputBufferSize = getWidth() * getHeight() * getComponents() + 1024;
|
||||
claimMem(mOutputBufferSize);
|
||||
mOutputBuffer = new(std::nothrow) U8[ mOutputBufferSize ];
|
||||
if (mOutputBuffer == NULL)
|
||||
{
|
||||
disclaimMem(mOutputBufferSize);
|
||||
mOutputBufferSize = 0;
|
||||
setLastError("Failed to allocate output buffer");
|
||||
return false;
|
||||
|
|
@ -547,7 +542,6 @@ bool LLImageJPEG::encode( const LLImageRaw* raw_image, F32 encode_time )
|
|||
jpeg_destroy_compress(&cinfo);
|
||||
delete[] mOutputBuffer;
|
||||
mOutputBuffer = NULL;
|
||||
disclaimMem(mOutputBufferSize);
|
||||
mOutputBufferSize = 0;
|
||||
return false;
|
||||
}
|
||||
|
|
@ -650,7 +644,6 @@ bool LLImageJPEG::encode( const LLImageRaw* raw_image, F32 encode_time )
|
|||
// After finish_compress, we can release the temp output buffer.
|
||||
delete[] mOutputBuffer;
|
||||
mOutputBuffer = NULL;
|
||||
disclaimMem(mOutputBufferSize);
|
||||
mOutputBufferSize = 0;
|
||||
|
||||
////////////////////////////////////////
|
||||
|
|
@ -663,7 +656,6 @@ bool LLImageJPEG::encode( const LLImageRaw* raw_image, F32 encode_time )
|
|||
jpeg_destroy_compress(&cinfo);
|
||||
delete[] mOutputBuffer;
|
||||
mOutputBuffer = NULL;
|
||||
disclaimMem(mOutputBufferSize);
|
||||
mOutputBufferSize = 0;
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,8 +45,7 @@
|
|||
// * A simulator for a class can be implemented here. Please comment and document thoroughly.
|
||||
|
||||
LLImageBase::LLImageBase()
|
||||
: LLTrace::MemTrackable<LLImageBase>("LLImageBase"),
|
||||
mData(NULL),
|
||||
: mData(NULL),
|
||||
mDataSize(0),
|
||||
mWidth(0),
|
||||
mHeight(0),
|
||||
|
|
|
|||
|
|
@ -74,20 +74,17 @@ LLInventoryObject::LLInventoryObject(const LLUUID& uuid,
|
|||
const LLUUID& parent_uuid,
|
||||
LLAssetType::EType type,
|
||||
const std::string& name)
|
||||
: LLTrace::MemTrackable<LLInventoryObject>("LLInventoryObject"),
|
||||
mUUID(uuid),
|
||||
: mUUID(uuid),
|
||||
mParentUUID(parent_uuid),
|
||||
mType(type),
|
||||
mName(name),
|
||||
mCreationDate(0)
|
||||
{
|
||||
claimMem(mName);
|
||||
correctInventoryName(mName);
|
||||
}
|
||||
|
||||
LLInventoryObject::LLInventoryObject()
|
||||
: LLTrace::MemTrackable<LLInventoryObject>("LLInventoryObject"),
|
||||
mType(LLAssetType::AT_NONE),
|
||||
: mType(LLAssetType::AT_NONE),
|
||||
mCreationDate(0)
|
||||
{
|
||||
}
|
||||
|
|
@ -101,9 +98,7 @@ void LLInventoryObject::copyObject(const LLInventoryObject* other)
|
|||
mUUID = other->mUUID;
|
||||
mParentUUID = other->mParentUUID;
|
||||
mType = other->mType;
|
||||
disclaimMem(mName);
|
||||
mName = other->mName;
|
||||
claimMem(mName);
|
||||
}
|
||||
|
||||
const LLUUID& LLInventoryObject::getUUID() const
|
||||
|
|
@ -156,9 +151,7 @@ void LLInventoryObject::rename(const std::string& n)
|
|||
correctInventoryName(new_name);
|
||||
if( !new_name.empty() && new_name != mName )
|
||||
{
|
||||
disclaimMem(mName);
|
||||
mName = new_name;
|
||||
claimMem(mName);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -311,7 +304,6 @@ LLInventoryItem::LLInventoryItem(const LLUUID& uuid,
|
|||
|
||||
LLStringUtil::replaceNonstandardASCII(mDescription, ' ');
|
||||
LLStringUtil::replaceChar(mDescription, '|', ' ');
|
||||
claimMem(mDescription);
|
||||
|
||||
mPermissions.initMasks(inv_type);
|
||||
}
|
||||
|
|
@ -344,9 +336,7 @@ void LLInventoryItem::copyItem(const LLInventoryItem* other)
|
|||
copyObject(other);
|
||||
mPermissions = other->mPermissions;
|
||||
mAssetUUID = other->mAssetUUID;
|
||||
disclaimMem(mDescription);
|
||||
mDescription = other->mDescription;
|
||||
claimMem(mDescription);
|
||||
mSaleInfo = other->mSaleInfo;
|
||||
mInventoryType = other->mInventoryType;
|
||||
mFlags = other->mFlags;
|
||||
|
|
@ -426,9 +416,7 @@ void LLInventoryItem::setDescription(const std::string& d)
|
|||
LLInventoryItem::correctInventoryDescription(new_desc);
|
||||
if( new_desc != mDescription )
|
||||
{
|
||||
disclaimMem(mDescription);
|
||||
mDescription = new_desc;
|
||||
claimMem(mDescription);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -708,10 +696,8 @@ BOOL LLInventoryItem::importLegacyStream(std::istream& input_stream)
|
|||
valuestr[0] = '\000';
|
||||
}
|
||||
|
||||
disclaimMem(mDescription);
|
||||
mDescription.assign(valuestr);
|
||||
LLStringUtil::replaceNonstandardASCII(mDescription, ' ');
|
||||
claimMem(mDescription);
|
||||
/* TODO -- ask Ian about this code
|
||||
const char *donkey = mDescription.c_str();
|
||||
if (donkey[0] == '|')
|
||||
|
|
@ -840,11 +826,9 @@ void LLInventoryItem::asLLSD( LLSD& sd ) const
|
|||
sd[INV_CREATION_DATE_LABEL] = (S32) mCreationDate;
|
||||
}
|
||||
|
||||
LLTrace::BlockTimerStatHandle FTM_INVENTORY_SD_DESERIALIZE("Inventory SD Deserialize");
|
||||
|
||||
bool LLInventoryItem::fromLLSD(const LLSD& sd, bool is_new)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_INVENTORY_SD_DESERIALIZE);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
if (is_new)
|
||||
{
|
||||
// If we're adding LLSD to an existing object, need avoid
|
||||
|
|
@ -961,10 +945,8 @@ bool LLInventoryItem::fromLLSD(const LLSD& sd, bool is_new)
|
|||
w = INV_DESC_LABEL;
|
||||
if (sd.has(w))
|
||||
{
|
||||
disclaimMem(mDescription);
|
||||
mDescription = sd[w].asString();
|
||||
LLStringUtil::replaceNonstandardASCII(mDescription, ' ');
|
||||
claimMem(mDescription);
|
||||
}
|
||||
w = INV_CREATION_DATE_LABEL;
|
||||
if (sd.has(w))
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ class LLMessageSystem;
|
|||
// Base class for anything in the user's inventory. Handles the common code
|
||||
// between items and categories.
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
class LLInventoryObject : public LLRefCount, public LLTrace::MemTrackable<LLInventoryObject>
|
||||
class LLInventoryObject : public LLRefCount
|
||||
{
|
||||
public:
|
||||
typedef std::list<LLPointer<LLInventoryObject> > object_list_t;
|
||||
|
|
|
|||
|
|
@ -41,9 +41,6 @@
|
|||
//=========================================================================
|
||||
namespace
|
||||
{
|
||||
LLTrace::BlockTimerStatHandle FTM_BLEND_WATERVALUES("Blending Water Environment Day");
|
||||
LLTrace::BlockTimerStatHandle FTM_UPDATE_WATERVALUES("Update Water Environment Day");
|
||||
|
||||
template<typename T>
|
||||
inline T get_wrapping_distance(T begin, T end)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -66,11 +66,6 @@ namespace {
|
|||
}
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_BLEND_SKYVALUES("Blending Sky Environment");
|
||||
static LLTrace::BlockTimerStatHandle FTM_RECALCULATE_SKYVALUES("Recalculate Sky");
|
||||
static LLTrace::BlockTimerStatHandle FTM_RECALCULATE_BODIES("Recalculate Heavenly Bodies");
|
||||
static LLTrace::BlockTimerStatHandle FTM_RECALCULATE_LIGHTING("Recalculate Lighting");
|
||||
|
||||
//=========================================================================
|
||||
const std::string LLSettingsSky::SETTING_AMBIENT("ambient");
|
||||
const std::string LLSettingsSky::SETTING_BLUE_DENSITY("blue_density");
|
||||
|
|
@ -940,7 +935,7 @@ LLSD LLSettingsSky::translateLegacySettings(const LLSD& legacy)
|
|||
|
||||
void LLSettingsSky::updateSettings()
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_RECALCULATE_SKYVALUES);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
|
||||
// base class clears dirty flag so as to not trigger recursive update
|
||||
LLSettingsBase::updateSettings();
|
||||
|
|
|
|||
|
|
@ -33,14 +33,6 @@
|
|||
#include "v3colorutil.h"
|
||||
#include "indra_constants.h"
|
||||
|
||||
//=========================================================================
|
||||
namespace
|
||||
{
|
||||
LLTrace::BlockTimerStatHandle FTM_BLEND_WATERVALUES("Blending Water Environment");
|
||||
LLTrace::BlockTimerStatHandle FTM_UPDATE_WATERVALUES("Update Water Environment");
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
const std::string LLSettingsWater::SETTING_BLUR_MULTIPLIER("blur_multiplier");
|
||||
const std::string LLSettingsWater::SETTING_FOG_COLOR("water_fog_color");
|
||||
const std::string LLSettingsWater::SETTING_FOG_DENSITY("water_fog_density");
|
||||
|
|
|
|||
|
|
@ -63,8 +63,7 @@ U8* LLImageRaw::reallocateData(S32 ) { return NULL; }
|
|||
bool LLImageRaw::resize(U16, U16, S8) { return true; } // this method always returns true...
|
||||
|
||||
LLImageBase::LLImageBase()
|
||||
: LLTrace::MemTrackable<LLImageBase>("LLImageBase"),
|
||||
mData(NULL),
|
||||
: mData(NULL),
|
||||
mDataSize(0),
|
||||
mWidth(0),
|
||||
mHeight(0),
|
||||
|
|
|
|||
|
|
@ -74,8 +74,9 @@ public:
|
|||
};
|
||||
|
||||
template <class T>
|
||||
class LLOctreeNode : public LLTreeNode<T>
|
||||
class alignas(16) LLOctreeNode : public LLTreeNode<T>
|
||||
{
|
||||
LL_ALIGN_NEW
|
||||
public:
|
||||
|
||||
typedef LLOctreeTraveler<T> oct_traveler;
|
||||
|
|
@ -91,16 +92,6 @@ public:
|
|||
typedef LLOctreeNode<T> oct_node;
|
||||
typedef LLOctreeListener<T> oct_listener;
|
||||
|
||||
void* operator new(size_t size)
|
||||
{
|
||||
return ll_aligned_malloc_16(size);
|
||||
}
|
||||
|
||||
void operator delete(void* ptr)
|
||||
{
|
||||
ll_aligned_free_16(ptr);
|
||||
}
|
||||
|
||||
LLOctreeNode( const LLVector4a& center,
|
||||
const LLVector4a& size,
|
||||
BaseType* parent,
|
||||
|
|
|
|||
|
|
@ -34,9 +34,9 @@
|
|||
|
||||
// Extents are in joint space
|
||||
// isRiggedTo is based on the state of all currently associated rigged meshes
|
||||
LL_ALIGN_PREFIX(16)
|
||||
class LLJointRiggingInfo
|
||||
class alignas(16) LLJointRiggingInfo
|
||||
{
|
||||
LL_ALIGN_NEW
|
||||
public:
|
||||
LLJointRiggingInfo();
|
||||
bool isRiggedTo() const;
|
||||
|
|
@ -45,31 +45,10 @@ public:
|
|||
const LLVector4a *getRiggedExtents() const;
|
||||
void merge(const LLJointRiggingInfo& other);
|
||||
|
||||
void* operator new(size_t size)
|
||||
{
|
||||
return ll_aligned_malloc_16(size);
|
||||
}
|
||||
|
||||
void operator delete(void* ptr)
|
||||
{
|
||||
ll_aligned_free_16(ptr);
|
||||
}
|
||||
|
||||
void* operator new[](size_t size)
|
||||
{
|
||||
return ll_aligned_malloc_16(size);
|
||||
}
|
||||
|
||||
void operator delete[](void* ptr)
|
||||
{
|
||||
ll_aligned_free_16(ptr);
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
LL_ALIGN_16(LLVector4a mRiggedExtents[2]);
|
||||
LLVector4a mRiggedExtents[2];
|
||||
bool mIsRiggedTo;
|
||||
} LL_ALIGN_POSTFIX(16);
|
||||
};
|
||||
|
||||
// For storing all the rigging info associated with a given avatar or
|
||||
// object, keyed by joint_num.
|
||||
|
|
|
|||
|
|
@ -47,9 +47,9 @@ class LLRotation;
|
|||
// LLVector3/LLVector4.
|
||||
/////////////////////////////////
|
||||
|
||||
LL_ALIGN_PREFIX(16)
|
||||
class LLVector4a
|
||||
class alignas(16) LLVector4a
|
||||
{
|
||||
LL_ALIGN_NEW
|
||||
public:
|
||||
|
||||
///////////////////////////////////
|
||||
|
|
@ -323,7 +323,7 @@ public:
|
|||
|
||||
private:
|
||||
LLQuad mQ;
|
||||
} LL_ALIGN_POSTFIX(16);
|
||||
};
|
||||
|
||||
inline void update_min_max(LLVector4a& min, LLVector4a& max, const LLVector4a& p)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -34,19 +34,10 @@
|
|||
#include "llvolume.h"
|
||||
#include "llvector4a.h"
|
||||
|
||||
class LLVolumeTriangle : public LLRefCount
|
||||
class alignas(16) LLVolumeTriangle : public LLRefCount
|
||||
{
|
||||
LL_ALIGN_NEW
|
||||
public:
|
||||
void* operator new(size_t size)
|
||||
{
|
||||
return ll_aligned_malloc_16(size);
|
||||
}
|
||||
|
||||
void operator delete(void* ptr)
|
||||
{
|
||||
ll_aligned_free_16(ptr);
|
||||
}
|
||||
|
||||
LLVolumeTriangle()
|
||||
{
|
||||
mBinIndex = -1;
|
||||
|
|
@ -86,20 +77,10 @@ public:
|
|||
|
||||
};
|
||||
|
||||
class LLVolumeOctreeListener : public LLOctreeListener<LLVolumeTriangle>
|
||||
class alignas(16) LLVolumeOctreeListener : public LLOctreeListener<LLVolumeTriangle>
|
||||
{
|
||||
LL_ALIGN_NEW
|
||||
public:
|
||||
|
||||
void* operator new(size_t size)
|
||||
{
|
||||
return ll_aligned_malloc_16(size);
|
||||
}
|
||||
|
||||
void operator delete(void* ptr)
|
||||
{
|
||||
ll_aligned_free_16(ptr);
|
||||
}
|
||||
|
||||
LLVolumeOctreeListener(LLOctreeNode<LLVolumeTriangle>* node);
|
||||
~LLVolumeOctreeListener();
|
||||
|
||||
|
|
|
|||
|
|
@ -309,7 +309,6 @@ LLFilterSD2XMLRPCResponse::~LLFilterSD2XMLRPCResponse()
|
|||
}
|
||||
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_PROCESS_SD2XMLRPC_RESPONSE("SD2XMLRPC Response");
|
||||
// virtual
|
||||
LLIOPipe::EStatus LLFilterSD2XMLRPCResponse::process_impl(
|
||||
const LLChannelDescriptors& channels,
|
||||
|
|
@ -318,7 +317,7 @@ LLIOPipe::EStatus LLFilterSD2XMLRPCResponse::process_impl(
|
|||
LLSD& context,
|
||||
LLPumpIO* pump)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_PROCESS_SD2XMLRPC_RESPONSE);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
|
||||
PUMP_DEBUG;
|
||||
// This pipe does not work if it does not have everyting. This
|
||||
|
|
@ -386,8 +385,6 @@ LLFilterSD2XMLRPCRequest::~LLFilterSD2XMLRPCRequest()
|
|||
{
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_PROCESS_SD2XMLRPC_REQUEST("S22XMLRPC Request");
|
||||
|
||||
// virtual
|
||||
LLIOPipe::EStatus LLFilterSD2XMLRPCRequest::process_impl(
|
||||
const LLChannelDescriptors& channels,
|
||||
|
|
@ -396,7 +393,7 @@ LLIOPipe::EStatus LLFilterSD2XMLRPCRequest::process_impl(
|
|||
LLSD& context,
|
||||
LLPumpIO* pump)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_PROCESS_SD2XMLRPC_REQUEST);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
// This pipe does not work if it does not have everyting. This
|
||||
// could be addressed by making a stream parser for llsd which
|
||||
// handled partial information.
|
||||
|
|
@ -593,8 +590,6 @@ LLFilterXMLRPCResponse2LLSD::~LLFilterXMLRPCResponse2LLSD()
|
|||
{
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_PROCESS_XMLRPC2LLSD_RESPONSE("XMLRPC2LLSD Response");
|
||||
|
||||
LLIOPipe::EStatus LLFilterXMLRPCResponse2LLSD::process_impl(
|
||||
const LLChannelDescriptors& channels,
|
||||
buffer_ptr_t& buffer,
|
||||
|
|
@ -602,7 +597,7 @@ LLIOPipe::EStatus LLFilterXMLRPCResponse2LLSD::process_impl(
|
|||
LLSD& context,
|
||||
LLPumpIO* pump)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_PROCESS_XMLRPC2LLSD_RESPONSE);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
|
||||
PUMP_DEBUG;
|
||||
if(!eos) return STATUS_BREAK;
|
||||
|
|
@ -679,7 +674,6 @@ LLFilterXMLRPCRequest2LLSD::~LLFilterXMLRPCRequest2LLSD()
|
|||
{
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_PROCESS_XMLRPC2LLSD_REQUEST("XMLRPC2LLSD Request");
|
||||
LLIOPipe::EStatus LLFilterXMLRPCRequest2LLSD::process_impl(
|
||||
const LLChannelDescriptors& channels,
|
||||
buffer_ptr_t& buffer,
|
||||
|
|
@ -687,7 +681,7 @@ LLIOPipe::EStatus LLFilterXMLRPCRequest2LLSD::process_impl(
|
|||
LLSD& context,
|
||||
LLPumpIO* pump)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_PROCESS_XMLRPC2LLSD_REQUEST);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
PUMP_DEBUG;
|
||||
if(!eos) return STATUS_BREAK;
|
||||
if(!buffer) return STATUS_ERROR;
|
||||
|
|
|
|||
|
|
@ -121,6 +121,7 @@ LLSD LLHTTPNode::simplePost(const LLSD& input) const
|
|||
// virtual
|
||||
void LLHTTPNode::get(LLHTTPNode::ResponsePtr response, const LLSD& context) const
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
try
|
||||
{
|
||||
response->result(simpleGet());
|
||||
|
|
@ -134,6 +135,7 @@ void LLHTTPNode::get(LLHTTPNode::ResponsePtr response, const LLSD& context) cons
|
|||
// virtual
|
||||
void LLHTTPNode::put(LLHTTPNode::ResponsePtr response, const LLSD& context, const LLSD& input) const
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
try
|
||||
{
|
||||
response->result(simplePut(input));
|
||||
|
|
@ -147,6 +149,7 @@ void LLHTTPNode::put(LLHTTPNode::ResponsePtr response, const LLSD& context, cons
|
|||
// virtual
|
||||
void LLHTTPNode::post(LLHTTPNode::ResponsePtr response, const LLSD& context, const LLSD& input) const
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
try
|
||||
{
|
||||
response->result(simplePost(input));
|
||||
|
|
@ -160,6 +163,7 @@ void LLHTTPNode::post(LLHTTPNode::ResponsePtr response, const LLSD& context, con
|
|||
// virtual
|
||||
void LLHTTPNode::del(LLHTTPNode::ResponsePtr response, const LLSD& context) const
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
try
|
||||
{
|
||||
response->result(simpleDel(context));
|
||||
|
|
|
|||
|
|
@ -132,12 +132,6 @@ private:
|
|||
LLSD mHeaders;
|
||||
};
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_PROCESS_HTTP_PIPE("HTTP Pipe");
|
||||
static LLTrace::BlockTimerStatHandle FTM_PROCESS_HTTP_GET("HTTP Get");
|
||||
static LLTrace::BlockTimerStatHandle FTM_PROCESS_HTTP_PUT("HTTP Put");
|
||||
static LLTrace::BlockTimerStatHandle FTM_PROCESS_HTTP_POST("HTTP Post");
|
||||
static LLTrace::BlockTimerStatHandle FTM_PROCESS_HTTP_DELETE("HTTP Delete");
|
||||
|
||||
LLIOPipe::EStatus LLHTTPPipe::process_impl(
|
||||
const LLChannelDescriptors& channels,
|
||||
buffer_ptr_t& buffer,
|
||||
|
|
@ -145,7 +139,7 @@ LLIOPipe::EStatus LLHTTPPipe::process_impl(
|
|||
LLSD& context,
|
||||
LLPumpIO* pump)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_PROCESS_HTTP_PIPE);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
PUMP_DEBUG;
|
||||
LL_DEBUGS() << "LLSDHTTPServer::process_impl" << LL_ENDL;
|
||||
|
||||
|
|
@ -174,12 +168,10 @@ LLIOPipe::EStatus LLHTTPPipe::process_impl(
|
|||
std::string verb = context[CONTEXT_REQUEST][CONTEXT_VERB];
|
||||
if(verb == HTTP_VERB_GET)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_PROCESS_HTTP_GET);
|
||||
mNode.get(LLHTTPNode::ResponsePtr(mResponse), context);
|
||||
}
|
||||
else if(verb == HTTP_VERB_PUT)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_PROCESS_HTTP_PUT);
|
||||
LLSD input;
|
||||
if (mNode.getContentType() == LLHTTPNode::CONTENT_TYPE_LLSD)
|
||||
{
|
||||
|
|
@ -195,7 +187,6 @@ LLIOPipe::EStatus LLHTTPPipe::process_impl(
|
|||
}
|
||||
else if(verb == HTTP_VERB_POST)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_PROCESS_HTTP_POST);
|
||||
LLSD input;
|
||||
if (mNode.getContentType() == LLHTTPNode::CONTENT_TYPE_LLSD)
|
||||
{
|
||||
|
|
@ -211,7 +202,6 @@ LLIOPipe::EStatus LLHTTPPipe::process_impl(
|
|||
}
|
||||
else if(verb == HTTP_VERB_DELETE)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_PROCESS_HTTP_DELETE);
|
||||
mNode.del(LLHTTPNode::ResponsePtr(mResponse), context);
|
||||
}
|
||||
else if(verb == HTTP_VERB_OPTIONS)
|
||||
|
|
@ -455,8 +445,6 @@ protected:
|
|||
* LLHTTPResponseHeader
|
||||
*/
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_PROCESS_HTTP_HEADER("HTTP Header");
|
||||
|
||||
// virtual
|
||||
LLIOPipe::EStatus LLHTTPResponseHeader::process_impl(
|
||||
const LLChannelDescriptors& channels,
|
||||
|
|
@ -465,7 +453,7 @@ LLIOPipe::EStatus LLHTTPResponseHeader::process_impl(
|
|||
LLSD& context,
|
||||
LLPumpIO* pump)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_PROCESS_HTTP_HEADER);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
PUMP_DEBUG;
|
||||
if(eos)
|
||||
{
|
||||
|
|
@ -655,8 +643,6 @@ void LLHTTPResponder::markBad(
|
|||
<< "</body>\n</html>\n";
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_PROCESS_HTTP_RESPONDER("HTTP Responder");
|
||||
|
||||
// virtual
|
||||
LLIOPipe::EStatus LLHTTPResponder::process_impl(
|
||||
const LLChannelDescriptors& channels,
|
||||
|
|
@ -665,7 +651,7 @@ LLIOPipe::EStatus LLHTTPResponder::process_impl(
|
|||
LLSD& context,
|
||||
LLPumpIO* pump)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_PROCESS_HTTP_RESPONDER);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
PUMP_DEBUG;
|
||||
LLIOPipe::EStatus status = STATUS_OK;
|
||||
|
||||
|
|
|
|||
|
|
@ -300,8 +300,6 @@ LLIOSocketReader::~LLIOSocketReader()
|
|||
//LL_DEBUGS() << "Destroying LLIOSocketReader" << LL_ENDL;
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_PROCESS_SOCKET_READER("Socket Reader");
|
||||
|
||||
// virtual
|
||||
LLIOPipe::EStatus LLIOSocketReader::process_impl(
|
||||
const LLChannelDescriptors& channels,
|
||||
|
|
@ -310,7 +308,7 @@ LLIOPipe::EStatus LLIOSocketReader::process_impl(
|
|||
LLSD& context,
|
||||
LLPumpIO* pump)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_PROCESS_SOCKET_READER);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
PUMP_DEBUG;
|
||||
if(!mSource) return STATUS_PRECONDITION_NOT_MET;
|
||||
if(!mInitialized)
|
||||
|
|
@ -400,7 +398,6 @@ LLIOSocketWriter::~LLIOSocketWriter()
|
|||
//LL_DEBUGS() << "Destroying LLIOSocketWriter" << LL_ENDL;
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_PROCESS_SOCKET_WRITER("Socket Writer");
|
||||
// virtual
|
||||
LLIOPipe::EStatus LLIOSocketWriter::process_impl(
|
||||
const LLChannelDescriptors& channels,
|
||||
|
|
@ -409,7 +406,7 @@ LLIOPipe::EStatus LLIOSocketWriter::process_impl(
|
|||
LLSD& context,
|
||||
LLPumpIO* pump)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_PROCESS_SOCKET_WRITER);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
PUMP_DEBUG;
|
||||
if(!mDestination) return STATUS_PRECONDITION_NOT_MET;
|
||||
if(!mInitialized)
|
||||
|
|
@ -556,7 +553,6 @@ void LLIOServerSocket::setResponseTimeout(F32 timeout_secs)
|
|||
mResponseTimeout = timeout_secs;
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_PROCESS_SERVER_SOCKET("Server Socket");
|
||||
// virtual
|
||||
LLIOPipe::EStatus LLIOServerSocket::process_impl(
|
||||
const LLChannelDescriptors& channels,
|
||||
|
|
@ -565,7 +561,7 @@ LLIOPipe::EStatus LLIOServerSocket::process_impl(
|
|||
LLSD& context,
|
||||
LLPumpIO* pump)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_PROCESS_SERVER_SOCKET);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
PUMP_DEBUG;
|
||||
if(!pump)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@ LLIOPipe::EStatus LLIOFlush::process_impl(
|
|||
}
|
||||
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_PROCESS_SLEEP("IO Sleep");
|
||||
/**
|
||||
* @class LLIOSleep
|
||||
*/
|
||||
|
|
@ -56,7 +55,7 @@ LLIOPipe::EStatus LLIOSleep::process_impl(
|
|||
LLSD& context,
|
||||
LLPumpIO* pump)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_PROCESS_SLEEP);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
if(mSeconds > 0.0)
|
||||
{
|
||||
if(pump) pump->sleepChain(mSeconds);
|
||||
|
|
@ -66,7 +65,6 @@ LLIOPipe::EStatus LLIOSleep::process_impl(
|
|||
return STATUS_DONE;
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_PROCESS_ADD_CHAIN("Add Chain");
|
||||
/**
|
||||
* @class LLIOAddChain
|
||||
*/
|
||||
|
|
@ -77,7 +75,7 @@ LLIOPipe::EStatus LLIOAddChain::process_impl(
|
|||
LLSD& context,
|
||||
LLPumpIO* pump)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_PROCESS_ADD_CHAIN);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
pump->addChain(mChain, mTimeout);
|
||||
return STATUS_DONE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -416,9 +416,6 @@ void LLPumpIO::pump()
|
|||
pump(DEFAULT_POLL_TIMEOUT);
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_PUMP_IO("Pump IO");
|
||||
static LLTrace::BlockTimerStatHandle FTM_PUMP_POLL("Pump Poll");
|
||||
|
||||
LLPumpIO::current_chain_t LLPumpIO::removeRunningChain(LLPumpIO::current_chain_t& run_chain)
|
||||
{
|
||||
std::for_each(
|
||||
|
|
@ -431,7 +428,7 @@ LLPumpIO::current_chain_t LLPumpIO::removeRunningChain(LLPumpIO::current_chain_t
|
|||
//timeout is in microseconds
|
||||
void LLPumpIO::pump(const S32& poll_timeout)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_PUMP_IO);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
//LL_INFOS() << "LLPumpIO::pump()" << LL_ENDL;
|
||||
|
||||
// Run any pending runners.
|
||||
|
|
@ -509,7 +506,7 @@ void LLPumpIO::pump(const S32& poll_timeout)
|
|||
S32 count = 0;
|
||||
S32 client_id = 0;
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_PUMP_POLL);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
apr_pollset_poll(mPollset, poll_timeout, &count, &poll_fd);
|
||||
}
|
||||
PUMP_DEBUG;
|
||||
|
|
@ -737,10 +734,9 @@ bool LLPumpIO::respond(
|
|||
return true;
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_PUMP_CALLBACK_CHAIN("Chain");
|
||||
|
||||
void LLPumpIO::callback()
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
//LL_INFOS() << "LLPumpIO::callback()" << LL_ENDL;
|
||||
if(true)
|
||||
{
|
||||
|
|
@ -756,7 +752,6 @@ void LLPumpIO::callback()
|
|||
callbacks_t::iterator end = mCallbacks.end();
|
||||
for(; it != end; ++it)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_PUMP_CALLBACK_CHAIN);
|
||||
// it's always the first and last time for respone chains
|
||||
(*it).mHead = (*it).mChainLinks.begin();
|
||||
(*it).mInit = true;
|
||||
|
|
|
|||
|
|
@ -533,6 +533,8 @@ static LLTrace::BlockTimerStatHandle FTM_PROCESS_MESSAGES("Process Messages");
|
|||
// decode a given message
|
||||
BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender )
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_PROCESS_MESSAGES);
|
||||
|
||||
llassert( mReceiveSize >= 0 );
|
||||
llassert( mCurrentRMessageTemplate);
|
||||
llassert( !mCurrentRMessageData );
|
||||
|
|
@ -707,12 +709,9 @@ BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender
|
|||
decode_timer.reset();
|
||||
}
|
||||
|
||||
if( !mCurrentRMessageTemplate->callHandlerFunc(gMessageSystem) )
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_PROCESS_MESSAGES);
|
||||
if( !mCurrentRMessageTemplate->callHandlerFunc(gMessageSystem) )
|
||||
{
|
||||
LL_WARNS() << "Message from " << sender << " with no handler function received: " << mCurrentRMessageTemplate->mName << LL_ENDL;
|
||||
}
|
||||
LL_WARNS() << "Message from " << sender << " with no handler function received: " << mCurrentRMessageTemplate->mName << LL_ENDL;
|
||||
}
|
||||
|
||||
if(LLMessageReader::getTimeDecodes() || gMessageSystem->getTimingCallback())
|
||||
|
|
|
|||
|
|
@ -30,8 +30,7 @@
|
|||
#include "llfontbitmapcache.h"
|
||||
|
||||
LLFontBitmapCache::LLFontBitmapCache()
|
||||
: LLTrace::MemTrackable<LLFontBitmapCache>("LLFontBitmapCache"),
|
||||
mNumComponents(0),
|
||||
: mNumComponents(0),
|
||||
mBitmapWidth(0),
|
||||
mBitmapHeight(0),
|
||||
mBitmapNum(-1),
|
||||
|
|
@ -124,9 +123,6 @@ BOOL LLFontBitmapCache::nextOpenPos(S32 width, S32 &pos_x, S32 &pos_y, S32& bitm
|
|||
image_gl->createGLTexture(0, image_raw);
|
||||
gGL.getTexUnit(0)->bind(image_gl);
|
||||
image_gl->setFilteringOption(LLTexUnit::TFO_POINT); // was setMipFilterNearest(TRUE, TRUE);
|
||||
|
||||
claimMem(image_raw);
|
||||
claimMem(image_gl);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -156,20 +152,8 @@ void LLFontBitmapCache::destroyGL()
|
|||
|
||||
void LLFontBitmapCache::reset()
|
||||
{
|
||||
for (std::vector<LLPointer<LLImageRaw> >::iterator it = mImageRawVec.begin(), end_it = mImageRawVec.end();
|
||||
it != end_it;
|
||||
++it)
|
||||
{
|
||||
disclaimMem(**it);
|
||||
}
|
||||
mImageRawVec.clear();
|
||||
|
||||
for (std::vector<LLPointer<LLImageGL> >::iterator it = mImageGLVec.begin(), end_it = mImageGLVec.end();
|
||||
it != end_it;
|
||||
++it)
|
||||
{
|
||||
disclaimMem(**it);
|
||||
}
|
||||
mImageGLVec.clear();
|
||||
|
||||
mBitmapWidth = 0;
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
// Maintain a collection of bitmaps containing rendered glyphs.
|
||||
// Generalizes the single-bitmap logic from LLFontFreetype and LLFontGL.
|
||||
class LLFontBitmapCache : public LLTrace::MemTrackable<LLFontBitmapCache>
|
||||
class LLFontBitmapCache
|
||||
{
|
||||
public:
|
||||
LLFontBitmapCache();
|
||||
|
|
|
|||
|
|
@ -104,8 +104,7 @@ LLFontGlyphInfo::LLFontGlyphInfo(U32 index)
|
|||
}
|
||||
|
||||
LLFontFreetype::LLFontFreetype()
|
||||
: LLTrace::MemTrackable<LLFontFreetype>("LLFontFreetype"),
|
||||
mFontBitmapCachep(new LLFontBitmapCache),
|
||||
: mFontBitmapCachep(new LLFontBitmapCache),
|
||||
mAscender(0.f),
|
||||
mDescender(0.f),
|
||||
mLineHeight(0.f),
|
||||
|
|
@ -222,8 +221,6 @@ BOOL LLFontFreetype::loadFace(const std::string& filename, F32 point_size, F32 v
|
|||
S32 max_char_height = ll_round(0.5f + (y_max - y_min));
|
||||
|
||||
mFontBitmapCachep->init(components, max_char_width, max_char_height);
|
||||
claimMem(mFontBitmapCachep);
|
||||
|
||||
|
||||
if (!mFTFace->charmap)
|
||||
{
|
||||
|
|
@ -238,7 +235,6 @@ BOOL LLFontFreetype::loadFace(const std::string& filename, F32 point_size, F32 v
|
|||
}
|
||||
|
||||
mName = filename;
|
||||
claimMem(mName);
|
||||
mPointSize = point_size;
|
||||
|
||||
mStyle = LLFontGL::NORMAL;
|
||||
|
|
@ -586,7 +582,6 @@ void LLFontFreetype::insertGlyphInfo(llwchar wch, LLFontGlyphInfo* gi) const
|
|||
}
|
||||
else
|
||||
{
|
||||
claimMem(gi);
|
||||
mCharGlyphInfoMap[wch] = gi;
|
||||
}
|
||||
}
|
||||
|
|
@ -632,11 +627,9 @@ void LLFontFreetype::resetBitmapCache()
|
|||
it != end_it;
|
||||
++it)
|
||||
{
|
||||
disclaimMem(it->second);
|
||||
delete it->second;
|
||||
}
|
||||
mCharGlyphInfoMap.clear();
|
||||
disclaimMem(mFontBitmapCachep);
|
||||
mFontBitmapCachep->reset();
|
||||
|
||||
// Adding default glyph is skipped for fallback fonts here as well as in loadFace().
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ struct LLFontGlyphInfo
|
|||
|
||||
extern LLFontManager *gFontManagerp;
|
||||
|
||||
class LLFontFreetype : public LLRefCount, public LLTrace::MemTrackable<LLFontFreetype>
|
||||
class LLFontFreetype : public LLRefCount
|
||||
{
|
||||
public:
|
||||
LLFontFreetype();
|
||||
|
|
|
|||
|
|
@ -109,8 +109,6 @@ S32 LLFontGL::getNumFaces(const std::string& filename)
|
|||
return mFontFreetype->getNumFaces(filename);
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_RENDER_FONTS("Fonts");
|
||||
|
||||
S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, const LLRect& rect, const LLColor4 &color, HAlign halign, VAlign valign, U8 style,
|
||||
ShadowType shadow, S32 max_chars, F32* right_x, BOOL use_ellipses) const
|
||||
{
|
||||
|
|
@ -147,7 +145,7 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, const LLRectf& rec
|
|||
S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, const LLColor4 &color, HAlign halign, VAlign valign, U8 style,
|
||||
ShadowType shadow, S32 max_chars, S32 max_pixels, F32* right_x, BOOL use_ellipses) const
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_RENDER_FONTS);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
|
||||
if(!sDisplayFont) //do not display texts
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2434,6 +2434,7 @@ void LLGLNamePool::cleanup()
|
|||
|
||||
GLuint LLGLNamePool::allocate()
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
#if LL_GL_NAME_POOLING
|
||||
for (name_list_t::iterator iter = mNameList.begin(); iter != mNameList.end(); ++iter)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -276,11 +276,10 @@ S32 LLImageGL::dataFormatComponents(S32 dataformat)
|
|||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_IMAGE_UPDATE_STATS("Image Stats");
|
||||
// static
|
||||
void LLImageGL::updateStats(F32 current_time)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_IMAGE_UPDATE_STATS);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
sLastFrameTime = current_time;
|
||||
sBoundTextureMemory = sCurBoundTextureMemory;
|
||||
sCurBoundTextureMemory = S32Bytes(0);
|
||||
|
|
@ -313,10 +312,8 @@ void LLImageGL::destroyGL(BOOL save_state)
|
|||
if (save_state && glimage->isGLTextureCreated() && glimage->mComponents)
|
||||
{
|
||||
glimage->mSaveData = new LLImageRaw;
|
||||
glimage->claimMem(glimage->mSaveData);
|
||||
if(!glimage->readBackRaw(glimage->mCurrentDiscardLevel, glimage->mSaveData, false)) //necessary, keep it.
|
||||
{
|
||||
glimage->disclaimMem(glimage->mSaveData);
|
||||
glimage->mSaveData = NULL ;
|
||||
}
|
||||
}
|
||||
|
|
@ -390,8 +387,7 @@ BOOL LLImageGL::create(LLPointer<LLImageGL>& dest, const LLImageRaw* imageraw, B
|
|||
//----------------------------------------------------------------------------
|
||||
|
||||
LLImageGL::LLImageGL(BOOL usemipmaps)
|
||||
: LLTrace::MemTrackable<LLImageGL>("LLImageGL"),
|
||||
mSaveData(0), mExternalTexture(FALSE)
|
||||
: mSaveData(0), mExternalTexture(FALSE)
|
||||
{
|
||||
init(usemipmaps);
|
||||
setSize(0, 0, 0);
|
||||
|
|
@ -400,8 +396,7 @@ LLImageGL::LLImageGL(BOOL usemipmaps)
|
|||
}
|
||||
|
||||
LLImageGL::LLImageGL(U32 width, U32 height, U8 components, BOOL usemipmaps)
|
||||
: LLTrace::MemTrackable<LLImageGL>("LLImageGL"),
|
||||
mSaveData(0), mExternalTexture(FALSE)
|
||||
: mSaveData(0), mExternalTexture(FALSE)
|
||||
{
|
||||
llassert( components <= 4 );
|
||||
init(usemipmaps);
|
||||
|
|
@ -411,8 +406,7 @@ LLImageGL::LLImageGL(U32 width, U32 height, U8 components, BOOL usemipmaps)
|
|||
}
|
||||
|
||||
LLImageGL::LLImageGL(const LLImageRaw* imageraw, BOOL usemipmaps)
|
||||
: LLTrace::MemTrackable<LLImageGL>("LLImageGL"),
|
||||
mSaveData(0), mExternalTexture(FALSE)
|
||||
: mSaveData(0), mExternalTexture(FALSE)
|
||||
{
|
||||
init(usemipmaps);
|
||||
setSize(0, 0, 0);
|
||||
|
|
@ -430,7 +424,6 @@ LLImageGL::LLImageGL(
|
|||
LLGLenum formatPrimary,
|
||||
LLGLenum formatType,
|
||||
LLTexUnit::eTextureAddressMode addressMode)
|
||||
: LLTrace::MemTrackable<LLImageGL>("LLImageGL"), mSaveData(0), mExternalTexture(TRUE)
|
||||
{
|
||||
init(false);
|
||||
mTexName = texName;
|
||||
|
|
@ -682,10 +675,9 @@ void LLImageGL::setImage(const LLImageRaw* imageraw)
|
|||
setImage(rawdata, FALSE);
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_SET_IMAGE("setImage");
|
||||
BOOL LLImageGL::setImage(const U8* data_in, BOOL data_hasmips, S32 usename)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_SET_IMAGE);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
bool is_compressed = false;
|
||||
|
||||
switch (mFormatPrimary)
|
||||
|
|
@ -746,8 +738,6 @@ BOOL LLImageGL::setImage(const U8* data_in, BOOL data_hasmips, S32 usename)
|
|||
}
|
||||
else
|
||||
{
|
||||
// LL_RECORD_BLOCK_TIME(FTM_TEMP4);
|
||||
|
||||
if(mFormatSwapBytes)
|
||||
{
|
||||
glPixelStorei(GL_UNPACK_SWAP_BYTES, 1);
|
||||
|
|
@ -778,8 +768,6 @@ BOOL LLImageGL::setImage(const U8* data_in, BOOL data_hasmips, S32 usename)
|
|||
{
|
||||
stop_glerror();
|
||||
{
|
||||
// LL_RECORD_BLOCK_TIME(FTM_TEMP4);
|
||||
|
||||
if(mFormatSwapBytes)
|
||||
{
|
||||
glPixelStorei(GL_UNPACK_SWAP_BYTES, 1);
|
||||
|
|
@ -889,7 +877,6 @@ BOOL LLImageGL::setImage(const U8* data_in, BOOL data_hasmips, S32 usename)
|
|||
llassert(w > 0 && h > 0 && cur_mip_data);
|
||||
(void)cur_mip_data;
|
||||
{
|
||||
// LL_RECORD_BLOCK_TIME(FTM_TEMP4);
|
||||
if(mFormatSwapBytes)
|
||||
{
|
||||
glPixelStorei(GL_UNPACK_SWAP_BYTES, 1);
|
||||
|
|
@ -1203,10 +1190,9 @@ BOOL LLImageGL::setSubImageFromFrameBuffer(S32 fb_x, S32 fb_y, S32 x_pos, S32 y_
|
|||
}
|
||||
|
||||
// static
|
||||
static LLTrace::BlockTimerStatHandle FTM_GENERATE_TEXTURES("generate textures");
|
||||
void LLImageGL::generateTextures(S32 numTextures, U32 *textures)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_GENERATE_TEXTURES);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
glGenTextures(numTextures, textures);
|
||||
}
|
||||
|
||||
|
|
@ -1220,10 +1206,9 @@ void LLImageGL::deleteTextures(S32 numTextures, const U32 *textures)
|
|||
}
|
||||
|
||||
// static
|
||||
static LLTrace::BlockTimerStatHandle FTM_SET_MANUAL_IMAGE("setManualImage");
|
||||
void LLImageGL::setManualImage(U32 target, S32 miplevel, S32 intformat, S32 width, S32 height, U32 pixformat, U32 pixtype, const void* pixels, bool allow_compression)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_SET_MANUAL_IMAGE);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
bool use_scratch = false;
|
||||
U32* scratch = NULL;
|
||||
if (LLRender::sGLCoreProfile)
|
||||
|
|
@ -1338,10 +1323,9 @@ void LLImageGL::setManualImage(U32 target, S32 miplevel, S32 intformat, S32 widt
|
|||
|
||||
//create an empty GL texture: just create a texture name
|
||||
//the texture is assiciate with some image by calling glTexImage outside LLImageGL
|
||||
static LLTrace::BlockTimerStatHandle FTM_CREATE_GL_TEXTURE1("createGLTexture()");
|
||||
BOOL LLImageGL::createGLTexture()
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_CREATE_GL_TEXTURE1);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
if (gGLManager.mIsDisabled)
|
||||
{
|
||||
LL_WARNS() << "Trying to create a texture while GL is disabled!" << LL_ENDL;
|
||||
|
|
@ -1371,10 +1355,9 @@ BOOL LLImageGL::createGLTexture()
|
|||
return TRUE ;
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_CREATE_GL_TEXTURE2("createGLTexture(raw)");
|
||||
BOOL LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S32 usename/*=0*/, BOOL to_create, S32 category)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_CREATE_GL_TEXTURE2);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
if (gGLManager.mIsDisabled)
|
||||
{
|
||||
LL_WARNS() << "Trying to create a texture while GL is disabled!" << LL_ENDL;
|
||||
|
|
@ -1485,10 +1468,9 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S
|
|||
return createGLTexture(discard_level, rawdata, FALSE, usename);
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_CREATE_GL_TEXTURE3("createGLTexture3(data)");
|
||||
BOOL LLImageGL::createGLTexture(S32 discard_level, const U8* data_in, BOOL data_hasmips, S32 usename)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_CREATE_GL_TEXTURE3);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
llassert(data_in);
|
||||
stop_glerror();
|
||||
|
||||
|
|
@ -1595,9 +1577,7 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const U8* data_in, BOOL data_
|
|||
mNewTexName = 0;
|
||||
}
|
||||
|
||||
disclaimMem(mTextureMemory);
|
||||
mTextureMemory = (S32Bytes)getMipBytes(mCurrentDiscardLevel);
|
||||
claimMem(mTextureMemory);
|
||||
sGlobalTextureMemory += mTextureMemory;
|
||||
mTexelsInGLTexture = getWidth() * getHeight();
|
||||
|
||||
|
|
@ -1735,7 +1715,6 @@ void LLImageGL::destroyGLTexture()
|
|||
if(mTextureMemory != S32Bytes(0))
|
||||
{
|
||||
sGlobalTextureMemory -= mTextureMemory;
|
||||
disclaimMem(mTextureMemory);
|
||||
mTextureMemory = (S32Bytes)0;
|
||||
}
|
||||
|
||||
|
|
@ -2088,7 +2067,6 @@ U32 LLImageGL::createPickMask(S32 pWidth, S32 pHeight)
|
|||
U32 size = pick_width * pick_height;
|
||||
size = (size + 7) / 8; // pixelcount-to-bits
|
||||
mPickMask = new U8[size];
|
||||
claimMem(size);
|
||||
mPickMaskWidth = pick_width - 1;
|
||||
mPickMaskHeight = pick_height - 1;
|
||||
|
||||
|
|
@ -2103,7 +2081,6 @@ void LLImageGL::freePickMask()
|
|||
// pickmask validity depends on old image size, delete it
|
||||
if (mPickMask != NULL)
|
||||
{
|
||||
disclaimMem((mPickMaskWidth * mPickMaskHeight + 7) / 8);
|
||||
delete [] mPickMask;
|
||||
}
|
||||
mPickMask = NULL;
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ class LLWindow;
|
|||
#define MEGA_BYTES_TO_BYTES(x) ((x) << 20)
|
||||
|
||||
//============================================================================
|
||||
class LLImageGL : public LLRefCount, public LLTrace::MemTrackable<LLImageGL>
|
||||
class LLImageGL : public LLRefCount
|
||||
{
|
||||
friend class LLTexUnit;
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -1083,8 +1083,6 @@ void gl_rect_2d_simple( S32 width, S32 height )
|
|||
gGL.end();
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_RENDER_SEGMENTED_RECT ("Render segmented rectangle");
|
||||
|
||||
void gl_segmented_rect_2d_tex(const S32 left,
|
||||
const S32 top,
|
||||
const S32 right,
|
||||
|
|
@ -1094,7 +1092,7 @@ void gl_segmented_rect_2d_tex(const S32 left,
|
|||
const S32 border_size,
|
||||
const U32 edges)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_RENDER_SEGMENTED_RECT);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
|
||||
S32 width = llabs(right - left);
|
||||
S32 height = llabs(top - bottom);
|
||||
|
|
@ -1253,7 +1251,7 @@ void gl_segmented_rect_2d_fragment_tex(const LLRect& rect,
|
|||
const F32 end_fragment,
|
||||
const U32 edges)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_RENDER_SEGMENTED_RECT);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
const S32 left = rect.mLeft;
|
||||
const S32 right = rect.mRight;
|
||||
const S32 top = rect.mTop;
|
||||
|
|
@ -1440,7 +1438,7 @@ void gl_segmented_rect_2d_fragment_tex(const LLRect& rect,
|
|||
void gl_segmented_rect_3d_tex(const LLRectf& clip_rect, const LLRectf& center_uv_rect, const LLRectf& center_draw_rect,
|
||||
const LLVector3& width_vec, const LLVector3& height_vec)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_RENDER_SEGMENTED_RECT);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
|
||||
gGL.begin(LLRender::QUADS);
|
||||
{
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ class LLFontGL ;
|
|||
//
|
||||
//this is an abstract class as the parent for the class LLGLTexture
|
||||
//
|
||||
class LLTexture : public virtual LLRefCount, public LLTrace::MemTrackable<LLTexture>
|
||||
class LLTexture : public virtual LLRefCount
|
||||
{
|
||||
friend class LLTexUnit ;
|
||||
friend class LLFontGL ;
|
||||
|
|
@ -52,7 +52,6 @@ protected:
|
|||
|
||||
public:
|
||||
LLTexture()
|
||||
: LLTrace::MemTrackable<LLTexture>("LLTexture")
|
||||
{}
|
||||
|
||||
//
|
||||
|
|
|
|||
|
|
@ -805,13 +805,15 @@ void LLVertexBuffer::draw(U32 mode, U32 count, U32 indices_offset) const
|
|||
placeFence();
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_GL_DRAW_ARRAYS("GL draw arrays");
|
||||
|
||||
void LLVertexBuffer::drawArrays(U32 mode, U32 first, U32 count) const
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
llassert(!LLGLSLShader::sNoFixedFunction || LLGLSLShader::sCurBoundShaderPtr != NULL);
|
||||
mMappable = false;
|
||||
gGL.syncMatrices();
|
||||
|
||||
#ifndef LL_RELEASE_FOR_DOWNLOAD
|
||||
llassert(mNumVerts >= 0);
|
||||
if (first >= (U32)mNumVerts ||
|
||||
first + count > (U32)mNumVerts)
|
||||
|
|
@ -839,16 +841,11 @@ void LLVertexBuffer::drawArrays(U32 mode, U32 first, U32 count) const
|
|||
LL_ERRS() << "Invalid draw mode: " << mode << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_GL_DRAW_ARRAYS);
|
||||
stop_glerror();
|
||||
LLGLSLShader::startProfile();
|
||||
stop_glerror();
|
||||
LL_PROFILER_GPU_ZONEC("gl.DrawArrays", 0xFF4040)
|
||||
glDrawArrays(sGLMode[mode], first, count);
|
||||
stop_glerror();
|
||||
LLGLSLShader::stopProfile(count, mode);
|
||||
}
|
||||
|
||||
stop_glerror();
|
||||
|
|
@ -949,8 +946,7 @@ S32 LLVertexBuffer::determineUsage(S32 usage)
|
|||
}
|
||||
|
||||
LLVertexBuffer::LLVertexBuffer(U32 typemask, S32 usage)
|
||||
: LLTrace::MemTrackable<LLVertexBuffer>("LLVertexBuffer"),
|
||||
LLRefCount(),
|
||||
: LLRefCount(),
|
||||
|
||||
mNumVerts(0),
|
||||
mNumIndices(0),
|
||||
|
|
@ -1095,9 +1091,7 @@ void LLVertexBuffer::waitFence() const
|
|||
|
||||
void LLVertexBuffer::genBuffer(U32 size)
|
||||
{
|
||||
disclaimMem(mSize);
|
||||
mSize = vbo_block_size(size);
|
||||
claimMem(mSize);
|
||||
|
||||
if (mUsage == GL_STREAM_DRAW_ARB)
|
||||
{
|
||||
|
|
@ -1193,9 +1187,7 @@ bool LLVertexBuffer::createGLBuffer(U32 size)
|
|||
static int gl_buffer_idx = 0;
|
||||
mGLBuffer = ++gl_buffer_idx;
|
||||
mMappedData = (U8*)ll_aligned_malloc_16(size);
|
||||
disclaimMem(mSize);
|
||||
mSize = size;
|
||||
claimMem(mSize);
|
||||
}
|
||||
|
||||
if (!mMappedData)
|
||||
|
|
@ -1365,8 +1357,6 @@ bool LLVertexBuffer::allocateBuffer(S32 nverts, S32 nindices, bool create)
|
|||
return success;
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_SETUP_VERTEX_ARRAY("Setup VAO");
|
||||
|
||||
void LLVertexBuffer::setupVertexArray()
|
||||
{
|
||||
if (!mGLArray)
|
||||
|
|
@ -1374,7 +1364,7 @@ void LLVertexBuffer::setupVertexArray()
|
|||
return;
|
||||
}
|
||||
|
||||
LL_RECORD_BLOCK_TIME(FTM_SETUP_VERTEX_ARRAY);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
#if GL_ARB_vertex_array_object
|
||||
glBindVertexArray(mGLArray);
|
||||
#endif
|
||||
|
|
@ -1547,12 +1537,11 @@ bool expand_region(LLVertexBuffer::MappedRegion& region, S32 index, S32 count)
|
|||
return true;
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_VBO_MAP_BUFFER_RANGE("VBO Map Range");
|
||||
static LLTrace::BlockTimerStatHandle FTM_VBO_MAP_BUFFER("VBO Map");
|
||||
|
||||
// Map for data access
|
||||
volatile U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, bool map_range)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
bindGLBuffer(true);
|
||||
if (mFinal)
|
||||
{
|
||||
|
|
@ -1619,7 +1608,6 @@ volatile U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, boo
|
|||
if (map_range)
|
||||
{
|
||||
#ifdef GL_ARB_map_buffer_range
|
||||
LL_RECORD_BLOCK_TIME(FTM_VBO_MAP_BUFFER_RANGE);
|
||||
S32 offset = mOffsets[type] + sTypeSize[type]*index;
|
||||
S32 length = (sTypeSize[type]*count+0xF) & ~0xF;
|
||||
src = (U8*) glMapBufferRange(GL_ARRAY_BUFFER_ARB, offset, length,
|
||||
|
|
@ -1643,7 +1631,6 @@ volatile U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, boo
|
|||
}
|
||||
}
|
||||
|
||||
LL_RECORD_BLOCK_TIME(FTM_VBO_MAP_BUFFER);
|
||||
src = (U8*) glMapBufferRange(GL_ARRAY_BUFFER_ARB, 0, mSize,
|
||||
GL_MAP_WRITE_BIT |
|
||||
GL_MAP_FLUSH_EXPLICIT_BIT);
|
||||
|
|
@ -1729,11 +1716,9 @@ volatile U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, boo
|
|||
}
|
||||
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_VBO_MAP_INDEX_RANGE("IBO Map Range");
|
||||
static LLTrace::BlockTimerStatHandle FTM_VBO_MAP_INDEX("IBO Map");
|
||||
|
||||
volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
bindGLIndices(true);
|
||||
if (mFinal)
|
||||
{
|
||||
|
|
@ -1808,7 +1793,6 @@ volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range
|
|||
if (map_range)
|
||||
{
|
||||
#ifdef GL_ARB_map_buffer_range
|
||||
LL_RECORD_BLOCK_TIME(FTM_VBO_MAP_INDEX_RANGE);
|
||||
S32 offset = sizeof(U16)*index;
|
||||
S32 length = sizeof(U16)*count;
|
||||
src = (U8*) glMapBufferRange(GL_ELEMENT_ARRAY_BUFFER_ARB, offset, length,
|
||||
|
|
@ -1820,7 +1804,6 @@ volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range
|
|||
else
|
||||
{
|
||||
#ifdef GL_ARB_map_buffer_range
|
||||
LL_RECORD_BLOCK_TIME(FTM_VBO_MAP_INDEX);
|
||||
src = (U8*) glMapBufferRange(GL_ELEMENT_ARRAY_BUFFER_ARB, 0, sizeof(U16)*mNumIndices,
|
||||
GL_MAP_WRITE_BIT |
|
||||
GL_MAP_FLUSH_EXPLICIT_BIT);
|
||||
|
|
@ -1844,7 +1827,6 @@ volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range
|
|||
}
|
||||
else
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_VBO_MAP_INDEX);
|
||||
map_range = false;
|
||||
src = (U8*) glMapBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB);
|
||||
}
|
||||
|
|
@ -1895,13 +1877,6 @@ volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range
|
|||
}
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_VBO_UNMAP("VBO Unmap");
|
||||
static LLTrace::BlockTimerStatHandle FTM_VBO_FLUSH_RANGE("Flush VBO Range");
|
||||
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_IBO_UNMAP("IBO Unmap");
|
||||
static LLTrace::BlockTimerStatHandle FTM_IBO_FLUSH_RANGE("Flush IBO Range");
|
||||
|
||||
void LLVertexBuffer::unmapBuffer()
|
||||
{
|
||||
if (!useVBOs())
|
||||
|
|
@ -1910,10 +1885,10 @@ void LLVertexBuffer::unmapBuffer()
|
|||
}
|
||||
|
||||
bool updated_all = false;
|
||||
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
if (mMappedData && mVertexLocked)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_VBO_UNMAP);
|
||||
LL_PROFILE_ZONE_NAMED("unmapBuffer - vertex");
|
||||
bindGLBuffer(true);
|
||||
updated_all = mIndexLocked; //both vertex and index buffers done updating
|
||||
|
||||
|
|
@ -1960,7 +1935,7 @@ void LLVertexBuffer::unmapBuffer()
|
|||
{
|
||||
if (!mMappedVertexRegions.empty())
|
||||
{
|
||||
stop_glerror();
|
||||
LL_PROFILE_ZONE_NAMED("unmapBuffer - flush vertex");
|
||||
for (U32 i = 0; i < mMappedVertexRegions.size(); ++i)
|
||||
{
|
||||
const MappedRegion& region = mMappedVertexRegions[i];
|
||||
|
|
@ -1968,18 +1943,16 @@ void LLVertexBuffer::unmapBuffer()
|
|||
S32 length = sTypeSize[region.mType]*region.mCount;
|
||||
if (gGLManager.mHasMapBufferRange)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_VBO_FLUSH_RANGE);
|
||||
#ifdef GL_ARB_map_buffer_range
|
||||
glFlushMappedBufferRange(GL_ARRAY_BUFFER_ARB, offset, length);
|
||||
#endif
|
||||
}
|
||||
else if (gGLManager.mHasFlushBufferRange)
|
||||
{
|
||||
{
|
||||
#ifndef LL_MESA_HEADLESS
|
||||
glFlushMappedBufferRangeAPPLE(GL_ARRAY_BUFFER_ARB, offset, length);
|
||||
#endif
|
||||
}
|
||||
stop_glerror();
|
||||
}
|
||||
|
||||
mMappedVertexRegions.clear();
|
||||
|
|
@ -1998,7 +1971,7 @@ void LLVertexBuffer::unmapBuffer()
|
|||
|
||||
if (mMappedIndexData && mIndexLocked)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_IBO_UNMAP);
|
||||
LL_PROFILE_ZONE_NAMED("unmapBuffer - index");
|
||||
bindGLIndices();
|
||||
if(!mMappable)
|
||||
{
|
||||
|
|
@ -2044,12 +2017,12 @@ void LLVertexBuffer::unmapBuffer()
|
|||
{
|
||||
for (U32 i = 0; i < mMappedIndexRegions.size(); ++i)
|
||||
{
|
||||
LL_PROFILE_ZONE_NAMED("unmapBuffer - flush index");
|
||||
const MappedRegion& region = mMappedIndexRegions[i];
|
||||
S32 offset = region.mIndex >= 0 ? sizeof(U16)*region.mIndex : 0;
|
||||
S32 length = sizeof(U16)*region.mCount;
|
||||
if (gGLManager.mHasMapBufferRange)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_IBO_FLUSH_RANGE);
|
||||
#ifdef GL_ARB_map_buffer_range
|
||||
glFlushMappedBufferRange(GL_ELEMENT_ARRAY_BUFFER_ARB, offset, length);
|
||||
#endif
|
||||
|
|
@ -2068,9 +2041,8 @@ void LLVertexBuffer::unmapBuffer()
|
|||
mMappedIndexRegions.clear();
|
||||
}
|
||||
}
|
||||
stop_glerror();
|
||||
glUnmapBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB);
|
||||
stop_glerror();
|
||||
|
||||
glUnmapBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB);
|
||||
|
||||
mMappedIndexData = NULL;
|
||||
}
|
||||
|
|
@ -2193,13 +2165,12 @@ bool LLVertexBuffer::getClothWeightStrider(LLStrider<LLVector4>& strider, S32 in
|
|||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_BIND_GL_ARRAY("Bind Array");
|
||||
bool LLVertexBuffer::bindGLArray()
|
||||
{
|
||||
if (mGLArray && sGLRenderArray != mGLArray)
|
||||
{
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_BIND_GL_ARRAY);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
#if GL_ARB_vertex_array_object
|
||||
glBindVertexArray(mGLArray);
|
||||
#endif
|
||||
|
|
@ -2216,8 +2187,6 @@ bool LLVertexBuffer::bindGLArray()
|
|||
return false;
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_BIND_GL_BUFFER("Bind Buffer");
|
||||
|
||||
bool LLVertexBuffer::bindGLBuffer(bool force_bind)
|
||||
{
|
||||
bindGLArray();
|
||||
|
|
@ -2226,8 +2195,7 @@ bool LLVertexBuffer::bindGLBuffer(bool force_bind)
|
|||
|
||||
if (useVBOs() && (force_bind || (mGLBuffer && (mGLBuffer != sGLRenderBuffer || !sVBOActive))))
|
||||
{
|
||||
//LL_RECORD_BLOCK_TIME(FTM_BIND_GL_BUFFER);
|
||||
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
glBindBufferARB(GL_ARRAY_BUFFER_ARB, mGLBuffer);
|
||||
sGLRenderBuffer = mGLBuffer;
|
||||
sBindCount++;
|
||||
|
|
@ -2256,16 +2224,14 @@ bool LLVertexBuffer::bindGLBufferFast()
|
|||
return false;
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_BIND_GL_INDICES("Bind Indices");
|
||||
|
||||
bool LLVertexBuffer::bindGLIndices(bool force_bind)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
bindGLArray();
|
||||
|
||||
bool ret = false;
|
||||
if (useVBOs() && (force_bind || (mGLIndices && (mGLIndices != sGLRenderIndices || !sIBOActive))))
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_BIND_GL_INDICES);
|
||||
/*if (sMapped)
|
||||
{
|
||||
LL_ERRS() << "VBO bound while another VBO mapped!" << LL_ENDL;
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ public:
|
|||
//============================================================================
|
||||
// base class
|
||||
class LLPrivateMemoryPool;
|
||||
class LLVertexBuffer : public LLRefCount, public LLTrace::MemTrackable<LLVertexBuffer>
|
||||
class LLVertexBuffer : public LLRefCount
|
||||
{
|
||||
public:
|
||||
class MappedRegion
|
||||
|
|
@ -113,8 +113,7 @@ public:
|
|||
};
|
||||
|
||||
LLVertexBuffer(const LLVertexBuffer& rhs)
|
||||
: LLTrace::MemTrackable<LLVertexBuffer>("LLVertexBuffer"),
|
||||
mUsage(rhs.mUsage)
|
||||
: mUsage(rhs.mUsage)
|
||||
{
|
||||
*this = rhs;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3268,11 +3268,9 @@ boost::signals2::connection LLFloater::setCloseCallback( const commit_signal_t::
|
|||
return mCloseSignal.connect(cb);
|
||||
}
|
||||
|
||||
LLTrace::BlockTimerStatHandle POST_BUILD("Floater Post Build");
|
||||
static LLTrace::BlockTimerStatHandle FTM_EXTERNAL_FLOATER_LOAD("Load Extern Floater Reference");
|
||||
|
||||
bool LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, const std::string& filename, LLXMLNodePtr output_node)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
Params default_params(LLUICtrlFactory::getDefaultParams<LLFloater>());
|
||||
Params params(default_params);
|
||||
|
||||
|
|
@ -3299,7 +3297,6 @@ bool LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, const std::str
|
|||
|
||||
LLUICtrlFactory::instance().pushFileName(xml_filename);
|
||||
|
||||
LL_RECORD_BLOCK_TIME(FTM_EXTERNAL_FLOATER_LOAD);
|
||||
if (!LLUICtrlFactory::getLayeredXMLNode(xml_filename, referenced_xml))
|
||||
{
|
||||
LL_WARNS() << "Couldn't parse panel from: " << xml_filename << LL_ENDL;
|
||||
|
|
@ -3375,12 +3372,8 @@ bool LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, const std::str
|
|||
}
|
||||
|
||||
BOOL result;
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(POST_BUILD);
|
||||
|
||||
result = postBuild();
|
||||
}
|
||||
|
||||
result = postBuild();
|
||||
|
||||
if (!result)
|
||||
{
|
||||
LL_ERRS() << "Failed to construct floater " << getName() << LL_ENDL;
|
||||
|
|
@ -3424,11 +3417,9 @@ bool LLFloater::isVisible(const LLFloater* floater)
|
|||
return floater && floater->getVisible();
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_BUILD_FLOATERS("Build Floaters");
|
||||
|
||||
bool LLFloater::buildFromFile(const std::string& filename)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_BUILD_FLOATERS);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
LLXMLNodePtr root;
|
||||
|
||||
if (!LLUICtrlFactory::getLayeredXMLNode(filename, root))
|
||||
|
|
|
|||
|
|
@ -189,7 +189,6 @@ LLFolderView::LLFolderView(const Params& p)
|
|||
mViewModel(p.view_model),
|
||||
mGroupedItemModel(p.grouped_item_model)
|
||||
{
|
||||
claimMem(mViewModel);
|
||||
LLPanel* panel = p.parent_panel;
|
||||
mParentPanel = panel->getHandle();
|
||||
mViewModel->setFolderView(this);
|
||||
|
|
@ -337,11 +336,9 @@ S32 LLFolderView::arrange( S32* unused_width, S32* unused_height )
|
|||
return ll_round(mTargetHeight);
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_FILTER("Filter Folder View");
|
||||
|
||||
void LLFolderView::filter( LLFolderViewFilter& filter )
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_FILTER);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
static LLCachedControl<S32> time_visible(*LLUI::getInstance()->mSettingGroups["config"], "FilterItemsMaxTimePerFrameVisible", 10);
|
||||
static LLCachedControl<S32> time_invisible(*LLUI::getInstance()->mSettingGroups["config"], "FilterItemsMaxTimePerFrameUnvisible", 1);
|
||||
filter.resetTime(llclamp((mParentPanel.get()->getVisible() ? time_visible() : time_invisible()), 1, 100));
|
||||
|
|
@ -503,10 +500,9 @@ BOOL LLFolderView::changeSelection(LLFolderViewItem* selection, BOOL selected)
|
|||
return rv;
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_SANITIZE_SELECTION("Sanitize Selection");
|
||||
void LLFolderView::sanitizeSelection()
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_SANITIZE_SELECTION);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
// store off current item in case it is automatically deselected
|
||||
// and we want to preserve context
|
||||
LLFolderViewItem* original_selected_item = getCurSelectedItem();
|
||||
|
|
@ -1621,7 +1617,6 @@ void LLFolderView::setShowSingleSelection(bool show)
|
|||
}
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_AUTO_SELECT("Open and Select");
|
||||
static LLTrace::BlockTimerStatHandle FTM_INVENTORY("Inventory");
|
||||
|
||||
// Main idle routine
|
||||
|
|
@ -1657,7 +1652,6 @@ void LLFolderView::update()
|
|||
// automatically show matching items, and select first one if we had a selection
|
||||
if (mNeedsAutoSelect)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_AUTO_SELECT);
|
||||
// select new item only if a filtered item not currently selected and there was a selection
|
||||
LLFolderViewItem* selected_itemp = mSelectedItems.empty() ? NULL : mSelectedItems.back();
|
||||
if (!mAutoSelectOverride && selected_itemp && !selected_itemp->getViewModelItem()->potentiallyVisible())
|
||||
|
|
|
|||
|
|
@ -108,11 +108,10 @@ public:
|
|||
virtual S32 getFirstRequiredGeneration() const = 0;
|
||||
};
|
||||
|
||||
class LLFolderViewModelInterface : public LLTrace::MemTrackable<LLFolderViewModelInterface>
|
||||
class LLFolderViewModelInterface
|
||||
{
|
||||
public:
|
||||
LLFolderViewModelInterface()
|
||||
: LLTrace::MemTrackable<LLFolderViewModelInterface>("LLFolderViewModelInterface")
|
||||
{}
|
||||
|
||||
virtual ~LLFolderViewModelInterface() {}
|
||||
|
|
@ -133,11 +132,10 @@ public:
|
|||
|
||||
// This is an abstract base class that users of the folderview classes
|
||||
// would use to bridge the folder view with the underlying data
|
||||
class LLFolderViewModelItem : public LLRefCount, public LLTrace::MemTrackable<LLFolderViewModelItem>
|
||||
class LLFolderViewModelItem : public LLRefCount
|
||||
{
|
||||
public:
|
||||
LLFolderViewModelItem()
|
||||
: LLTrace::MemTrackable<LLFolderViewModelItem>("LLFolderViewModelItem")
|
||||
{}
|
||||
|
||||
virtual ~LLFolderViewModelItem() { }
|
||||
|
|
|
|||
|
|
@ -340,8 +340,6 @@ void LLLayoutStack::collapsePanel(LLPanel* panel, BOOL collapsed)
|
|||
mNeedsLayout = true;
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_UPDATE_LAYOUT("Update LayoutStacks");
|
||||
|
||||
class LLImagePanel : public LLPanel
|
||||
{
|
||||
public:
|
||||
|
|
@ -369,7 +367,7 @@ private:
|
|||
|
||||
void LLLayoutStack::updateLayout()
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_UPDATE_LAYOUT);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
|
||||
if (!mNeedsLayout) return;
|
||||
|
||||
|
|
|
|||
|
|
@ -800,14 +800,12 @@ boost::signals2::connection LLPanel::setVisibleCallback( const commit_signal_t::
|
|||
return mVisibleSignal->connect(cb);
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_BUILD_PANELS("Build Panels");
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// buildPanel()
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL LLPanel::buildFromFile(const std::string& filename, const LLPanel::Params& default_params)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_BUILD_PANELS);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
BOOL didPost = FALSE;
|
||||
LLXMLNodePtr root;
|
||||
|
||||
|
|
|
|||
|
|
@ -3045,10 +3045,9 @@ LLScrollListColumn* LLScrollListCtrl::getColumn(const std::string& name)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
LLTrace::BlockTimerStatHandle FTM_ADD_SCROLLLIST_ELEMENT("Add Scroll List Item");
|
||||
LLScrollListItem* LLScrollListCtrl::addElement(const LLSD& element, EAddPosition pos, void* userdata)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_ADD_SCROLLLIST_ELEMENT);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
LLScrollListItem::Params item_params;
|
||||
LLParamSDParser parser;
|
||||
parser.readSD(element, item_params);
|
||||
|
|
@ -3058,14 +3057,14 @@ LLScrollListItem* LLScrollListCtrl::addElement(const LLSD& element, EAddPosition
|
|||
|
||||
LLScrollListItem* LLScrollListCtrl::addRow(const LLScrollListItem::Params& item_p, EAddPosition pos)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_ADD_SCROLLLIST_ELEMENT);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
LLScrollListItem *new_item = new LLScrollListItem(item_p);
|
||||
return addRow(new_item, item_p, pos);
|
||||
}
|
||||
|
||||
LLScrollListItem* LLScrollListCtrl::addRow(LLScrollListItem *new_item, const LLScrollListItem::Params& item_p, EAddPosition pos)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_ADD_SCROLLLIST_ELEMENT);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
if (!item_p.validateBlock() || !new_item) return NULL;
|
||||
new_item->setNumColumns(mColumns.size());
|
||||
|
||||
|
|
|
|||
|
|
@ -1484,11 +1484,9 @@ S32 LLTextBase::getLeftOffset(S32 width)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_TEXT_REFLOW ("Text Reflow");
|
||||
void LLTextBase::reflow()
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_TEXT_REFLOW);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
|
||||
updateSegments();
|
||||
|
||||
|
|
@ -1833,10 +1831,9 @@ void LLTextBase::removeDocumentChild(LLView* view)
|
|||
}
|
||||
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_UPDATE_TEXT_SEGMENTS("Update Text Segments");
|
||||
void LLTextBase::updateSegments()
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_UPDATE_TEXT_SEGMENTS);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
createDefaultSegment();
|
||||
}
|
||||
|
||||
|
|
@ -2096,19 +2093,16 @@ static LLUIImagePtr image_from_icon_name(const std::string& icon_name)
|
|||
}
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_PARSE_HTML("Parse HTML");
|
||||
|
||||
|
||||
|
||||
void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Params& input_params)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
LLStyle::Params style_params(input_params);
|
||||
style_params.fillFrom(getStyleParams());
|
||||
|
||||
S32 part = (S32)LLTextParser::WHOLE;
|
||||
if (mParseHTML && !style_params.is_link) // Don't search for URLs inside a link segment (STORM-358).
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_PARSE_HTML);
|
||||
S32 start=0,end=0;
|
||||
LLUrlMatch match;
|
||||
std::string text = new_text;
|
||||
|
|
@ -2202,11 +2196,9 @@ void LLTextBase::setLastSegmentToolTip(const std::string &tooltip)
|
|||
}
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_APPEND_TEXT("Append Text");
|
||||
|
||||
void LLTextBase::appendText(const std::string &new_text, bool prepend_newline, const LLStyle::Params& input_params)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_APPEND_TEXT);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
if (new_text.empty())
|
||||
return;
|
||||
|
||||
|
|
|
|||
|
|
@ -121,7 +121,6 @@ LLUICtrl::LLUICtrl(const LLUICtrl::Params& p, const LLViewModelPtr& viewmodel)
|
|||
mDoubleClickSignal(NULL),
|
||||
mTransparencyType(TT_DEFAULT)
|
||||
{
|
||||
claimMem(viewmodel.get());
|
||||
}
|
||||
|
||||
void LLUICtrl::initFromParams(const Params& p)
|
||||
|
|
@ -476,6 +475,7 @@ LLViewModel* LLUICtrl::getViewModel() const
|
|||
//virtual
|
||||
BOOL LLUICtrl::postBuild()
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
//
|
||||
// Find all of the children that want to be in front and move them to the front
|
||||
//
|
||||
|
|
@ -781,12 +781,9 @@ BOOL LLUICtrl::getIsChrome() const
|
|||
}
|
||||
|
||||
|
||||
|
||||
LLTrace::BlockTimerStatHandle FTM_FOCUS_FIRST_ITEM("Focus First Item");
|
||||
|
||||
BOOL LLUICtrl::focusFirstItem(BOOL prefer_text_fields, BOOL focus_flash)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_FOCUS_FIRST_ITEM);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
// try to select default tab group child
|
||||
LLViewQuery query = getTabOrderQuery();
|
||||
child_list_t result = query(this);
|
||||
|
|
@ -1005,7 +1002,6 @@ boost::signals2::connection LLUICtrl::setCommitCallback( boost::function<void (L
|
|||
boost::signals2::connection LLUICtrl::setValidateBeforeCommit( boost::function<bool (const LLSD& data)> cb )
|
||||
{
|
||||
if (!mValidateSignal) mValidateSignal = new enable_signal_t();
|
||||
claimMem(mValidateSignal);
|
||||
|
||||
return mValidateSignal->connect(boost::bind(cb, _2));
|
||||
}
|
||||
|
|
@ -1070,7 +1066,6 @@ boost::signals2::connection LLUICtrl::setValidateCallback(const EnableCallbackPa
|
|||
boost::signals2::connection LLUICtrl::setCommitCallback( const commit_signal_t::slot_type& cb )
|
||||
{
|
||||
if (!mCommitSignal) mCommitSignal = new commit_signal_t();
|
||||
claimMem(mCommitSignal);
|
||||
|
||||
return mCommitSignal->connect(cb);
|
||||
}
|
||||
|
|
@ -1078,7 +1073,6 @@ boost::signals2::connection LLUICtrl::setCommitCallback( const commit_signal_t::
|
|||
boost::signals2::connection LLUICtrl::setValidateCallback( const enable_signal_t::slot_type& cb )
|
||||
{
|
||||
if (!mValidateSignal) mValidateSignal = new enable_signal_t();
|
||||
claimMem(mValidateSignal);
|
||||
|
||||
return mValidateSignal->connect(cb);
|
||||
}
|
||||
|
|
@ -1086,7 +1080,6 @@ boost::signals2::connection LLUICtrl::setValidateCallback( const enable_signal_t
|
|||
boost::signals2::connection LLUICtrl::setMouseEnterCallback( const commit_signal_t::slot_type& cb )
|
||||
{
|
||||
if (!mMouseEnterSignal) mMouseEnterSignal = new commit_signal_t();
|
||||
claimMem(mMouseEnterSignal);
|
||||
|
||||
return mMouseEnterSignal->connect(cb);
|
||||
}
|
||||
|
|
@ -1094,7 +1087,6 @@ boost::signals2::connection LLUICtrl::setMouseEnterCallback( const commit_signal
|
|||
boost::signals2::connection LLUICtrl::setMouseLeaveCallback( const commit_signal_t::slot_type& cb )
|
||||
{
|
||||
if (!mMouseLeaveSignal) mMouseLeaveSignal = new commit_signal_t();
|
||||
claimMem(mMouseLeaveSignal);
|
||||
|
||||
return mMouseLeaveSignal->connect(cb);
|
||||
}
|
||||
|
|
@ -1102,7 +1094,6 @@ boost::signals2::connection LLUICtrl::setMouseLeaveCallback( const commit_signal
|
|||
boost::signals2::connection LLUICtrl::setMouseDownCallback( const mouse_signal_t::slot_type& cb )
|
||||
{
|
||||
if (!mMouseDownSignal) mMouseDownSignal = new mouse_signal_t();
|
||||
claimMem(mMouseDownSignal);
|
||||
|
||||
return mMouseDownSignal->connect(cb);
|
||||
}
|
||||
|
|
@ -1110,7 +1101,6 @@ boost::signals2::connection LLUICtrl::setMouseDownCallback( const mouse_signal_t
|
|||
boost::signals2::connection LLUICtrl::setMouseUpCallback( const mouse_signal_t::slot_type& cb )
|
||||
{
|
||||
if (!mMouseUpSignal) mMouseUpSignal = new mouse_signal_t();
|
||||
claimMem(mMouseUpSignal);
|
||||
|
||||
return mMouseUpSignal->connect(cb);
|
||||
}
|
||||
|
|
@ -1118,7 +1108,6 @@ boost::signals2::connection LLUICtrl::setMouseUpCallback( const mouse_signal_t::
|
|||
boost::signals2::connection LLUICtrl::setRightMouseDownCallback( const mouse_signal_t::slot_type& cb )
|
||||
{
|
||||
if (!mRightMouseDownSignal) mRightMouseDownSignal = new mouse_signal_t();
|
||||
claimMem(mRightMouseDownSignal);
|
||||
|
||||
return mRightMouseDownSignal->connect(cb);
|
||||
}
|
||||
|
|
@ -1126,7 +1115,6 @@ boost::signals2::connection LLUICtrl::setRightMouseDownCallback( const mouse_sig
|
|||
boost::signals2::connection LLUICtrl::setRightMouseUpCallback( const mouse_signal_t::slot_type& cb )
|
||||
{
|
||||
if (!mRightMouseUpSignal) mRightMouseUpSignal = new mouse_signal_t();
|
||||
claimMem(mRightMouseUpSignal);
|
||||
|
||||
return mRightMouseUpSignal->connect(cb);
|
||||
}
|
||||
|
|
@ -1134,7 +1122,6 @@ boost::signals2::connection LLUICtrl::setRightMouseUpCallback( const mouse_signa
|
|||
boost::signals2::connection LLUICtrl::setDoubleClickCallback( const mouse_signal_t::slot_type& cb )
|
||||
{
|
||||
if (!mDoubleClickSignal) mDoubleClickSignal = new mouse_signal_t();
|
||||
claimMem(mDoubleClickSignal);
|
||||
|
||||
return mDoubleClickSignal->connect(cb);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,10 +44,6 @@
|
|||
// this library includes
|
||||
#include "llpanel.h"
|
||||
|
||||
LLTrace::BlockTimerStatHandle FTM_WIDGET_CONSTRUCTION("Widget Construction");
|
||||
LLTrace::BlockTimerStatHandle FTM_INIT_FROM_PARAMS("Widget InitFromParams");
|
||||
LLTrace::BlockTimerStatHandle FTM_WIDGET_SETUP("Widget Setup");
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// UI Ctrl class for padding
|
||||
|
|
@ -117,12 +113,10 @@ void LLUICtrlFactory::loadWidgetTemplate(const std::string& widget_tag, LLInitPa
|
|||
}
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_CREATE_CHILDREN("Create XUI Children");
|
||||
|
||||
//static
|
||||
void LLUICtrlFactory::createChildren(LLView* viewp, LLXMLNodePtr node, const widget_registry_t& registry, LLXMLNodePtr output_node)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_CREATE_CHILDREN);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
if (node.isNull()) return;
|
||||
|
||||
for (LLXMLNodePtr child_node = node->getFirstChild(); child_node.notNull(); child_node = child_node->getNextSibling())
|
||||
|
|
@ -159,14 +153,13 @@ void LLUICtrlFactory::createChildren(LLView* viewp, LLXMLNodePtr node, const wid
|
|||
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_XML_PARSE("XML Reading/Parsing");
|
||||
//-----------------------------------------------------------------------------
|
||||
// getLayeredXMLNode()
|
||||
//-----------------------------------------------------------------------------
|
||||
bool LLUICtrlFactory::getLayeredXMLNode(const std::string &xui_filename, LLXMLNodePtr& root,
|
||||
LLDir::ESkinConstraint constraint)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_XML_PARSE);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
std::vector<std::string> paths =
|
||||
gDirUtilp->findSkinnedFilenames(LLDir::XUI, xui_filename, constraint);
|
||||
|
||||
|
|
@ -191,11 +184,9 @@ S32 LLUICtrlFactory::saveToXML(LLView* viewp, const std::string& filename)
|
|||
//-----------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_CREATE_FROM_XML("Create child widget");
|
||||
|
||||
LLView *LLUICtrlFactory::createFromXML(LLXMLNodePtr node, LLView* parent, const std::string& filename, const widget_registry_t& registry, LLXMLNodePtr output_node)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_CREATE_FROM_XML);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
std::string ctrl_type = node->getName()->mString;
|
||||
LLStringUtil::toLower(ctrl_type);
|
||||
|
||||
|
|
|
|||
|
|
@ -79,10 +79,6 @@ class LLWidgetNameRegistry
|
|||
// LLSINGLETON(LLDefaultParamBlockRegistry);
|
||||
//};
|
||||
|
||||
extern LLTrace::BlockTimerStatHandle FTM_WIDGET_SETUP;
|
||||
extern LLTrace::BlockTimerStatHandle FTM_WIDGET_CONSTRUCTION;
|
||||
extern LLTrace::BlockTimerStatHandle FTM_INIT_FROM_PARAMS;
|
||||
|
||||
// Build time optimization, generate this once in .cpp file
|
||||
#ifndef LLUICTRLFACTORY_CPP
|
||||
extern template class LLUICtrlFactory* LLSingleton<class LLUICtrlFactory>::getInstance();
|
||||
|
|
@ -213,6 +209,7 @@ private:
|
|||
template<typename T>
|
||||
static T* createWidgetImpl(const typename T::Params& params, LLView* parent = NULL)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
T* widget = NULL;
|
||||
|
||||
if (!params.validateBlock())
|
||||
|
|
@ -221,12 +218,9 @@ private:
|
|||
//return NULL;
|
||||
}
|
||||
|
||||
{ LL_RECORD_BLOCK_TIME(FTM_WIDGET_CONSTRUCTION);
|
||||
widget = new T(params);
|
||||
}
|
||||
{ LL_RECORD_BLOCK_TIME(FTM_INIT_FROM_PARAMS);
|
||||
widget->initFromParams(params);
|
||||
}
|
||||
widget = new T(params);
|
||||
|
||||
widget->initFromParams(params);
|
||||
|
||||
if (parent)
|
||||
{
|
||||
|
|
@ -239,7 +233,7 @@ private:
|
|||
template<typename T>
|
||||
static T* defaultBuilder(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr output_node)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_WIDGET_SETUP);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
|
||||
typename T::Params params(getDefaultParams<T>());
|
||||
|
||||
|
|
|
|||
|
|
@ -140,8 +140,7 @@ LLView::Params::Params()
|
|||
}
|
||||
|
||||
LLView::LLView(const LLView::Params& p)
|
||||
: LLTrace::MemTrackable<LLView>("LLView"),
|
||||
mVisible(p.visible),
|
||||
: mVisible(p.visible),
|
||||
mInDraw(false),
|
||||
mName(p.name),
|
||||
mParentView(NULL),
|
||||
|
|
@ -1597,15 +1596,11 @@ LLView* LLView::getChildView(const std::string& name, BOOL recurse) const
|
|||
return getChild<LLView>(name, recurse);
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_FIND_VIEWS("Find Widgets");
|
||||
|
||||
LLView* LLView::findChildView(const std::string& name, BOOL recurse) const
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_FIND_VIEWS);
|
||||
//richard: should we allow empty names?
|
||||
//if(name.empty())
|
||||
// return NULL;
|
||||
// Look for direct children *first*
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
|
||||
// Look for direct children *first*
|
||||
BOOST_FOREACH(LLView* childp, mChildList)
|
||||
{
|
||||
llassert(childp);
|
||||
|
|
|
|||
|
|
@ -100,8 +100,7 @@ class LLView
|
|||
: public LLMouseHandler, // handles mouse events
|
||||
public LLFocusableElement, // handles keyboard events
|
||||
public LLMortician, // lazy deletion
|
||||
public LLHandleProvider<LLView>, // passes out weak references to self
|
||||
public LLTrace::MemTrackable<LLView> // track memory usage
|
||||
public LLHandleProvider<LLView> // passes out weak references to self
|
||||
{
|
||||
public:
|
||||
|
||||
|
|
|
|||
|
|
@ -28,6 +28,8 @@
|
|||
#include "llui.h"
|
||||
#include "llleap.h"
|
||||
|
||||
LLViewerEventRecorder* LLSimpleton<LLViewerEventRecorder>::sInstance = nullptr;
|
||||
|
||||
LLViewerEventRecorder::LLViewerEventRecorder() {
|
||||
|
||||
clear(UNDEFINED);
|
||||
|
|
|
|||
|
|
@ -42,12 +42,12 @@
|
|||
|
||||
#include "llsingleton.h" // includes llerror which we need here so we can skip the include here
|
||||
|
||||
class LLViewerEventRecorder : public LLSingleton<LLViewerEventRecorder>
|
||||
class LLViewerEventRecorder : public LLSimpleton<LLViewerEventRecorder>
|
||||
{
|
||||
LLSINGLETON(LLViewerEventRecorder);
|
||||
~LLViewerEventRecorder();
|
||||
|
||||
public:
|
||||
public:
|
||||
LLViewerEventRecorder();
|
||||
~LLViewerEventRecorder();
|
||||
|
||||
void updateMouseEventInfo(S32 local_x,S32 local_y, S32 global_x, S32 global_y, std::string mName);
|
||||
void setMouseLocalCoords(S32 x,S32 y);
|
||||
void setMouseGlobalCoords(S32 x,S32 y);
|
||||
|
|
|
|||
|
|
@ -37,15 +37,13 @@
|
|||
|
||||
///
|
||||
LLViewModel::LLViewModel()
|
||||
: LLTrace::MemTrackable<LLViewModel>("LLViewModel"),
|
||||
mDirty(false)
|
||||
: mDirty(false)
|
||||
{
|
||||
}
|
||||
|
||||
/// Instantiate an LLViewModel with an existing data value
|
||||
LLViewModel::LLViewModel(const LLSD& value)
|
||||
: LLTrace::MemTrackable<LLViewModel>("LLViewModel"),
|
||||
mDirty(false)
|
||||
: mDirty(false)
|
||||
{
|
||||
setValue(value);
|
||||
}
|
||||
|
|
@ -82,15 +80,9 @@ LLTextViewModel::LLTextViewModel(const LLSD& value)
|
|||
void LLTextViewModel::setValue(const LLSD& value)
|
||||
{
|
||||
// approximate LLSD storage usage
|
||||
disclaimMem(mDisplay.size());
|
||||
LLViewModel::setValue(value);
|
||||
disclaimMem(mDisplay);
|
||||
mDisplay = utf8str_to_wstring(value.asString());
|
||||
|
||||
claimMem(mDisplay);
|
||||
// approximate LLSD storage usage
|
||||
claimMem(mDisplay.size());
|
||||
|
||||
// mDisplay and mValue agree
|
||||
mUpdateFromDisplay = false;
|
||||
}
|
||||
|
|
@ -101,12 +93,8 @@ void LLTextViewModel::setDisplay(const LLWString& value)
|
|||
// and do the utf8str_to_wstring() to get the corresponding mDisplay
|
||||
// value. But a text editor might want to edit the display string
|
||||
// directly, then convert back to UTF8 on commit.
|
||||
disclaimMem(mDisplay.size());
|
||||
disclaimMem(mDisplay);
|
||||
mDisplay = value;
|
||||
claimMem(mDisplay);
|
||||
claimMem(mDisplay.size());
|
||||
mDirty = true;
|
||||
mDisplay = value;
|
||||
mDirty = true;
|
||||
// Don't immediately convert to UTF8 -- do it lazily -- we expect many
|
||||
// more setDisplay() calls than getValue() calls. Just flag that it needs
|
||||
// doing.
|
||||
|
|
|
|||
|
|
@ -62,8 +62,7 @@ typedef LLPointer<LLListViewModel> LLListViewModelPtr;
|
|||
* last referencing widget is destroyed.
|
||||
*/
|
||||
class LLViewModel
|
||||
: public LLRefCount,
|
||||
public LLTrace::MemTrackable<LLViewModel>
|
||||
: public LLRefCount
|
||||
{
|
||||
public:
|
||||
LLViewModel();
|
||||
|
|
|
|||
|
|
@ -14104,18 +14104,7 @@
|
|||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>RenderSynchronousOcclusion</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Don't let occlusion queries get more than one frame behind (block until they complete).</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>RenderDelayVBUpdate</key>
|
||||
<key>RenderDelayVBUpdate</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Delay vertex buffer updates until just before rendering</string>
|
||||
|
|
|
|||
|
|
@ -977,6 +977,9 @@ bool LLAppViewer::init()
|
|||
// Initialize the repeater service.
|
||||
LLMainLoopRepeater::instance().start();
|
||||
|
||||
// Initialize event recorder
|
||||
LLViewerEventRecorder::createInstance();
|
||||
|
||||
//
|
||||
// Initialize the window
|
||||
//
|
||||
|
|
@ -1316,6 +1319,13 @@ bool LLAppViewer::init()
|
|||
// Load User's bindings
|
||||
loadKeyBindings();
|
||||
|
||||
//LLSimpleton creations
|
||||
LLEnvironment::createInstance();
|
||||
LLEnvironment::getInstance()->initSingleton();
|
||||
LLWorld::createInstance();
|
||||
LLSelectMgr::createInstance();
|
||||
LLViewerCamera::createInstance();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -1410,10 +1420,14 @@ bool LLAppViewer::doFrame()
|
|||
LLSD newFrame;
|
||||
|
||||
{
|
||||
LL_PROFILE_ZONE_NAMED( "df blocktimer" )
|
||||
LLTrace::BlockTimer::processTimes();
|
||||
LLTrace::get_frame_recording().nextPeriod();
|
||||
LLTrace::BlockTimer::logStats();
|
||||
LL_PROFILE_ZONE_NAMED("df LLTrace");
|
||||
if (LLFloaterReg::instanceVisible("block_timers"))
|
||||
{
|
||||
LLTrace::BlockTimer::processTimes();
|
||||
}
|
||||
|
||||
LLTrace::get_frame_recording().nextPeriod();
|
||||
LLTrace::BlockTimer::logStats();
|
||||
}
|
||||
|
||||
LLTrace::get_thread_recorder()->pullFromChildren();
|
||||
|
|
@ -2184,6 +2198,10 @@ bool LLAppViewer::cleanup()
|
|||
|
||||
LLError::LLCallStacks::cleanup();
|
||||
|
||||
LLEnvironment::deleteSingleton();
|
||||
LLSelectMgr::deleteSingleton();
|
||||
LLViewerEventRecorder::deleteSingleton();
|
||||
|
||||
// It's not at first obvious where, in this long sequence, a generic cleanup
|
||||
// call OUGHT to go. So let's say this: as we migrate cleanup from
|
||||
// explicit hand-placed calls into the generic mechanism, eventually
|
||||
|
|
@ -2195,6 +2213,7 @@ bool LLAppViewer::cleanup()
|
|||
// deleteSingleton() methods.
|
||||
LLSingletonBase::deleteAll();
|
||||
|
||||
|
||||
LL_INFOS() << "Goodbye!" << LL_ENDL;
|
||||
|
||||
removeDumpDir();
|
||||
|
|
@ -5641,6 +5660,7 @@ void LLAppViewer::disconnectViewer()
|
|||
LLWorld::getInstance()->destroyClass();
|
||||
}
|
||||
LLVOCache::deleteSingleton();
|
||||
LLViewerCamera::deleteSingleton();
|
||||
|
||||
// call all self-registered classes
|
||||
LLDestroyClassList::instance().fireCallbacks();
|
||||
|
|
|
|||
|
|
@ -96,11 +96,9 @@ void LLDoNotDisturbNotificationStorage::resetDirty()
|
|||
mDirty = false;
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_SAVE_DND_NOTIFICATIONS("Save DND Notifications");
|
||||
|
||||
void LLDoNotDisturbNotificationStorage::saveNotifications()
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_SAVE_DND_NOTIFICATIONS);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
|
||||
LLNotificationChannelPtr channelPtr = getCommunicationChannel();
|
||||
const LLCommunicationChannel *commChannel = dynamic_cast<LLCommunicationChannel*>(channelPtr.get());
|
||||
|
|
|
|||
|
|
@ -58,8 +58,6 @@ const F32 MIN_INTERPOLATE_DISTANCE_SQUARED = 0.001f * 0.001f;
|
|||
const F32 MAX_INTERPOLATE_DISTANCE_SQUARED = 10.f * 10.f;
|
||||
const F32 OBJECT_DAMPING_TIME_CONSTANT = 0.06f;
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_CULL_REBOUND("Cull Rebound");
|
||||
|
||||
extern bool gShiftFrame;
|
||||
|
||||
|
||||
|
|
@ -93,7 +91,6 @@ void LLDrawable::incrementVisible()
|
|||
|
||||
LLDrawable::LLDrawable(LLViewerObject *vobj, bool new_entry)
|
||||
: LLViewerOctreeEntryData(LLViewerOctreeEntry::LLDRAWABLE),
|
||||
LLTrace::MemTrackable<LLDrawable, 16>("LLDrawable"),
|
||||
mVObjp(vobj)
|
||||
{
|
||||
init(new_entry);
|
||||
|
|
@ -263,19 +260,13 @@ BOOL LLDrawable::isLight() const
|
|||
}
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_CLEANUP_DRAWABLE("Cleanup Drawable");
|
||||
static LLTrace::BlockTimerStatHandle FTM_DEREF_DRAWABLE("Deref");
|
||||
static LLTrace::BlockTimerStatHandle FTM_DELETE_FACES("Faces");
|
||||
|
||||
void LLDrawable::cleanupReferences()
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_CLEANUP_DRAWABLE);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_DELETE_FACES);
|
||||
std::for_each(mFaces.begin(), mFaces.end(), DeletePointer());
|
||||
mFaces.clear();
|
||||
}
|
||||
|
||||
std::for_each(mFaces.begin(), mFaces.end(), DeletePointer());
|
||||
mFaces.clear();
|
||||
|
||||
gObjectList.removeDrawable(this);
|
||||
|
||||
|
|
@ -283,12 +274,9 @@ void LLDrawable::cleanupReferences()
|
|||
|
||||
removeFromOctree();
|
||||
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_DEREF_DRAWABLE);
|
||||
// Cleanup references to other objects
|
||||
mVObjp = NULL;
|
||||
mParent = NULL;
|
||||
}
|
||||
// Cleanup references to other objects
|
||||
mVObjp = NULL;
|
||||
mParent = NULL;
|
||||
}
|
||||
|
||||
void LLDrawable::removeFromOctree()
|
||||
|
|
@ -333,15 +321,12 @@ S32 LLDrawable::findReferences(LLDrawable *drawablep)
|
|||
return count;
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_ALLOCATE_FACE("Allocate Face");
|
||||
|
||||
LLFace* LLDrawable::addFace(LLFacePool *poolp, LLViewerTexture *texturep)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED
|
||||
|
||||
LLFace *face;
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_ALLOCATE_FACE);
|
||||
face = new LLFace(this, mVObjp);
|
||||
}
|
||||
|
||||
|
|
@ -370,11 +355,8 @@ LLFace* LLDrawable::addFace(const LLTextureEntry *te, LLViewerTexture *texturep)
|
|||
|
||||
LLFace *face;
|
||||
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_ALLOCATE_FACE);
|
||||
face = new LLFace(this, mVObjp);
|
||||
}
|
||||
|
||||
face = new LLFace(this, mVObjp);
|
||||
|
||||
face->setTEOffset(mFaces.size());
|
||||
face->setTexture(texturep);
|
||||
face->setPoolType(gPipeline.getPoolTypeFromTE(te, texturep));
|
||||
|
|
@ -1333,10 +1315,7 @@ void LLSpatialBridge::updateSpatialExtents()
|
|||
|
||||
LLSpatialGroup* root = (LLSpatialGroup*) mOctree->getListener(0);
|
||||
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_CULL_REBOUND);
|
||||
root->rebound();
|
||||
}
|
||||
root->rebound();
|
||||
|
||||
const LLVector4a* root_bounds = root->getBounds();
|
||||
LLVector4a offset;
|
||||
|
|
|
|||
|
|
@ -59,14 +59,13 @@ const U32 SILHOUETTE_HIGHLIGHT = 0;
|
|||
|
||||
// All data for new renderer goes into this class.
|
||||
LL_ALIGN_PREFIX(16)
|
||||
class LLDrawable
|
||||
: public LLViewerOctreeEntryData,
|
||||
public LLTrace::MemTrackable<LLDrawable, 16>
|
||||
class LLDrawable
|
||||
: public LLViewerOctreeEntryData
|
||||
{
|
||||
LL_ALIGN_NEW;
|
||||
public:
|
||||
LLDrawable(const LLDrawable& rhs)
|
||||
: LLTrace::MemTrackable<LLDrawable, 16>("LLDrawable"),
|
||||
LLViewerOctreeEntryData(rhs)
|
||||
: LLViewerOctreeEntryData(rhs)
|
||||
{
|
||||
*this = rhs;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,10 +53,6 @@ BOOL LLDrawPoolAlpha::sShowDebugAlpha = FALSE;
|
|||
|
||||
static BOOL deferred_render = FALSE;
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_RENDER_ALPHA_SETUP("Alpha Setup");
|
||||
static LLTrace::BlockTimerStatHandle FTM_RENDER_ALPHA_GROUP_LOOP("Alpha Group");
|
||||
static LLTrace::BlockTimerStatHandle FTM_RENDER_ALPHA_DEFERRED("Alpha Deferred");
|
||||
|
||||
LLDrawPoolAlpha::LLDrawPoolAlpha(U32 type) :
|
||||
LLRenderPass(type), current_shader(NULL), target_shader(NULL),
|
||||
simple_shader(NULL), fullbright_shader(NULL), emissive_shader(NULL),
|
||||
|
|
@ -98,7 +94,7 @@ S32 LLDrawPoolAlpha::getNumPostDeferredPasses()
|
|||
|
||||
void LLDrawPoolAlpha::beginPostDeferredPass(S32 pass)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA_DEFERRED);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
|
||||
F32 gamma = gSavedSettings.getF32("RenderDeferredDisplayGamma");
|
||||
|
||||
|
|
@ -153,7 +149,7 @@ void LLDrawPoolAlpha::beginPostDeferredPass(S32 pass)
|
|||
|
||||
void LLDrawPoolAlpha::endPostDeferredPass(S32 pass)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA_DEFERRED);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
|
||||
if (pass == 1 && !LLPipeline::sImpostorRender)
|
||||
{
|
||||
|
|
@ -168,13 +164,13 @@ void LLDrawPoolAlpha::endPostDeferredPass(S32 pass)
|
|||
|
||||
void LLDrawPoolAlpha::renderPostDeferred(S32 pass)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA_DEFERRED);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
render(pass);
|
||||
}
|
||||
|
||||
void LLDrawPoolAlpha::beginRenderPass(S32 pass)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA_SETUP);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
|
||||
simple_shader = (LLPipeline::sImpostorRender) ? &gObjectSimpleImpostorProgram :
|
||||
(LLPipeline::sUnderWaterRender) ? &gObjectSimpleWaterProgram : &gObjectSimpleProgram;
|
||||
|
|
@ -225,7 +221,7 @@ void LLDrawPoolAlpha::beginRenderPass(S32 pass)
|
|||
|
||||
void LLDrawPoolAlpha::endRenderPass( S32 pass )
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA_SETUP);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
LLRenderPass::endRenderPass(pass);
|
||||
|
||||
if(gPipeline.canUseWindLightShaders())
|
||||
|
|
@ -522,6 +518,7 @@ void LLDrawPoolAlpha::renderEmissives(U32 mask, std::vector<LLDrawInfo*>& emissi
|
|||
|
||||
void LLDrawPoolAlpha::renderAlpha(U32 mask, S32 pass)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
BOOL batch_fullbrights = gSavedSettings.getBOOL("RenderAlphaBatchFullbrights");
|
||||
BOOL batch_emissives = gSavedSettings.getBOOL("RenderAlphaBatchEmissives");
|
||||
BOOL initialized_lighting = FALSE;
|
||||
|
|
@ -529,6 +526,7 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, S32 pass)
|
|||
|
||||
for (LLCullResult::sg_iterator i = gPipeline.beginAlphaGroups(); i != gPipeline.endAlphaGroups(); ++i)
|
||||
{
|
||||
LL_PROFILE_ZONE_NAMED("renderAlpha - group");
|
||||
LLSpatialGroup* group = *i;
|
||||
llassert(group);
|
||||
llassert(group->getSpatialPartition());
|
||||
|
|
@ -546,9 +544,6 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, S32 pass)
|
|||
|
||||
bool draw_glow_for_this_partition = mShaderLevel > 0; // no shaders = no glow.
|
||||
|
||||
|
||||
LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA_GROUP_LOOP);
|
||||
|
||||
bool disable_cull = is_particle_or_hud_particle;
|
||||
LLGLDisable cull(disable_cull ? GL_CULL_FACE : 0);
|
||||
|
||||
|
|
|
|||
|
|
@ -103,8 +103,6 @@ S32 normal_channel = -1;
|
|||
S32 specular_channel = -1;
|
||||
S32 cube_channel = -1;
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_SHADOW_AVATAR("Avatar Shadow");
|
||||
|
||||
LLDrawPoolAvatar::LLDrawPoolAvatar(U32 type) :
|
||||
LLFacePool(type)
|
||||
{
|
||||
|
|
@ -196,7 +194,7 @@ LLMatrix4& LLDrawPoolAvatar::getModelView()
|
|||
|
||||
void LLDrawPoolAvatar::beginDeferredPass(S32 pass)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_RENDER_CHARACTERS);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
|
||||
sSkipTransparent = TRUE;
|
||||
is_deferred_render = true;
|
||||
|
|
@ -231,7 +229,7 @@ void LLDrawPoolAvatar::beginDeferredPass(S32 pass)
|
|||
|
||||
void LLDrawPoolAvatar::endDeferredPass(S32 pass)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_RENDER_CHARACTERS);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
|
||||
sSkipTransparent = FALSE;
|
||||
is_deferred_render = false;
|
||||
|
|
@ -454,229 +452,220 @@ S32 LLDrawPoolAvatar::getNumShadowPasses()
|
|||
|
||||
void LLDrawPoolAvatar::beginShadowPass(S32 pass)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_SHADOW_AVATAR);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
|
||||
if (pass == SHADOW_PASS_AVATAR_OPAQUE)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
sVertexProgram = &gDeferredAvatarShadowProgram;
|
||||
|
||||
if (pass == SHADOW_PASS_AVATAR_OPAQUE)
|
||||
if ((sShaderLevel > 0)) // for hardware blending
|
||||
{
|
||||
sVertexProgram = &gDeferredAvatarShadowProgram;
|
||||
|
||||
if ((sShaderLevel > 0)) // for hardware blending
|
||||
{
|
||||
sRenderingSkinned = TRUE;
|
||||
sVertexProgram->bind();
|
||||
}
|
||||
|
||||
gGL.diffuseColor4f(1, 1, 1, 1);
|
||||
}
|
||||
else if (pass == SHADOW_PASS_AVATAR_ALPHA_BLEND)
|
||||
{
|
||||
sVertexProgram = &gDeferredAvatarAlphaShadowProgram;
|
||||
|
||||
// bind diffuse tex so we can reference the alpha channel...
|
||||
S32 loc = sVertexProgram->getUniformLocation(LLViewerShaderMgr::DIFFUSE_MAP);
|
||||
sDiffuseChannel = 0;
|
||||
if (loc != -1)
|
||||
{
|
||||
sDiffuseChannel = sVertexProgram->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
|
||||
}
|
||||
|
||||
if ((sShaderLevel > 0)) // for hardware blending
|
||||
{
|
||||
sRenderingSkinned = TRUE;
|
||||
sVertexProgram->bind();
|
||||
}
|
||||
|
||||
gGL.diffuseColor4f(1, 1, 1, 1);
|
||||
}
|
||||
else if (pass == SHADOW_PASS_AVATAR_ALPHA_MASK)
|
||||
{
|
||||
sVertexProgram = &gDeferredAvatarAlphaMaskShadowProgram;
|
||||
|
||||
// bind diffuse tex so we can reference the alpha channel...
|
||||
S32 loc = sVertexProgram->getUniformLocation(LLViewerShaderMgr::DIFFUSE_MAP);
|
||||
sDiffuseChannel = 0;
|
||||
if (loc != -1)
|
||||
{
|
||||
sDiffuseChannel = sVertexProgram->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
|
||||
}
|
||||
|
||||
if ((sShaderLevel > 0)) // for hardware blending
|
||||
{
|
||||
sRenderingSkinned = TRUE;
|
||||
sVertexProgram->bind();
|
||||
}
|
||||
|
||||
gGL.diffuseColor4f(1, 1, 1, 1);
|
||||
}
|
||||
else if (pass == SHADOW_PASS_ATTACHMENT_ALPHA_BLEND)
|
||||
{
|
||||
sVertexProgram = &gDeferredAttachmentAlphaShadowProgram;
|
||||
|
||||
// bind diffuse tex so we can reference the alpha channel...
|
||||
S32 loc = sVertexProgram->getUniformLocation(LLViewerShaderMgr::DIFFUSE_MAP);
|
||||
sDiffuseChannel = 0;
|
||||
if (loc != -1)
|
||||
{
|
||||
sDiffuseChannel = sVertexProgram->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
|
||||
}
|
||||
|
||||
if ((sShaderLevel > 0)) // for hardware blending
|
||||
{
|
||||
sRenderingSkinned = TRUE;
|
||||
sVertexProgram->bind();
|
||||
}
|
||||
|
||||
gGL.diffuseColor4f(1, 1, 1, 1);
|
||||
}
|
||||
else if (pass == SHADOW_PASS_ATTACHMENT_ALPHA_MASK)
|
||||
{
|
||||
sVertexProgram = &gDeferredAttachmentAlphaMaskShadowProgram;
|
||||
|
||||
// bind diffuse tex so we can reference the alpha channel...
|
||||
S32 loc = sVertexProgram->getUniformLocation(LLViewerShaderMgr::DIFFUSE_MAP);
|
||||
sDiffuseChannel = 0;
|
||||
if (loc != -1)
|
||||
{
|
||||
sDiffuseChannel = sVertexProgram->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
|
||||
}
|
||||
|
||||
if ((sShaderLevel > 0)) // for hardware blending
|
||||
{
|
||||
sRenderingSkinned = TRUE;
|
||||
sVertexProgram->bind();
|
||||
}
|
||||
|
||||
gGL.diffuseColor4f(1, 1, 1, 1);
|
||||
}
|
||||
else // SHADOW_PASS_ATTACHMENT_OPAQUE
|
||||
{
|
||||
sVertexProgram = &gDeferredAttachmentShadowProgram;
|
||||
S32 loc = sVertexProgram->getUniformLocation(LLViewerShaderMgr::DIFFUSE_MAP);
|
||||
sDiffuseChannel = 0;
|
||||
if (loc != -1)
|
||||
{
|
||||
sDiffuseChannel = sVertexProgram->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
|
||||
}
|
||||
sRenderingSkinned = TRUE;
|
||||
sVertexProgram->bind();
|
||||
}
|
||||
|
||||
gGL.diffuseColor4f(1, 1, 1, 1);
|
||||
}
|
||||
else if (pass == SHADOW_PASS_AVATAR_ALPHA_BLEND)
|
||||
{
|
||||
sVertexProgram = &gDeferredAvatarAlphaShadowProgram;
|
||||
|
||||
// bind diffuse tex so we can reference the alpha channel...
|
||||
S32 loc = sVertexProgram->getUniformLocation(LLViewerShaderMgr::DIFFUSE_MAP);
|
||||
sDiffuseChannel = 0;
|
||||
if (loc != -1)
|
||||
{
|
||||
sDiffuseChannel = sVertexProgram->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
|
||||
}
|
||||
|
||||
if ((sShaderLevel > 0)) // for hardware blending
|
||||
{
|
||||
sRenderingSkinned = TRUE;
|
||||
sVertexProgram->bind();
|
||||
}
|
||||
|
||||
gGL.diffuseColor4f(1, 1, 1, 1);
|
||||
}
|
||||
else if (pass == SHADOW_PASS_AVATAR_ALPHA_MASK)
|
||||
{
|
||||
sVertexProgram = &gDeferredAvatarAlphaMaskShadowProgram;
|
||||
|
||||
// bind diffuse tex so we can reference the alpha channel...
|
||||
S32 loc = sVertexProgram->getUniformLocation(LLViewerShaderMgr::DIFFUSE_MAP);
|
||||
sDiffuseChannel = 0;
|
||||
if (loc != -1)
|
||||
{
|
||||
sDiffuseChannel = sVertexProgram->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
|
||||
}
|
||||
|
||||
if ((sShaderLevel > 0)) // for hardware blending
|
||||
{
|
||||
sRenderingSkinned = TRUE;
|
||||
sVertexProgram->bind();
|
||||
}
|
||||
|
||||
gGL.diffuseColor4f(1, 1, 1, 1);
|
||||
}
|
||||
else if (pass == SHADOW_PASS_ATTACHMENT_ALPHA_BLEND)
|
||||
{
|
||||
sVertexProgram = &gDeferredAttachmentAlphaShadowProgram;
|
||||
|
||||
// bind diffuse tex so we can reference the alpha channel...
|
||||
S32 loc = sVertexProgram->getUniformLocation(LLViewerShaderMgr::DIFFUSE_MAP);
|
||||
sDiffuseChannel = 0;
|
||||
if (loc != -1)
|
||||
{
|
||||
sDiffuseChannel = sVertexProgram->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
|
||||
}
|
||||
|
||||
if ((sShaderLevel > 0)) // for hardware blending
|
||||
{
|
||||
sRenderingSkinned = TRUE;
|
||||
sVertexProgram->bind();
|
||||
}
|
||||
|
||||
gGL.diffuseColor4f(1, 1, 1, 1);
|
||||
}
|
||||
else if (pass == SHADOW_PASS_ATTACHMENT_ALPHA_MASK)
|
||||
{
|
||||
sVertexProgram = &gDeferredAttachmentAlphaMaskShadowProgram;
|
||||
|
||||
// bind diffuse tex so we can reference the alpha channel...
|
||||
S32 loc = sVertexProgram->getUniformLocation(LLViewerShaderMgr::DIFFUSE_MAP);
|
||||
sDiffuseChannel = 0;
|
||||
if (loc != -1)
|
||||
{
|
||||
sDiffuseChannel = sVertexProgram->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
|
||||
}
|
||||
|
||||
if ((sShaderLevel > 0)) // for hardware blending
|
||||
{
|
||||
sRenderingSkinned = TRUE;
|
||||
sVertexProgram->bind();
|
||||
}
|
||||
|
||||
gGL.diffuseColor4f(1, 1, 1, 1);
|
||||
}
|
||||
else // SHADOW_PASS_ATTACHMENT_OPAQUE
|
||||
{
|
||||
sVertexProgram = &gDeferredAttachmentShadowProgram;
|
||||
S32 loc = sVertexProgram->getUniformLocation(LLViewerShaderMgr::DIFFUSE_MAP);
|
||||
sDiffuseChannel = 0;
|
||||
if (loc != -1)
|
||||
{
|
||||
sDiffuseChannel = sVertexProgram->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
|
||||
}
|
||||
sVertexProgram->bind();
|
||||
}
|
||||
}
|
||||
|
||||
void LLDrawPoolAvatar::endShadowPass(S32 pass)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_SHADOW_AVATAR);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
|
||||
if (pass == SHADOW_PASS_ATTACHMENT_OPAQUE)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
|
||||
if (pass == SHADOW_PASS_ATTACHMENT_OPAQUE)
|
||||
{
|
||||
LLVertexBuffer::unbind();
|
||||
}
|
||||
|
||||
if (sShaderLevel > 0)
|
||||
{
|
||||
sVertexProgram->unbind();
|
||||
}
|
||||
sVertexProgram = NULL;
|
||||
sRenderingSkinned = FALSE;
|
||||
LLDrawPoolAvatar::sShadowPass = -1;
|
||||
LLVertexBuffer::unbind();
|
||||
}
|
||||
|
||||
if (sShaderLevel > 0)
|
||||
{
|
||||
sVertexProgram->unbind();
|
||||
}
|
||||
sVertexProgram = NULL;
|
||||
sRenderingSkinned = FALSE;
|
||||
LLDrawPoolAvatar::sShadowPass = -1;
|
||||
}
|
||||
|
||||
void LLDrawPoolAvatar::renderShadow(S32 pass)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_SHADOW_AVATAR);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
|
||||
if (mDrawFace.empty())
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
return;
|
||||
}
|
||||
|
||||
if (mDrawFace.empty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
const LLFace *facep = mDrawFace[0];
|
||||
if (!facep->getDrawable())
|
||||
{
|
||||
return;
|
||||
}
|
||||
LLVOAvatar *avatarp = (LLVOAvatar *)facep->getDrawable()->getVObj().get();
|
||||
|
||||
const LLFace *facep = mDrawFace[0];
|
||||
if (!facep->getDrawable())
|
||||
{
|
||||
return;
|
||||
}
|
||||
LLVOAvatar *avatarp = (LLVOAvatar *)facep->getDrawable()->getVObj().get();
|
||||
if (avatarp->isDead() || avatarp->isUIAvatar() || avatarp->mDrawable.isNull())
|
||||
{
|
||||
return;
|
||||
}
|
||||
LLVOAvatar::AvatarOverallAppearance oa = avatarp->getOverallAppearance();
|
||||
BOOL impostor = !LLPipeline::sImpostorRender && avatarp->isImpostor();
|
||||
if (impostor || (oa == LLVOAvatar::AOA_INVISIBLE))
|
||||
{
|
||||
// No shadows for impostored (including jellydolled) or invisible avs.
|
||||
return;
|
||||
}
|
||||
|
||||
if (avatarp->isDead() || avatarp->isUIAvatar() || avatarp->mDrawable.isNull())
|
||||
{
|
||||
return;
|
||||
}
|
||||
LLVOAvatar::AvatarOverallAppearance oa = avatarp->getOverallAppearance();
|
||||
BOOL impostor = !LLPipeline::sImpostorRender && avatarp->isImpostor();
|
||||
if (impostor || (oa == LLVOAvatar::AOA_INVISIBLE))
|
||||
{
|
||||
// No shadows for impostored (including jellydolled) or invisible avs.
|
||||
return;
|
||||
}
|
||||
LLDrawPoolAvatar::sShadowPass = pass;
|
||||
|
||||
LLDrawPoolAvatar::sShadowPass = pass;
|
||||
|
||||
if (pass == SHADOW_PASS_AVATAR_OPAQUE)
|
||||
{
|
||||
LLDrawPoolAvatar::sSkipTransparent = true;
|
||||
avatarp->renderSkinned();
|
||||
LLDrawPoolAvatar::sSkipTransparent = false;
|
||||
}
|
||||
else if (pass == SHADOW_PASS_AVATAR_ALPHA_BLEND)
|
||||
{
|
||||
LLDrawPoolAvatar::sSkipOpaque = true;
|
||||
avatarp->renderSkinned();
|
||||
LLDrawPoolAvatar::sSkipOpaque = false;
|
||||
}
|
||||
else if (pass == SHADOW_PASS_AVATAR_ALPHA_MASK)
|
||||
{
|
||||
LLDrawPoolAvatar::sSkipOpaque = true;
|
||||
avatarp->renderSkinned();
|
||||
LLDrawPoolAvatar::sSkipOpaque = false;
|
||||
}
|
||||
else if (pass == SHADOW_PASS_ATTACHMENT_ALPHA_BLEND) // rigged alpha
|
||||
{
|
||||
LLDrawPoolAvatar::sSkipOpaque = true;
|
||||
renderRigged(avatarp, RIGGED_MATERIAL_ALPHA);
|
||||
renderRigged(avatarp, RIGGED_MATERIAL_ALPHA_EMISSIVE);
|
||||
renderRigged(avatarp, RIGGED_ALPHA);
|
||||
renderRigged(avatarp, RIGGED_FULLBRIGHT_ALPHA);
|
||||
renderRigged(avatarp, RIGGED_GLOW);
|
||||
renderRigged(avatarp, RIGGED_SPECMAP_BLEND);
|
||||
renderRigged(avatarp, RIGGED_NORMMAP_BLEND);
|
||||
renderRigged(avatarp, RIGGED_NORMSPEC_BLEND);
|
||||
LLDrawPoolAvatar::sSkipOpaque = false;
|
||||
}
|
||||
else if (pass == SHADOW_PASS_ATTACHMENT_ALPHA_MASK) // rigged alpha mask
|
||||
{
|
||||
LLDrawPoolAvatar::sSkipOpaque = true;
|
||||
renderRigged(avatarp, RIGGED_MATERIAL_ALPHA_MASK);
|
||||
renderRigged(avatarp, RIGGED_NORMMAP_MASK);
|
||||
renderRigged(avatarp, RIGGED_SPECMAP_MASK);
|
||||
renderRigged(avatarp, RIGGED_NORMSPEC_MASK);
|
||||
renderRigged(avatarp, RIGGED_GLOW);
|
||||
LLDrawPoolAvatar::sSkipOpaque = false;
|
||||
}
|
||||
else // rigged opaque (SHADOW_PASS_ATTACHMENT_OPAQUE
|
||||
{
|
||||
LLDrawPoolAvatar::sSkipTransparent = true;
|
||||
renderRigged(avatarp, RIGGED_MATERIAL);
|
||||
renderRigged(avatarp, RIGGED_SPECMAP);
|
||||
renderRigged(avatarp, RIGGED_SPECMAP_EMISSIVE);
|
||||
renderRigged(avatarp, RIGGED_NORMMAP);
|
||||
renderRigged(avatarp, RIGGED_NORMMAP_EMISSIVE);
|
||||
renderRigged(avatarp, RIGGED_NORMSPEC);
|
||||
renderRigged(avatarp, RIGGED_NORMSPEC_EMISSIVE);
|
||||
renderRigged(avatarp, RIGGED_SIMPLE);
|
||||
renderRigged(avatarp, RIGGED_FULLBRIGHT);
|
||||
renderRigged(avatarp, RIGGED_SHINY);
|
||||
renderRigged(avatarp, RIGGED_FULLBRIGHT_SHINY);
|
||||
renderRigged(avatarp, RIGGED_GLOW);
|
||||
renderRigged(avatarp, RIGGED_DEFERRED_BUMP);
|
||||
renderRigged(avatarp, RIGGED_DEFERRED_SIMPLE);
|
||||
LLDrawPoolAvatar::sSkipTransparent = false;
|
||||
}
|
||||
if (pass == SHADOW_PASS_AVATAR_OPAQUE)
|
||||
{
|
||||
LLDrawPoolAvatar::sSkipTransparent = true;
|
||||
avatarp->renderSkinned();
|
||||
LLDrawPoolAvatar::sSkipTransparent = false;
|
||||
}
|
||||
else if (pass == SHADOW_PASS_AVATAR_ALPHA_BLEND)
|
||||
{
|
||||
LLDrawPoolAvatar::sSkipOpaque = true;
|
||||
avatarp->renderSkinned();
|
||||
LLDrawPoolAvatar::sSkipOpaque = false;
|
||||
}
|
||||
else if (pass == SHADOW_PASS_AVATAR_ALPHA_MASK)
|
||||
{
|
||||
LLDrawPoolAvatar::sSkipOpaque = true;
|
||||
avatarp->renderSkinned();
|
||||
LLDrawPoolAvatar::sSkipOpaque = false;
|
||||
}
|
||||
else if (pass == SHADOW_PASS_ATTACHMENT_ALPHA_BLEND) // rigged alpha
|
||||
{
|
||||
LLDrawPoolAvatar::sSkipOpaque = true;
|
||||
renderRigged(avatarp, RIGGED_MATERIAL_ALPHA);
|
||||
renderRigged(avatarp, RIGGED_MATERIAL_ALPHA_EMISSIVE);
|
||||
renderRigged(avatarp, RIGGED_ALPHA);
|
||||
renderRigged(avatarp, RIGGED_FULLBRIGHT_ALPHA);
|
||||
renderRigged(avatarp, RIGGED_GLOW);
|
||||
renderRigged(avatarp, RIGGED_SPECMAP_BLEND);
|
||||
renderRigged(avatarp, RIGGED_NORMMAP_BLEND);
|
||||
renderRigged(avatarp, RIGGED_NORMSPEC_BLEND);
|
||||
LLDrawPoolAvatar::sSkipOpaque = false;
|
||||
}
|
||||
else if (pass == SHADOW_PASS_ATTACHMENT_ALPHA_MASK) // rigged alpha mask
|
||||
{
|
||||
LLDrawPoolAvatar::sSkipOpaque = true;
|
||||
renderRigged(avatarp, RIGGED_MATERIAL_ALPHA_MASK);
|
||||
renderRigged(avatarp, RIGGED_NORMMAP_MASK);
|
||||
renderRigged(avatarp, RIGGED_SPECMAP_MASK);
|
||||
renderRigged(avatarp, RIGGED_NORMSPEC_MASK);
|
||||
renderRigged(avatarp, RIGGED_GLOW);
|
||||
LLDrawPoolAvatar::sSkipOpaque = false;
|
||||
}
|
||||
else // rigged opaque (SHADOW_PASS_ATTACHMENT_OPAQUE
|
||||
{
|
||||
LLDrawPoolAvatar::sSkipTransparent = true;
|
||||
renderRigged(avatarp, RIGGED_MATERIAL);
|
||||
renderRigged(avatarp, RIGGED_SPECMAP);
|
||||
renderRigged(avatarp, RIGGED_SPECMAP_EMISSIVE);
|
||||
renderRigged(avatarp, RIGGED_NORMMAP);
|
||||
renderRigged(avatarp, RIGGED_NORMMAP_EMISSIVE);
|
||||
renderRigged(avatarp, RIGGED_NORMSPEC);
|
||||
renderRigged(avatarp, RIGGED_NORMSPEC_EMISSIVE);
|
||||
renderRigged(avatarp, RIGGED_SIMPLE);
|
||||
renderRigged(avatarp, RIGGED_FULLBRIGHT);
|
||||
renderRigged(avatarp, RIGGED_SHINY);
|
||||
renderRigged(avatarp, RIGGED_FULLBRIGHT_SHINY);
|
||||
renderRigged(avatarp, RIGGED_GLOW);
|
||||
renderRigged(avatarp, RIGGED_DEFERRED_BUMP);
|
||||
renderRigged(avatarp, RIGGED_DEFERRED_SIMPLE);
|
||||
LLDrawPoolAvatar::sSkipTransparent = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -712,7 +701,7 @@ S32 LLDrawPoolAvatar::getNumDeferredPasses()
|
|||
|
||||
void LLDrawPoolAvatar::render(S32 pass)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_RENDER_CHARACTERS);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
if (LLPipeline::sImpostorRender)
|
||||
{
|
||||
renderAvatars(NULL, pass+2);
|
||||
|
|
@ -724,7 +713,7 @@ void LLDrawPoolAvatar::render(S32 pass)
|
|||
|
||||
void LLDrawPoolAvatar::beginRenderPass(S32 pass)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_RENDER_CHARACTERS);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
//reset vertex buffer mappings
|
||||
LLVertexBuffer::unbind();
|
||||
|
||||
|
|
@ -775,7 +764,7 @@ void LLDrawPoolAvatar::beginRenderPass(S32 pass)
|
|||
|
||||
void LLDrawPoolAvatar::endRenderPass(S32 pass)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_RENDER_CHARACTERS);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
|
||||
if (LLPipeline::sImpostorRender)
|
||||
{
|
||||
|
|
@ -1542,13 +1531,8 @@ void LLDrawPoolAvatar::endDeferredSkinned()
|
|||
gGL.getTexUnit(0)->activate();
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_RENDER_AVATARS("renderAvatars");
|
||||
|
||||
|
||||
void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_RENDER_AVATARS);
|
||||
|
||||
if (pass == -1)
|
||||
{
|
||||
for (S32 i = 1; i < getNumPasses(); i++)
|
||||
|
|
@ -1588,6 +1572,8 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
|
|||
return;
|
||||
}
|
||||
|
||||
LL_RECORD_BLOCK_TIME(FTM_RENDER_CHARACTERS);
|
||||
|
||||
if (!single_avatar && !avatarp->isFullyLoaded() )
|
||||
{
|
||||
if (pass==0 && (!gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_PARTICLES) || LLViewerPartSim::getMaxPartCount() <= 0))
|
||||
|
|
|
|||
|
|
@ -1116,11 +1116,10 @@ LLViewerTexture* LLBumpImageList::getBrightnessDarknessImage(LLViewerFetchedText
|
|||
}
|
||||
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_BUMP_SOURCE_STANDARD_LOADED("Bump Standard Callback");
|
||||
|
||||
// static
|
||||
void LLBumpImageList::onSourceBrightnessLoaded( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata )
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
LLUUID* source_asset_id = (LLUUID*)userdata;
|
||||
LLBumpImageList::onSourceLoaded( success, src_vi, src, *source_asset_id, BE_BRIGHTNESS );
|
||||
if( final )
|
||||
|
|
@ -1140,22 +1139,17 @@ void LLBumpImageList::onSourceDarknessLoaded( BOOL success, LLViewerFetchedTextu
|
|||
}
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_BUMP_GEN_NORMAL("Generate Normal Map");
|
||||
static LLTrace::BlockTimerStatHandle FTM_BUMP_CREATE_TEXTURE("Create GL Normal Map");
|
||||
|
||||
void LLBumpImageList::onSourceStandardLoaded( BOOL success, LLViewerFetchedTexture* src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata)
|
||||
{
|
||||
if (success && LLPipeline::sRenderDeferred)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_BUMP_SOURCE_STANDARD_LOADED);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
LLPointer<LLImageRaw> nrm_image = new LLImageRaw(src->getWidth(), src->getHeight(), 4);
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_BUMP_GEN_NORMAL);
|
||||
generateNormalMapFromAlpha(src, nrm_image);
|
||||
}
|
||||
src_vi->setExplicitFormat(GL_RGBA, GL_RGBA);
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_BUMP_CREATE_TEXTURE);
|
||||
src_vi->createGLTexture(src_vi->getDiscardLevel(), nrm_image);
|
||||
}
|
||||
}
|
||||
|
|
@ -1216,28 +1210,18 @@ void LLBumpImageList::generateNormalMapFromAlpha(LLImageRaw* src, LLImageRaw* nr
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_BUMP_SOURCE_LOADED("Bump Source Loaded");
|
||||
static LLTrace::BlockTimerStatHandle FTM_BUMP_SOURCE_ENTRIES_UPDATE("Entries Update");
|
||||
static LLTrace::BlockTimerStatHandle FTM_BUMP_SOURCE_MIN_MAX("Min/Max");
|
||||
static LLTrace::BlockTimerStatHandle FTM_BUMP_SOURCE_RGB2LUM("RGB to Luminance");
|
||||
static LLTrace::BlockTimerStatHandle FTM_BUMP_SOURCE_RESCALE("Rescale");
|
||||
static LLTrace::BlockTimerStatHandle FTM_BUMP_SOURCE_GEN_NORMAL("Generate Normal");
|
||||
static LLTrace::BlockTimerStatHandle FTM_BUMP_SOURCE_CREATE("Bump Source Create");
|
||||
|
||||
// static
|
||||
void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLImageRaw* src, LLUUID& source_asset_id, EBumpEffect bump_code )
|
||||
{
|
||||
if( success )
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_BUMP_SOURCE_LOADED);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
|
||||
|
||||
bump_image_map_t& entries_list(bump_code == BE_BRIGHTNESS ? gBumpImageList.mBrightnessEntries : gBumpImageList.mDarknessEntries );
|
||||
bump_image_map_t::iterator iter = entries_list.find(source_asset_id);
|
||||
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_BUMP_SOURCE_ENTRIES_UPDATE);
|
||||
if (iter == entries_list.end() ||
|
||||
iter->second.isNull() ||
|
||||
iter->second->getWidth() != src->getWidth() ||
|
||||
|
|
@ -1280,7 +1264,6 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI
|
|||
case 1:
|
||||
case 2:
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_BUMP_SOURCE_MIN_MAX);
|
||||
if( src_data_size == dst_data_size * src_components )
|
||||
{
|
||||
for( S32 i = 0, j=0; i < dst_data_size; i++, j+= src_components )
|
||||
|
|
@ -1306,7 +1289,6 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI
|
|||
case 3:
|
||||
case 4:
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_BUMP_SOURCE_RGB2LUM);
|
||||
if( src_data_size == dst_data_size * src_components )
|
||||
{
|
||||
for( S32 i = 0, j=0; i < dst_data_size; i++, j+= src_components )
|
||||
|
|
@ -1339,7 +1321,6 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI
|
|||
|
||||
if( maximum > minimum )
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_BUMP_SOURCE_RESCALE);
|
||||
U8 bias_and_scale_lut[256];
|
||||
F32 twice_one_over_range = 2.f / (maximum - minimum);
|
||||
S32 i;
|
||||
|
|
@ -1375,7 +1356,6 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI
|
|||
|
||||
if (!LLPipeline::sRenderDeferred)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_BUMP_SOURCE_CREATE);
|
||||
bump->setExplicitFormat(GL_ALPHA8, GL_ALPHA);
|
||||
bump->createGLTexture(0, dst_image);
|
||||
}
|
||||
|
|
@ -1386,13 +1366,11 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI
|
|||
bump->getGLTexture()->setAllowCompression(false);
|
||||
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_BUMP_SOURCE_CREATE);
|
||||
bump->setExplicitFormat(GL_RGBA8, GL_ALPHA);
|
||||
bump->createGLTexture(0, dst_image);
|
||||
}
|
||||
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_BUMP_SOURCE_GEN_NORMAL);
|
||||
gPipeline.mScreen.bindTarget();
|
||||
|
||||
LLGLDepthTest depth(GL_FALSE);
|
||||
|
|
|
|||
|
|
@ -57,8 +57,6 @@ void LLDrawPoolGlow::beginPostDeferredPass(S32 pass)
|
|||
}
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_RENDER_GLOW_PUSH("Glow Push");
|
||||
|
||||
void LLDrawPoolGlow::renderPostDeferred(S32 pass)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_RENDER_GLOW);
|
||||
|
|
@ -73,10 +71,7 @@ void LLDrawPoolGlow::renderPostDeferred(S32 pass)
|
|||
LLGLDepthTest depth(GL_TRUE, GL_FALSE);
|
||||
gGL.setColorMask(false, true);
|
||||
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_RENDER_GLOW_PUSH);
|
||||
pushBatches(LLRenderPass::PASS_GLOW, getVertexDataMask() | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, TRUE);
|
||||
}
|
||||
pushBatches(LLRenderPass::PASS_GLOW, getVertexDataMask() | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, TRUE);
|
||||
|
||||
gGL.setColorMask(true, false);
|
||||
gGL.setSceneBlendType(LLRender::BT_ALPHA);
|
||||
|
|
@ -309,7 +304,7 @@ void LLDrawPoolAlphaMask::endRenderPass(S32 pass)
|
|||
void LLDrawPoolAlphaMask::render(S32 pass)
|
||||
{
|
||||
LLGLDisable blend(GL_BLEND);
|
||||
LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA_MASK);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
|
||||
if (mShaderLevel > 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -920,6 +920,7 @@ void LLDrawPoolTerrain::renderOwnership()
|
|||
|
||||
void LLDrawPoolTerrain::dirtyTextures(const std::set<LLViewerFetchedTexture*>& textures)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
LLViewerFetchedTexture* tex = LLViewerTextureManager::staticCastToFetchedTexture(mTexturep) ;
|
||||
if (tex && textures.find(tex) != textures.end())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@
|
|||
|
||||
S32 LLDrawPoolTree::sDiffTex = 0;
|
||||
static LLGLSLShader* shader = NULL;
|
||||
static LLTrace::BlockTimerStatHandle FTM_SHADOW_TREE("Tree Shadow");
|
||||
|
||||
LLDrawPoolTree::LLDrawPoolTree(LLViewerTexture *texturep) :
|
||||
LLFacePool(POOL_TREE),
|
||||
|
|
@ -84,7 +83,7 @@ void LLDrawPoolTree::beginRenderPass(S32 pass)
|
|||
|
||||
void LLDrawPoolTree::render(S32 pass)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(LLPipeline::sShadowRender ? FTM_SHADOW_TREE : FTM_RENDER_TREES);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
|
||||
if (mDrawFace.empty())
|
||||
{
|
||||
|
|
@ -169,7 +168,7 @@ void LLDrawPoolTree::endDeferredPass(S32 pass)
|
|||
//============================================
|
||||
void LLDrawPoolTree::beginShadowPass(S32 pass)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_SHADOW_TREE);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
|
||||
glPolygonOffset(gSavedSettings.getF32("RenderDeferredTreeShadowOffset"),
|
||||
gSavedSettings.getF32("RenderDeferredTreeShadowBias"));
|
||||
|
|
@ -188,7 +187,7 @@ void LLDrawPoolTree::renderShadow(S32 pass)
|
|||
|
||||
void LLDrawPoolTree::endShadowPass(S32 pass)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_SHADOW_TREE);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
|
||||
glPolygonOffset(gSavedSettings.getF32("RenderDeferredSpotShadowOffset"),
|
||||
gSavedSettings.getF32("RenderDeferredSpotShadowBias"));
|
||||
|
|
|
|||
|
|
@ -35,16 +35,8 @@
|
|||
|
||||
class LLViewerDynamicTexture : public LLViewerTexture
|
||||
{
|
||||
LL_ALIGN_NEW
|
||||
public:
|
||||
void* operator new(size_t size)
|
||||
{
|
||||
return LLTrace::MemTrackable<LLTexture>::aligned_new<16>(size);
|
||||
}
|
||||
|
||||
void operator delete(void* ptr, size_t size)
|
||||
{
|
||||
LLTrace::MemTrackable<LLTexture>::aligned_delete<16>(ptr, size);
|
||||
}
|
||||
|
||||
enum
|
||||
{
|
||||
|
|
|
|||
|
|
@ -105,7 +105,6 @@ namespace
|
|||
|
||||
//---------------------------------------------------------------------
|
||||
LLTrace::BlockTimerStatHandle FTM_ENVIRONMENT_UPDATE("Update Environment Tick");
|
||||
LLTrace::BlockTimerStatHandle FTM_SHADER_PARAM_UPDATE("Update Shader Parameters");
|
||||
|
||||
LLSettingsBase::Seconds DEFAULT_UPDATE_THRESHOLD(10.0);
|
||||
const LLSettingsBase::Seconds MINIMUM_SPANLENGTH(0.01f);
|
||||
|
|
@ -825,7 +824,7 @@ std::string env_selection_to_string(LLEnvironment::EnvSelection_t sel)
|
|||
#undef RTNENUM
|
||||
}
|
||||
|
||||
|
||||
LLEnvironment* LLSimpleton<LLEnvironment>::sInstance = nullptr;
|
||||
//-------------------------------------------------------------------------
|
||||
LLEnvironment::LLEnvironment():
|
||||
mCloudScrollDelta(),
|
||||
|
|
@ -879,6 +878,7 @@ void LLEnvironment::cleanupSingleton()
|
|||
|
||||
LLEnvironment::~LLEnvironment()
|
||||
{
|
||||
cleanupSingleton();
|
||||
}
|
||||
|
||||
bool LLEnvironment::canEdit() const
|
||||
|
|
@ -1655,7 +1655,7 @@ void LLEnvironment::updateCloudScroll()
|
|||
// static
|
||||
void LLEnvironment::updateGLVariablesForSettings(LLShaderUniforms* uniforms, const LLSettingsBase::ptr_t &psetting)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_SHADER_PARAM_UPDATE);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
|
||||
for (int i = 0; i < LLGLSLShader::SG_COUNT; ++i)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -47,11 +47,11 @@ class LLViewerCamera;
|
|||
class LLParcel;
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
class LLEnvironment : public LLSingleton<LLEnvironment>
|
||||
class LLEnvironment : public LLSimpleton<LLEnvironment>
|
||||
{
|
||||
LLSINGLETON_C11(LLEnvironment);
|
||||
LOG_CLASS(LLEnvironment);
|
||||
public:
|
||||
LLEnvironment();
|
||||
|
||||
static const F64Seconds TRANSITION_INSTANT;
|
||||
static const F64Seconds TRANSITION_FAST;
|
||||
|
|
@ -115,7 +115,7 @@ public:
|
|||
typedef std::array<F32, 4> altitude_list_t;
|
||||
typedef std::vector<F32> altitudes_vect_t;
|
||||
|
||||
virtual ~LLEnvironment();
|
||||
~LLEnvironment();
|
||||
|
||||
bool canEdit() const;
|
||||
bool isExtendedEnvironmentEnabled() const;
|
||||
|
|
@ -337,9 +337,10 @@ public:
|
|||
DayInstance::ptr_t getSelectedEnvironmentInstance();
|
||||
DayInstance::ptr_t getSharedEnvironmentInstance();
|
||||
|
||||
void initSingleton();
|
||||
|
||||
protected:
|
||||
virtual void initSingleton() override;
|
||||
virtual void cleanupSingleton() override;
|
||||
void cleanupSingleton();
|
||||
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -127,6 +127,7 @@ void planarProjection(LLVector2 &tc, const LLVector4a& normal,
|
|||
|
||||
void LLFace::init(LLDrawable* drawablep, LLViewerObject* objp)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
mLastUpdateTime = gFrameTimeSeconds;
|
||||
mLastMoveTime = 0.f;
|
||||
mLastSkinTime = gFrameTimeSeconds;
|
||||
|
|
@ -1206,12 +1207,10 @@ bool LLFace::canRenderAsMask()
|
|||
}
|
||||
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_VOLUME("Volume VB Cache");
|
||||
|
||||
//static
|
||||
void LLFace::cacheFaceInVRAM(const LLVolumeFace& vf)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_VOLUME);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
U32 mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0 |
|
||||
LLVertexBuffer::MAP_TANGENT | LLVertexBuffer::MAP_NORMAL;
|
||||
|
||||
|
|
@ -1273,41 +1272,13 @@ void push_for_transform(LLVertexBuffer* buff, U32 source_count, U32 dest_count)
|
|||
}
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_FACE_GET_GEOM("Face Geom");
|
||||
static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_POSITION("Position");
|
||||
static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_NORMAL("Normal");
|
||||
static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_TEXTURE("Texture");
|
||||
static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_COLOR("Color");
|
||||
static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_EMISSIVE("Emissive");
|
||||
static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_WEIGHTS("Weights");
|
||||
static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_TANGENT("Binormal");
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_FEEDBACK("Face Feedback");
|
||||
static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_FEEDBACK_POSITION("Feedback Position");
|
||||
static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_FEEDBACK_NORMAL("Feedback Normal");
|
||||
static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_FEEDBACK_TEXTURE("Feedback Texture");
|
||||
static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_FEEDBACK_COLOR("Feedback Color");
|
||||
static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_FEEDBACK_EMISSIVE("Feedback Emissive");
|
||||
static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_FEEDBACK_BINORMAL("Feedback Binormal");
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_INDEX("Index");
|
||||
static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_INDEX_TAIL("Tail");
|
||||
static LLTrace::BlockTimerStatHandle FTM_FACE_POSITION_STORE("Pos");
|
||||
static LLTrace::BlockTimerStatHandle FTM_FACE_TEXTURE_INDEX_STORE("TexIdx");
|
||||
static LLTrace::BlockTimerStatHandle FTM_FACE_POSITION_PAD("Pad");
|
||||
static LLTrace::BlockTimerStatHandle FTM_FACE_TEX_DEFAULT("Default");
|
||||
static LLTrace::BlockTimerStatHandle FTM_FACE_TEX_QUICK("Quick");
|
||||
static LLTrace::BlockTimerStatHandle FTM_FACE_TEX_QUICK_NO_XFORM("No Xform");
|
||||
static LLTrace::BlockTimerStatHandle FTM_FACE_TEX_QUICK_XFORM("Xform");
|
||||
static LLTrace::BlockTimerStatHandle FTM_FACE_TEX_QUICK_PLANAR("Quick Planar");
|
||||
|
||||
BOOL LLFace::getGeometryVolume(const LLVolume& volume,
|
||||
const S32 &f,
|
||||
const LLMatrix4& mat_vert_in, const LLMatrix3& mat_norm_in,
|
||||
const U16 &index_offset,
|
||||
bool force_rebuild)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_FACE_GET_GEOM);
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
llassert(verify());
|
||||
|
||||
if (volume.getNumVolumeFaces() <= f) {
|
||||
|
|
@ -1448,7 +1419,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
|
|||
// INDICES
|
||||
if (full_rebuild)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_INDEX);
|
||||
LL_PROFILE_ZONE_NAMED("getGeometryVolume - indices");
|
||||
mVertexBuffer->getIndexStrider(indicesp, mIndicesIndex, mIndicesCount, map_range);
|
||||
|
||||
volatile __m128i* dst = (__m128i*) indicesp.get();
|
||||
|
|
@ -1464,7 +1435,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
|
|||
}
|
||||
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_INDEX_TAIL);
|
||||
LL_PROFILE_ZONE_NAMED("getGeometryVolume - indices tail");
|
||||
U16* idx = (U16*) dst;
|
||||
|
||||
for (S32 i = end*8; i < num_indices; ++i)
|
||||
|
|
@ -1527,7 +1498,8 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
|
|||
!volume.isUnique()) //source volume is NOT flexi
|
||||
{ //use transform feedback to pack vertex buffer
|
||||
//gGLDebugLoggingEnabled = TRUE;
|
||||
LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_FEEDBACK);
|
||||
|
||||
LL_PROFILE_ZONE_NAMED("getGeometryVolume - transform feedback");
|
||||
LLGLEnable discard(GL_RASTERIZER_DISCARD);
|
||||
LLVertexBuffer* buff = (LLVertexBuffer*) vf.mVertexBuffer.get();
|
||||
|
||||
|
|
@ -1545,7 +1517,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
|
|||
|
||||
if (rebuild_pos)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_FEEDBACK_POSITION);
|
||||
LL_PROFILE_ZONE_NAMED("getGeometryVolume - tf position");
|
||||
gTransformPositionProgram.bind();
|
||||
|
||||
mVertexBuffer->bindForFeedback(0, LLVertexBuffer::TYPE_VERTEX, mGeomIndex, mGeomCount);
|
||||
|
|
@ -1570,7 +1542,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
|
|||
|
||||
if (rebuild_color)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_FEEDBACK_COLOR);
|
||||
LL_PROFILE_ZONE_NAMED("getGeometryVolume - tf color");
|
||||
gTransformColorProgram.bind();
|
||||
|
||||
mVertexBuffer->bindForFeedback(0, LLVertexBuffer::TYPE_COLOR, mGeomIndex, mGeomCount);
|
||||
|
|
@ -1586,7 +1558,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
|
|||
|
||||
if (rebuild_emissive)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_FEEDBACK_EMISSIVE);
|
||||
LL_PROFILE_ZONE_NAMED("getGeometryVolume - tf emissive");
|
||||
gTransformColorProgram.bind();
|
||||
|
||||
mVertexBuffer->bindForFeedback(0, LLVertexBuffer::TYPE_EMISSIVE, mGeomIndex, mGeomCount);
|
||||
|
|
@ -1607,7 +1579,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
|
|||
|
||||
if (rebuild_normal)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_FEEDBACK_NORMAL);
|
||||
LL_PROFILE_ZONE_NAMED("getGeometryVolume - tf normal");
|
||||
gTransformNormalProgram.bind();
|
||||
|
||||
mVertexBuffer->bindForFeedback(0, LLVertexBuffer::TYPE_NORMAL, mGeomIndex, mGeomCount);
|
||||
|
|
@ -1620,7 +1592,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
|
|||
|
||||
if (rebuild_tangent)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_TANGENT);
|
||||
LL_PROFILE_ZONE_NAMED("getGeometryVolume - tf tangent");
|
||||
gTransformTangentProgram.bind();
|
||||
|
||||
mVertexBuffer->bindForFeedback(0, LLVertexBuffer::TYPE_TANGENT, mGeomIndex, mGeomCount);
|
||||
|
|
@ -1633,7 +1605,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
|
|||
|
||||
if (rebuild_tcoord)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_FEEDBACK_TEXTURE);
|
||||
LL_PROFILE_ZONE_NAMED("getGeometryVolume - tf tcoord");
|
||||
gTransformTexCoordProgram.bind();
|
||||
|
||||
mVertexBuffer->bindForFeedback(0, LLVertexBuffer::TYPE_TEXCOORD0, mGeomIndex, mGeomCount);
|
||||
|
|
@ -1672,7 +1644,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
|
|||
|
||||
if (rebuild_tcoord)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_TEXTURE);
|
||||
LL_PROFILE_ZONE_NAMED("getGeometryVolume - tcoord");
|
||||
|
||||
//bump setup
|
||||
LLVector4a binormal_dir( -sin_ang, cos_ang, 0.f );
|
||||
|
|
@ -1795,18 +1767,18 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
|
|||
|
||||
if (texgen != LLTextureEntry::TEX_GEN_PLANAR)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_FACE_TEX_QUICK);
|
||||
LL_PROFILE_ZONE_NAMED("getGeometryVolume - texgen");
|
||||
if (!do_tex_mat)
|
||||
{
|
||||
if (!do_xform)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_FACE_TEX_QUICK_NO_XFORM);
|
||||
LL_PROFILE_ZONE_NAMED("ggv - texgen 1");
|
||||
S32 tc_size = (num_vertices*2*sizeof(F32)+0xF) & ~0xF;
|
||||
LLVector4a::memcpyNonAliased16((F32*) tex_coords0.get(), (F32*) vf.mTexCoords, tc_size);
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_FACE_TEX_QUICK_XFORM);
|
||||
LL_PROFILE_ZONE_NAMED("ggv - texgen 2");
|
||||
F32* dst = (F32*) tex_coords0.get();
|
||||
LLVector4a* src = (LLVector4a*) vf.mTexCoords;
|
||||
|
||||
|
|
@ -1846,9 +1818,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
|
|||
for (S32 i = 0; i < num_vertices; i++)
|
||||
{
|
||||
LLVector2 tc(vf.mTexCoords[i]);
|
||||
//LLVector4a& norm = vf.mNormals[i];
|
||||
//LLVector4a& center = *(vf.mCenter);
|
||||
|
||||
|
||||
LLVector3 tmp(tc.mV[0], tc.mV[1], 0.f);
|
||||
tmp = tmp * *mTextureMatrix;
|
||||
tc.mV[0] = tmp.mV[0];
|
||||
|
|
@ -1859,7 +1829,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
|
|||
}
|
||||
else
|
||||
{ //no bump, tex gen planar
|
||||
LL_RECORD_BLOCK_TIME(FTM_FACE_TEX_QUICK_PLANAR);
|
||||
LL_PROFILE_ZONE_NAMED("getGeometryVolume - texgen planar");
|
||||
if (do_tex_mat)
|
||||
{
|
||||
for (S32 i = 0; i < num_vertices; i++)
|
||||
|
|
@ -1904,7 +1874,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
|
|||
}
|
||||
else
|
||||
{ //bump mapped or has material, just do the whole expensive loop
|
||||
LL_RECORD_BLOCK_TIME(FTM_FACE_TEX_DEFAULT);
|
||||
LL_PROFILE_ZONE_NAMED("getGeometryVolume - texgen default");
|
||||
|
||||
std::vector<LLVector2> bump_tc;
|
||||
|
||||
|
|
@ -2062,7 +2032,6 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
|
|||
LLVector4a* end = src+num_vertices;
|
||||
//LLVector4a* end_64 = end-4;
|
||||
|
||||
//LL_RECORD_TIME_BLOCK(FTM_FACE_GEOM_POSITION);
|
||||
llassert(num_vertices > 0);
|
||||
|
||||
mVertexBuffer->getVertexStrider(vert, mGeomIndex, mGeomCount, map_range);
|
||||
|
|
@ -2099,53 +2068,19 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
|
|||
|
||||
LLVector4a tmp;
|
||||
|
||||
{
|
||||
//LL_RECORD_TIME_BLOCK(FTM_FACE_POSITION_STORE);
|
||||
|
||||
/*if (num_vertices > 4)
|
||||
{ //more than 64 bytes
|
||||
while (src < end_64)
|
||||
{
|
||||
_mm_prefetch((char*)src + 64, _MM_HINT_T0);
|
||||
_mm_prefetch((char*)dst + 64, _MM_HINT_T0);
|
||||
|
||||
mat_vert.affineTransform(*src, res0);
|
||||
tmp.setSelectWithMask(mask, texIdx, res0);
|
||||
tmp.store4a((F32*) dst);
|
||||
|
||||
mat_vert.affineTransform(*(src+1), res1);
|
||||
tmp.setSelectWithMask(mask, texIdx, res1);
|
||||
tmp.store4a((F32*) dst+4);
|
||||
|
||||
mat_vert.affineTransform(*(src+2), res2);
|
||||
tmp.setSelectWithMask(mask, texIdx, res2);
|
||||
tmp.store4a((F32*) dst+8);
|
||||
|
||||
mat_vert.affineTransform(*(src+3), res3);
|
||||
tmp.setSelectWithMask(mask, texIdx, res3);
|
||||
tmp.store4a((F32*) dst+12);
|
||||
|
||||
dst += 16;
|
||||
src += 4;
|
||||
}
|
||||
}*/
|
||||
|
||||
while (src < end)
|
||||
{
|
||||
mat_vert.affineTransform(*src++, res0);
|
||||
tmp.setSelectWithMask(mask, texIdx, res0);
|
||||
tmp.store4a((F32*) dst);
|
||||
dst += 4;
|
||||
}
|
||||
|
||||
while (src < end)
|
||||
{
|
||||
mat_vert.affineTransform(*src++, res0);
|
||||
tmp.setSelectWithMask(mask, texIdx, res0);
|
||||
tmp.store4a((F32*) dst);
|
||||
dst += 4;
|
||||
}
|
||||
|
||||
|
||||
while (dst < end_f32)
|
||||
{
|
||||
//LL_RECORD_TIME_BLOCK(FTM_FACE_POSITION_PAD);
|
||||
while (dst < end_f32)
|
||||
{
|
||||
res0.store4a((F32*) dst);
|
||||
dst += 4;
|
||||
}
|
||||
res0.store4a((F32*) dst);
|
||||
dst += 4;
|
||||
}
|
||||
|
||||
if (map_range)
|
||||
|
|
@ -2179,7 +2114,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
|
|||
|
||||
if (rebuild_tangent)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_TANGENT);
|
||||
LL_PROFILE_ZONE_NAMED("getGeometryVolume - tangent");
|
||||
mVertexBuffer->getTangentStrider(tangent, mGeomIndex, mGeomCount, map_range);
|
||||
F32* tangents = (F32*) tangent.get();
|
||||
|
||||
|
|
@ -2212,7 +2147,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
|
|||
|
||||
if (rebuild_weights && vf.mWeights)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_WEIGHTS);
|
||||
LL_PROFILE_ZONE_NAMED("getGeometryVolume - weight");
|
||||
mVertexBuffer->getWeight4Strider(wght, mGeomIndex, mGeomCount, map_range);
|
||||
F32* weights = (F32*) wght.get();
|
||||
LLVector4a::memcpyNonAliased16(weights, (F32*) vf.mWeights, num_vertices*4*sizeof(F32));
|
||||
|
|
@ -2224,7 +2159,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
|
|||
|
||||
if (rebuild_color && mVertexBuffer->hasDataType(LLVertexBuffer::TYPE_COLOR) )
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_COLOR);
|
||||
LL_PROFILE_ZONE_NAMED("getGeometryVolume - color");
|
||||
mVertexBuffer->getColorStrider(colors, mGeomIndex, mGeomCount, map_range);
|
||||
|
||||
LLVector4a src;
|
||||
|
|
@ -2255,7 +2190,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
|
|||
|
||||
if (rebuild_emissive)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_EMISSIVE);
|
||||
LL_PROFILE_ZONE_NAMED("getGeometryVolume - emissive");
|
||||
LLStrider<LLColor4U> emissive;
|
||||
mVertexBuffer->getEmissiveStrider(emissive, mGeomIndex, mGeomCount, map_range);
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue