summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llfilesystem/lldir.cpp2
-rw-r--r--indra/llrender/llgl.cpp3
-rw-r--r--indra/llui/llfloater.cpp3
-rw-r--r--indra/newview/llface.cpp4
-rw-r--r--indra/newview/llface.h6
-rw-r--r--indra/newview/llfloatereditextdaycycle.cpp49
-rw-r--r--indra/newview/llfloatereditextdaycycle.h6
-rw-r--r--indra/newview/llhudnametag.cpp27
-rw-r--r--indra/newview/llhudnametag.h2
-rw-r--r--indra/newview/llpanelenvironment.cpp16
-rw-r--r--indra/newview/llviewerdisplay.cpp2
-rw-r--r--indra/newview/llviewerobject.cpp7
-rw-r--r--indra/newview/llviewerpartsource.cpp8
-rw-r--r--indra/newview/llviewerstats.cpp60
-rw-r--r--indra/newview/llviewerstats.h13
-rw-r--r--indra/newview/llviewertexture.cpp1
-rw-r--r--indra/newview/llviewertexture.h1
-rw-r--r--indra/newview/llviewertexturelist.cpp133
-rw-r--r--indra/newview/llvoicevisualizer.cpp2
-rw-r--r--indra/newview/llvovolume.cpp1
-rw-r--r--indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml2
21 files changed, 144 insertions, 204 deletions
diff --git a/indra/llfilesystem/lldir.cpp b/indra/llfilesystem/lldir.cpp
index a18dc0a4f1..99d4850610 100644
--- a/indra/llfilesystem/lldir.cpp
+++ b/indra/llfilesystem/lldir.cpp
@@ -721,6 +721,8 @@ std::vector<std::string> LLDir::findSkinnedFilenames(const std::string& subdir,
const std::string& filename,
ESkinConstraint constraint) const
{
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
+
// Recognize subdirs that have no localization.
static const std::set<std::string> sUnlocalized = list_of
("") // top-level directory not localized
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index 7959b3bb57..c14efe8ab4 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -2742,7 +2742,7 @@ LLGLDepthTest::LLGLDepthTest(GLboolean depth_enabled, GLboolean write_enabled, G
: mPrevDepthEnabled(sDepthEnabled), mPrevDepthFunc(sDepthFunc), mPrevWriteEnabled(sWriteEnabled)
{
stop_glerror();
-
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
checkState();
if (!depth_enabled)
@@ -2775,6 +2775,7 @@ LLGLDepthTest::LLGLDepthTest(GLboolean depth_enabled, GLboolean write_enabled, G
LLGLDepthTest::~LLGLDepthTest()
{
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
checkState();
if (sDepthEnabled != mPrevDepthEnabled )
{
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index ff174d8470..6ad74c09e6 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -1983,6 +1983,9 @@ void LLFloater::onClickCloseBtn(bool app_quitting)
// virtual
void LLFloater::draw()
{
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
+ LL_PROFILE_ZONE_TEXT(getTitle().c_str(), getTitle().length());
+
const F32 alpha = getCurrentTransparency();
// draw background
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index a8001699fe..df08dcf503 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -2143,7 +2143,7 @@ F32 LLFace::getTextureVirtualSize()
face_area = mPixelArea / llclamp(texel_area, 0.015625f, 128.f);
}
- face_area = LLFace::adjustPixelArea(mImportanceToCamera, face_area) ;
+ face_area = LLFace::adjustPixelArea(mImportanceToCamera, face_area);
if(face_area > LLViewerTexture::sMinLargeImageSize) //if is large image, shrink face_area by considering the partial overlapping.
{
if(mImportanceToCamera > LEAST_IMPORTANCE_FOR_LARGE_IMAGE && mTexture[LLRender::DIFFUSE_MAP].notNull() && mTexture[LLRender::DIFFUSE_MAP]->isLargeImage())
@@ -2161,7 +2161,6 @@ bool LLFace::calcPixelArea(F32& cos_angle_to_view_dir, F32& radius)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_FACE;
- //VECTORIZE THIS
//get area of circle around face
LLVector4a center;
@@ -2286,6 +2285,7 @@ const F32 FACE_IMPORTANCE_TO_CAMERA_OVER_ANGLE[FACE_IMPORTANCE_LEVEL][2] = //
//static
F32 LLFace::calcImportanceToCamera(F32 cos_angle_to_view_dir, F32 dist)
{
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_FACE;
F32 importance = 0.f ;
if(cos_angle_to_view_dir > LLViewerCamera::getInstance()->getCosHalfFov() &&
diff --git a/indra/newview/llface.h b/indra/newview/llface.h
index 7cf256f731..99642016f7 100644
--- a/indra/newview/llface.h
+++ b/indra/newview/llface.h
@@ -209,7 +209,6 @@ public:
void setDrawInfo(LLDrawInfo* draw_info);
F32 getTextureVirtualSize() ;
- F32 getImportanceToCamera()const {return mImportanceToCamera ;}
void resetVirtualSize();
void setHasMedia(bool has_media) { mHasMedia = has_media ;}
@@ -265,6 +264,11 @@ public:
// return mSkinInfo->mHash or 0 if mSkinInfo is null
U64 getSkinHash();
+ // true if face was recently in the main camera frustum according to LLViewerTextureList updates
+ bool mInFrustum = false;
+ // value of gFrameCount the last time the face was touched by LLViewerTextureList::updateImageDecodePriority
+ U32 mLastTextureUpdate = 0;
+
private:
LLPointer<LLVertexBuffer> mVertexBuffer;
LLPointer<LLVertexBuffer> mVertexBufferGLTF;
diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp
index 60343a4e2a..d6e7cd97f3 100644
--- a/indra/newview/llfloatereditextdaycycle.cpp
+++ b/indra/newview/llfloatereditextdaycycle.cpp
@@ -184,7 +184,6 @@ LLFloaterEditExtDayCycle::LLFloaterEditExtDayCycle(const LLSD &key) :
mLoadTrack(nullptr),
mClearTrack(nullptr)
{
-
mCommitCallbackRegistrar.add(EVNT_DAYTRACK, [this](LLUICtrl *ctrl, const LLSD &data) { onTrackSelectionCallback(data); });
mCommitCallbackRegistrar.add(EVNT_PLAY, [this](LLUICtrl *ctrl, const LLSD &data) { onPlayActionCallback(data); });
@@ -205,8 +204,8 @@ LLFloaterEditExtDayCycle::~LLFloaterEditExtDayCycle()
// virtual
bool LLFloaterEditExtDayCycle::postBuild()
{
- getChild<LLLineEditor>(TXT_DAY_NAME)->setKeystrokeCallback(boost::bind(&LLFloaterEditExtDayCycle::onCommitName, this, _1, _2), NULL);
-
+ mNameEditor = getChild<LLLineEditor>(TXT_DAY_NAME, true);
+ mCancelButton = getChild<LLButton>(BTN_CANCEL, true);
mAddFrameButton = getChild<LLButton>(BTN_ADDFRAME, true);
mDeleteFrameButton = getChild<LLButton>(BTN_DELFRAME, true);
mTimeSlider = getChild<LLMultiSliderCtrl>(SLDR_TIME);
@@ -221,24 +220,24 @@ bool LLFloaterEditExtDayCycle::postBuild()
mClearTrack = getChild<LLButton>(BTN_CLEARTRACK, true);
mFlyoutControl = new LLFlyoutComboBtnCtrl(this, BTN_SAVE, BTN_FLYOUT, XML_FLYOUTMENU_FILE, false);
- mFlyoutControl->setAction([this](LLUICtrl *ctrl, const LLSD &data) { onButtonApply(ctrl, data); });
+ mFlyoutControl->setAction([this](LLUICtrl *ctrl, const LLSD&) { onButtonApply(ctrl); });
- getChild<LLButton>(BTN_CANCEL, true)->setCommitCallback([this](LLUICtrl *ctrl, const LLSD &data) { onClickCloseBtn(); });
- mTimeSlider->setCommitCallback([this](LLUICtrl *ctrl, const LLSD &data) { onTimeSliderCallback(); });
- mAddFrameButton->setCommitCallback([this](LLUICtrl *ctrl, const LLSD &data) { onAddFrame(); });
- mDeleteFrameButton->setCommitCallback([this](LLUICtrl *ctrl, const LLSD &data) { onRemoveFrame(); });
- mImportButton->setCommitCallback([this](LLUICtrl *, const LLSD &){ onButtonImport(); });
- mLoadFrame->setCommitCallback([this](LLUICtrl *, const LLSD &){ onButtonLoadFrame(); });
+ mNameEditor->setKeystrokeCallback([this](LLLineEditor*, void*) { onNameKeystroke(); }, NULL);
+ mCancelButton->setCommitCallback([this](LLUICtrl*, const LLSD&) { onClickCloseBtn(); });
+ mTimeSlider->setCommitCallback([this](LLUICtrl*, const LLSD&) { onTimeSliderCallback(); });
+ mAddFrameButton->setCommitCallback([this](LLUICtrl*, const LLSD&) { onAddFrame(); });
+ mDeleteFrameButton->setCommitCallback([this](LLUICtrl*, const LLSD&) { onRemoveFrame(); });
+ mImportButton->setCommitCallback([this](LLUICtrl*, const LLSD&) { onButtonImport(); });
+ mLoadFrame->setCommitCallback([this](LLUICtrl*, const LLSD&) { onButtonLoadFrame(); });
- mCloneTrack->setCommitCallback([this](LLUICtrl *, const LLSD&){ onCloneTrack(); });
- mLoadTrack->setCommitCallback([this](LLUICtrl *, const LLSD&){ onLoadTrack();});
- mClearTrack->setCommitCallback([this](LLUICtrl *, const LLSD&){ onClearTrack(); });
+ mCloneTrack->setCommitCallback([this](LLUICtrl*, const LLSD&) { onCloneTrack(); });
+ mLoadTrack->setCommitCallback([this](LLUICtrl*, const LLSD&) { onLoadTrack();});
+ mClearTrack->setCommitCallback([this](LLUICtrl*, const LLSD&) { onClearTrack(); });
-
- mFramesSlider->setCommitCallback([this](LLUICtrl *, const LLSD &data) { onFrameSliderCallback(data); });
- mFramesSlider->setDoubleClickCallback([this](LLUICtrl*, S32 x, S32 y, MASK mask){ onFrameSliderDoubleClick(x, y, mask); });
- mFramesSlider->setMouseDownCallback([this](LLUICtrl*, S32 x, S32 y, MASK mask){ onFrameSliderMouseDown(x, y, mask); });
- mFramesSlider->setMouseUpCallback([this](LLUICtrl*, S32 x, S32 y, MASK mask){ onFrameSliderMouseUp(x, y, mask); });
+ mFramesSlider->setCommitCallback([this](LLUICtrl*, const LLSD &data) { onFrameSliderCallback(data); });
+ mFramesSlider->setDoubleClickCallback([this](LLUICtrl*, S32 x, S32 y, MASK mask) { onFrameSliderDoubleClick(x, y, mask); });
+ mFramesSlider->setMouseDownCallback([this](LLUICtrl*, S32 x, S32 y, MASK mask) { onFrameSliderMouseDown(x, y, mask); });
+ mFramesSlider->setMouseUpCallback([this](LLUICtrl*, S32 x, S32 y, MASK mask) { onFrameSliderMouseUp(x, y, mask); });
mTimeSlider->addSlider(0);
@@ -431,12 +430,10 @@ void LLFloaterEditExtDayCycle::refresh()
{
if (mEditDay)
{
- LLLineEditor* name_field = getChild<LLLineEditor>(TXT_DAY_NAME);
- name_field->setText(mEditDay->getName());
- name_field->setEnabled(mCanMod);
+ mNameEditor->setText(mEditDay->getName());
+ mNameEditor->setEnabled(mCanMod && mCanSave && mInventoryId.notNull());
}
-
bool is_inventory_avail = canUseInventory();
bool show_commit = ((mEditContext == CONTEXT_PARCEL) || (mEditContext == CONTEXT_REGION));
@@ -461,7 +458,7 @@ void LLFloaterEditExtDayCycle::refresh()
mFlyoutControl->setMenuItemVisible(ACTION_APPLY_REGION, show_apply);
mFlyoutControl->setMenuItemEnabled(ACTION_COMMIT, show_commit && !mCommitSignal.empty());
- mFlyoutControl->setMenuItemEnabled(ACTION_SAVE, is_inventory_avail && mCanMod && !mInventoryId.isNull() && mCanSave);
+ mFlyoutControl->setMenuItemEnabled(ACTION_SAVE, is_inventory_avail && mCanMod && mCanSave && mInventoryId.notNull());
mFlyoutControl->setMenuItemEnabled(ACTION_SAVEAS, is_inventory_avail && mCanCopy && mCanSave);
mFlyoutControl->setMenuItemEnabled(ACTION_APPLY_LOCAL, true);
mFlyoutControl->setMenuItemEnabled(ACTION_APPLY_PARCEL, canApplyParcel() && show_apply);
@@ -569,7 +566,7 @@ bool LLFloaterEditExtDayCycle::handleKeyUp(KEY key, MASK mask, bool called_from_
return LLFloater::handleKeyUp(key, mask, called_from_parent);
}
-void LLFloaterEditExtDayCycle::onButtonApply(LLUICtrl *ctrl, const LLSD &data)
+void LLFloaterEditExtDayCycle::onButtonApply(LLUICtrl *ctrl)
{
std::string ctrl_action = ctrl->getName();
@@ -832,7 +829,7 @@ void LLFloaterEditExtDayCycle::onClearTrack()
refresh();
}
-void LLFloaterEditExtDayCycle::onCommitName(class LLLineEditor* caller, void* user_data)
+void LLFloaterEditExtDayCycle::onNameKeystroke()
{
if (!mEditDay)
{
@@ -840,7 +837,7 @@ void LLFloaterEditExtDayCycle::onCommitName(class LLLineEditor* caller, void* us
return;
}
- mEditDay->setName(caller->getText());
+ mEditDay->setName(mNameEditor->getText());
}
void LLFloaterEditExtDayCycle::onTrackSelectionCallback(const LLSD& user_data)
diff --git a/indra/newview/llfloatereditextdaycycle.h b/indra/newview/llfloatereditextdaycycle.h
index 655915b6e8..926a24f8a4 100644
--- a/indra/newview/llfloatereditextdaycycle.h
+++ b/indra/newview/llfloatereditextdaycycle.h
@@ -110,7 +110,7 @@ private:
F32 getCurrentFrame() const;
// flyout response/click
- void onButtonApply(LLUICtrl *ctrl, const LLSD &data);
+ void onButtonApply(LLUICtrl *ctrl);
//virtual void onClickCloseBtn(bool app_quitting = false) override;
//void onButtonImport();
void onButtonLoadFrame();
@@ -119,7 +119,7 @@ private:
void onCloneTrack();
void onLoadTrack();
void onClearTrack();
- void onCommitName(class LLLineEditor* caller, void* user_data);
+ void onNameKeystroke();
void onTrackSelectionCallback(const LLSD& user_data);
void onPlayActionCallback(const LLSD& user_data);
// time slider clicked
@@ -196,6 +196,8 @@ private:
std::string mLastFrameSlider;
bool mShiftCopyEnabled;
+ LLLineEditor* mNameEditor;
+ LLButton* mCancelButton;
LLButton* mAddFrameButton;
LLButton* mDeleteFrameButton;
LLButton* mImportButton;
diff --git a/indra/newview/llhudnametag.cpp b/indra/newview/llhudnametag.cpp
index 205089c662..11f049564a 100644
--- a/indra/newview/llhudnametag.cpp
+++ b/indra/newview/llhudnametag.cpp
@@ -229,35 +229,20 @@ void LLHUDNameTag::render()
if (sDisplayText)
{
LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE);
- //LLGLDisable gls_stencil(GL_STENCIL_TEST);
- renderText(false);
+ renderText();
}
}
-void LLHUDNameTag::renderText(bool for_select)
+void LLHUDNameTag::renderText()
{
if (!mVisible || mHidden)
{
return;
}
- // don't pick text that isn't bound to a viewerobject
- if (for_select &&
- (!mSourceObject || mSourceObject->mDrawable.isNull()))
- {
- return;
- }
-
- if (for_select)
- {
- gGL.getTexUnit(0)->disable();
- }
- else
- {
- gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE);
- }
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
- LLGLState gls_blend(GL_BLEND, !for_select);
+ gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE);
LLColor4 shadow_color(0.f, 0.f, 0.f, 1.f);
F32 alpha_factor = 1.f;
@@ -393,10 +378,6 @@ void LLHUDNameTag::renderText(bool for_select)
}
/// Reset the default color to white. The renderer expects this to be the default.
gGL.color4f(1.0f, 1.0f, 1.0f, 1.0f);
- if (for_select)
- {
- gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE);
- }
}
void LLHUDNameTag::setString(const std::string &text_utf8)
diff --git a/indra/newview/llhudnametag.h b/indra/newview/llhudnametag.h
index 9abd8f33cc..5cb7fa877e 100644
--- a/indra/newview/llhudnametag.h
+++ b/indra/newview/llhudnametag.h
@@ -145,7 +145,7 @@ protected:
LLHUDNameTag(const U8 type);
/*virtual*/ void render();
- void renderText(bool for_select);
+ void renderText();
static void updateAll();
void setLOD(S32 lod);
S32 getMaxLines();
diff --git a/indra/newview/llpanelenvironment.cpp b/indra/newview/llpanelenvironment.cpp
index 2a4323d3e6..c1d8ce50ff 100644
--- a/indra/newview/llpanelenvironment.cpp
+++ b/indra/newview/llpanelenvironment.cpp
@@ -58,14 +58,6 @@ namespace
const std::string FLOATER_DAY_CYCLE_EDIT("env_edit_extdaycycle");
const std::string STRING_REGION_ENV("str_region_env");
const std::string STRING_EMPTY_NAME("str_empty");
-
- inline bool ends_with(std::string const & value, std::string const & ending)
- {
- if (ending.size() > value.size())
- return false;
- return std::equal(ending.rbegin(), ending.rend(), value.rbegin());
- }
-
}
//=========================================================================
@@ -876,16 +868,16 @@ void LLPanelEnvironmentInfo::onBtnEdit()
(LLFloaterEditExtDayCycle::KEY_CANMOD, LLSD::Boolean(true)));
dayeditor->openFloater(params);
+
if (mCurrentEnvironment && mCurrentEnvironment->mDayCycle)
{
dayeditor->setEditDayCycle(mCurrentEnvironment->mDayCycle);
- if (!ends_with(mCurrentEnvironment->mDayCycle->getName(), "(customized)"))
- {
- dayeditor->setEditName(mCurrentEnvironment->mDayCycle->getName() + "(customized)");
- }
+ dayeditor->setEditName(mCurrentEnvironment->mDayCycleName);
}
else
+ {
dayeditor->setEditDefaultDayCycle();
+ }
}
void LLPanelEnvironmentInfo::onBtnSelect()
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index 8c6a38876a..9bd0973cc0 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -1502,6 +1502,7 @@ void draw_axes()
void render_ui_3d()
{
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
LLGLSPipeline gls_pipeline;
//////////////////////////////////////
@@ -1550,6 +1551,7 @@ void render_ui_3d()
void render_ui_2d()
{
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
LLGLSUIDefault gls_ui;
/////////////////////////////////////////////////////////////
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 5d33db591a..e36a03a749 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -6020,6 +6020,7 @@ bool LLViewerObject::isParticleSource() const
void LLViewerObject::setParticleSource(const LLPartSysData& particle_parameters, const LLUUID& owner_id)
{
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_VIEWER;
if (mPartSourcep)
{
deleteParticleSource();
@@ -6051,6 +6052,7 @@ void LLViewerObject::setParticleSource(const LLPartSysData& particle_parameters,
void LLViewerObject::unpackParticleSource(const S32 block_num, const LLUUID& owner_id)
{
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_VIEWER;
if (!mPartSourcep.isNull() && mPartSourcep->isDead())
{
mPartSourcep = NULL;
@@ -6086,7 +6088,7 @@ void LLViewerObject::unpackParticleSource(const S32 block_num, const LLUUID& own
LLViewerTexture* image;
if (mPartSourcep->mPartSysData.mPartImageID == LLUUID::null)
{
- image = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.j2c");
+ image = LLViewerFetchedTexture::sDefaultParticleImagep;
}
else
{
@@ -6099,6 +6101,7 @@ void LLViewerObject::unpackParticleSource(const S32 block_num, const LLUUID& own
void LLViewerObject::unpackParticleSource(LLDataPacker &dp, const LLUUID& owner_id, bool legacy)
{
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_VIEWER;
if (!mPartSourcep.isNull() && mPartSourcep->isDead())
{
mPartSourcep = NULL;
@@ -6133,7 +6136,7 @@ void LLViewerObject::unpackParticleSource(LLDataPacker &dp, const LLUUID& owner_
LLViewerTexture* image;
if (mPartSourcep->mPartSysData.mPartImageID == LLUUID::null)
{
- image = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.j2c");
+ image = LLViewerFetchedTexture::sDefaultParticleImagep;
}
else
{
diff --git a/indra/newview/llviewerpartsource.cpp b/indra/newview/llviewerpartsource.cpp
index dd6a404836..54e0470604 100644
--- a/indra/newview/llviewerpartsource.cpp
+++ b/indra/newview/llviewerpartsource.cpp
@@ -114,7 +114,7 @@ LLViewerPartSourceScript::LLViewerPartSourceScript(LLViewerObject *source_objp)
llassert(source_objp);
mSourceObjectp = source_objp;
mPosAgent = mSourceObjectp->getPositionAgent();
- mImagep = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.j2c");
+ mImagep = LLViewerFetchedTexture::sDefaultParticleImagep;
mImagep->setAddressMode(LLTexUnit::TAM_CLAMP);
}
@@ -619,7 +619,7 @@ void LLViewerPartSourceSpiral::update(const F32 dt)
{
if (!mImagep)
{
- mImagep = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.j2c");
+ mImagep = LLViewerFetchedTexture::sDefaultParticleImagep;
}
const F32 RATE = 0.025f;
@@ -789,7 +789,7 @@ void LLViewerPartSourceBeam::update(const F32 dt)
if (!mImagep)
{
- mImagep = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.j2c");
+ mImagep = LLViewerFetchedTexture::sDefaultParticleImagep;
}
LLViewerPart* part = new LLViewerPart();
@@ -876,7 +876,7 @@ void LLViewerPartSourceChat::update(const F32 dt)
{
if (!mImagep)
{
- mImagep = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.j2c");
+ mImagep = LLViewerFetchedTexture::sDefaultParticleImagep;
}
diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp
index d1ee9ea17c..3641738d9d 100644
--- a/indra/newview/llviewerstats.cpp
+++ b/indra/newview/llviewerstats.cpp
@@ -137,7 +137,6 @@ LLTrace::CountStatHandle<> FPS("FPS", "Frames rendered"),
UPLOAD_TEXTURE("uploadtexture", "Textures uploaded"),
EDIT_TEXTURE("edittexture", "Changes to textures on objects"),
KILLED("killed", "Number of times killed"),
- FRAMETIME_DOUBLED("frametimedoubled", "Ratio of frames 2x longer than previous"),
TEX_BAKES("texbakes", "Number of times avatar textures have been baked"),
TEX_REBAKES("texrebakes", "Number of times avatar textures have been forced to rebake"),
NUM_NEW_OBJECTS("numnewobjectsstat", "Number of objects in scene that were not previously in cache");
@@ -157,11 +156,6 @@ LLTrace::CountStatHandle<F64Kilobytes >
MESSAGE_SYSTEM_DATA_IN("messagedatain", "Incoming message system network data"),
MESSAGE_SYSTEM_DATA_OUT("messagedataout", "Outgoing message system network data");
-LLTrace::CountStatHandle<F64Seconds >
- SIM_20_FPS_TIME("sim20fpstime", "Seconds with sim FPS below 20"),
- SIM_PHYSICS_20_FPS_TIME("simphysics20fpstime", "Seconds with physics FPS below 20"),
- LOSS_5_PERCENT_TIME("loss5percenttime", "Seconds with packet loss > 5%");
-
SimMeasurement<> SIM_TIME_DILATION("simtimedilation", "Simulator time scale", LL_SIM_STAT_TIME_DILATION),
SIM_FPS("simfps", "Simulator framerate", LL_SIM_STAT_FPS),
SIM_PHYSICS_FPS("simphysicsfps", "Simulator physics framerate", LL_SIM_STAT_PHYSFPS),
@@ -205,9 +199,6 @@ static LLTrace::SampleStatHandle<bool>
CHAT_BUBBLES("chatbubbles", "Chat Bubbles Enabled");
LLTrace::SampleStatHandle<F64Megabytes > FORMATTED_MEM("formattedmemstat");
-LLTrace::SampleStatHandle<F64Kilobytes > DELTA_BANDWIDTH("deltabandwidth", "Increase/Decrease in bandwidth based on packet loss"),
- MAX_BANDWIDTH("maxbandwidth", "Max bandwidth setting");
-
SimMeasurement<F64Milliseconds > SIM_FRAME_TIME("simframemsec", "", LL_SIM_STAT_FRAMEMS),
SIM_NET_TIME("simnetmsec", "", LL_SIM_STAT_NETMS),
@@ -228,7 +219,6 @@ SimMeasurement<F64Kilobytes > SIM_UNACKED_BYTES("simtotalunackedbytes", "", LL
SimMeasurement<F64Megabytes > SIM_PHYSICS_MEM("physicsmemoryallocated", "", LL_SIM_STAT_SIMPHYSICSMEMORY);
LLTrace::SampleStatHandle<F64Milliseconds > FRAMETIME_JITTER("frametimejitter", "Average delta between successive frame times"),
- FRAMETIME_SLEW("frametimeslew", "Average delta between frame time and mean"),
FRAMETIME("frametime", "Measured frame time"),
SIM_PING("simpingstat");
@@ -246,10 +236,7 @@ LLTrace::EventStatHandle<F64Milliseconds > REGION_CROSSING_TIME("regioncrossing
LLTrace::EventStatHandle<F64Seconds > AVATAR_EDIT_TIME("avataredittime", "Seconds in Edit Appearance"),
TOOLBOX_TIME("toolboxtime", "Seconds using Toolbox"),
- MOUSELOOK_TIME("mouselooktime", "Seconds in Mouselook"),
- FPS_10_TIME("fps10time", "Seconds below 10 FPS"),
- FPS_8_TIME("fps8time", "Seconds below 8 FPS"),
- FPS_2_TIME("fps2time", "Seconds below 2 FPS");
+ MOUSELOOK_TIME("mouselooktime", "Seconds in Mouselook");
LLTrace::EventStatHandle<LLUnit<F32, LLUnits::Percent> > OBJECT_CACHE_HIT_RATE("object_cache_hits");
@@ -279,55 +266,12 @@ void LLViewerStats::resetStats()
void LLViewerStats::updateFrameStats(const F64Seconds time_diff)
{
- if (getRecording().getLastValue(LLStatViewer::PACKETS_LOST_PERCENT) > F32Percent(5.0))
- {
- add(LLStatViewer::LOSS_5_PERCENT_TIME, time_diff);
- }
-
- F32 sim_fps = (F32)getRecording().getLastValue(LLStatViewer::SIM_FPS);
- if (0.f < sim_fps && sim_fps < 20.f)
- {
- add(LLStatViewer::SIM_20_FPS_TIME, time_diff);
- }
-
- F32 sim_physics_fps = (F32)getRecording().getLastValue(LLStatViewer::SIM_PHYSICS_FPS);
-
- if (0.f < sim_physics_fps && sim_physics_fps < 20.f)
- {
- add(LLStatViewer::SIM_PHYSICS_20_FPS_TIME, time_diff);
- }
-
- if (time_diff >= (F64Seconds)0.5)
- {
- record(LLStatViewer::FPS_2_TIME, time_diff);
- }
- if (time_diff >= (F64Seconds)0.125)
- {
- record(LLStatViewer::FPS_8_TIME, time_diff);
- }
- if (time_diff >= (F64Seconds)0.1)
- {
- record(LLStatViewer::FPS_10_TIME, time_diff);
- }
-
if (gFrameCount && mLastTimeDiff > (F64Seconds)0.0)
{
- // new "stutter" meter
- add(LLStatViewer::FRAMETIME_DOUBLED, time_diff >= 2.0 * mLastTimeDiff ? 1 : 0);
-
sample(LLStatViewer::FRAMETIME, time_diff);
-
// old stats that were never really used
- F64Seconds jit = (F64Seconds) std::fabs((mLastTimeDiff - time_diff));
+ F64Seconds jit = (F64Seconds)std::fabs((mLastTimeDiff - time_diff));
sample(LLStatViewer::FRAMETIME_JITTER, jit);
-
- F32Seconds average_frametime = gRenderStartTime.getElapsedTimeF32() / (F32)gFrameCount;
- sample(LLStatViewer::FRAMETIME_SLEW, F64Milliseconds (average_frametime - time_diff));
-
- F32 max_bandwidth = gViewerThrottle.getMaxBandwidth();
- F32 delta_bandwidth = gViewerThrottle.getCurrentBandwidth() - max_bandwidth;
- sample(LLStatViewer::DELTA_BANDWIDTH, F64Bits(delta_bandwidth));
- sample(LLStatViewer::MAX_BANDWIDTH, F64Bits(max_bandwidth));
}
mLastTimeDiff = time_diff;
diff --git a/indra/newview/llviewerstats.h b/indra/newview/llviewerstats.h
index a857af53cc..8aed1c537e 100644
--- a/indra/newview/llviewerstats.h
+++ b/indra/newview/llviewerstats.h
@@ -135,7 +135,6 @@ extern LLTrace::CountStatHandle<> FPS,
UPLOAD_TEXTURE,
EDIT_TEXTURE,
KILLED,
- FRAMETIME_DOUBLED,
TEX_BAKES,
TEX_REBAKES,
NUM_NEW_OBJECTS;
@@ -150,10 +149,6 @@ extern LLTrace::CountStatHandle<F64Kilobytes > ACTIVE_MESSAGE_DATA_RECEIVED,
MESSAGE_SYSTEM_DATA_IN,
MESSAGE_SYSTEM_DATA_OUT;
-extern LLTrace::CountStatHandle<F64Seconds > SIM_20_FPS_TIME,
- SIM_PHYSICS_20_FPS_TIME,
- LOSS_5_PERCENT_TIME;
-
extern SimMeasurement<> SIM_TIME_DILATION,
SIM_FPS,
SIM_PHYSICS_FPS,
@@ -194,8 +189,6 @@ extern LLTrace::SampleStatHandle<LLUnit<F32, LLUnits::Percent> > PACKETS_LOST_PE
extern LLTrace::SampleStatHandle<F64Megabytes > FORMATTED_MEM;
-extern LLTrace::SampleStatHandle<F64Kilobytes > DELTA_BANDWIDTH,
- MAX_BANDWIDTH;
extern SimMeasurement<F64Milliseconds > SIM_FRAME_TIME,
SIM_NET_TIME,
SIM_OTHER_TIME,
@@ -216,7 +209,6 @@ extern SimMeasurement<F64Megabytes > SIM_PHYSICS_MEM;
extern LLTrace::SampleStatHandle<F64Milliseconds > FRAMETIME_JITTER,
- FRAMETIME_SLEW,
SIM_PING;
extern LLTrace::EventStatHandle<LLUnit<F64, LLUnits::Meters> > AGENT_POSITION_SNAP;
@@ -233,10 +225,7 @@ extern LLTrace::EventStatHandle<F64Milliseconds > REGION_CROSSING_TIME,
extern LLTrace::EventStatHandle<F64Seconds > AVATAR_EDIT_TIME,
TOOLBOX_TIME,
- MOUSELOOK_TIME,
- FPS_10_TIME,
- FPS_8_TIME,
- FPS_2_TIME;
+ MOUSELOOK_TIME;
extern LLTrace::EventStatHandle<LLUnit<F32, LLUnits::Percent> > OBJECT_CACHE_HIT_RATE;
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index f221efae7e..bb16fec32a 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -70,6 +70,7 @@ LLPointer<LLViewerTexture> LLViewerTexture::sBlackImagep = nullptr;
LLPointer<LLViewerTexture> LLViewerTexture::sCheckerBoardImagep = nullptr;
LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sMissingAssetImagep = nullptr;
LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sWhiteImagep = nullptr;
+LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sDefaultParticleImagep = nullptr;
LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sDefaultImagep = nullptr;
LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sSmokeImagep = nullptr;
LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sFlatNormalImagep = nullptr;
diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h
index 3866c898a6..65fa633f81 100644
--- a/indra/newview/llviewertexture.h
+++ b/indra/newview/llviewertexture.h
@@ -507,6 +507,7 @@ public:
static LLPointer<LLViewerFetchedTexture> sDefaultImagep; // "Default" texture for error cases, the only case of fetched texture which is generated in local.
static LLPointer<LLViewerFetchedTexture> sFlatNormalImagep; // Flat normal map denoting no bumpiness on a surface
static LLPointer<LLViewerFetchedTexture> sDefaultIrradiancePBRp; // PBR: irradiance
+ static LLPointer<LLViewerFetchedTexture> sDefaultParticleImagep; // Default particle texture
// not sure why, but something is iffy about the loading of this particular texture, use the accessor instead of accessing directly
static LLPointer<LLViewerFetchedTexture> sSmokeImagep; // Old "Default" translucent texture
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index a5700ab264..2df60dbf6c 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -123,6 +123,9 @@ void LLViewerTextureList::doPreloadImages()
LLTexUnit::sWhiteTexture = LLViewerFetchedTexture::sWhiteImagep->getTexName();
LLUIImageList* image_list = LLUIImageList::getInstance();
+ // Set default particle texture
+ LLViewerFetchedTexture::sDefaultParticleImagep = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.j2c");
+
// Set the default flat normal map
// BLANK_OBJECT_NORMAL has a version on dataserver, but it has compression artifacts
LLViewerFetchedTexture::sFlatNormalImagep =
@@ -403,6 +406,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromFile(const std::string&
const LLUUID& force_id)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
+ LL_PROFILE_ZONE_TEXT(filename.c_str(), filename.size());
if(!mInitialized)
{
return NULL ;
@@ -885,79 +889,90 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag
{
llassert(!gCubeSnapshot);
- static LLCachedControl<F32> bias_distance_scale(gSavedSettings, "TextureBiasDistanceScale", 1.f);
- static LLCachedControl<F32> texture_scale_min(gSavedSettings, "TextureScaleMinAreaFactor", 0.04f);
- static LLCachedControl<F32> texture_scale_max(gSavedSettings, "TextureScaleMaxAreaFactor", 25.f);
+ if (imagep->getBoostLevel() < LLViewerFetchedTexture::BOOST_HIGH) // don't bother checking face list for boosted textures
+ {
+ static LLCachedControl<F32> bias_distance_scale(gSavedSettings, "TextureBiasDistanceScale", 1.f);
+ static LLCachedControl<F32> texture_scale_min(gSavedSettings, "TextureScaleMinAreaFactor", 0.04f);
+ static LLCachedControl<F32> texture_scale_max(gSavedSettings, "TextureScaleMaxAreaFactor", 25.f);
+ F32 max_vsize = 0.f;
+ bool on_screen = false;
- F32 max_vsize = 0.f;
- bool on_screen = false;
+ U32 face_count = 0;
- LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
- for (U32 i = 0; i < LLRender::NUM_TEXTURE_CHANNELS; ++i)
- {
- for (S32 fi = 0; fi < imagep->getNumFaces(i); ++fi)
- {
- LLFace* face = (*(imagep->getFaceList(i)))[fi];
+ F32 bias = (F32) llroundf(powf(4, LLViewerTexture::sDesiredDiscardBias - 1.f));
- if (face && face->getViewerObject())
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
+ for (U32 i = 0; i < LLRender::NUM_TEXTURE_CHANNELS; ++i)
+ {
+ for (S32 fi = 0; fi < imagep->getNumFaces(i); ++fi)
{
- F32 radius;
- F32 cos_angle_to_view_dir;
- static LLCachedControl<F32> bias_unimportant_threshold(gSavedSettings, "TextureBiasUnimportantFactor", 0.25f);
- F32 vsize = face->getPixelArea();
- bool in_frustum = face->calcPixelArea(cos_angle_to_view_dir, radius);
-
- on_screen = in_frustum;
-
- // Scale desired texture resolution higher or lower depending on texture scale
- //
- // Minimum usage examples: a 1024x1024 texture with aplhabet, runing string
- // shows one letter at a time
- //
- // Maximum usage examples: huge chunk of terrain repeats texture
- S32 te_offset = face->getTEOffset(); // offset is -1 if not inited
- LLViewerObject* objp = face->getViewerObject();
- const LLTextureEntry* te = (te_offset < 0 || te_offset >= objp->getNumTEs()) ? nullptr : objp->getTE(te_offset);
- F32 min_scale = te ? llmin(fabsf(te->getScaleS()), fabsf(te->getScaleT())) : 1.f;
- min_scale = llclamp(min_scale * min_scale, texture_scale_min(), texture_scale_max());
- vsize /= min_scale;
-
- // if bias is > 2, apply to on-screen textures as well
- bool apply_bias = LLViewerTexture::sDesiredDiscardBias > 2.f;
-
- // apply bias to off screen objects or objects that are small on screen all the time
- if (!in_frustum || !face->getDrawable()->isVisible() || face->getImportanceToCamera() < bias_unimportant_threshold)
- { // further reduce by discard bias when off screen or occluded
- apply_bias = true;
- }
+ LLFace* face = (*(imagep->getFaceList(i)))[fi];
- if (apply_bias)
+ if (face && face->getViewerObject())
{
- F32 bias = powf(4, LLViewerTexture::sDesiredDiscardBias - 1.f);
- bias = (F32) llround(bias);
- vsize /= bias;
+ ++face_count;
+ F32 radius;
+ F32 cos_angle_to_view_dir;
+ static LLCachedControl<F32> bias_unimportant_threshold(gSavedSettings, "TextureBiasUnimportantFactor", 0.25f);
+
+ if ((gFrameCount - face->mLastTextureUpdate) > 10)
+ { // only call calcPixelArea at most once every 10 frames for a given face
+ // this helps eliminate redundant calls to calcPixelArea for faces that have multiple textures
+ // assigned to them, such as is the case with GLTF materials or Blinn-Phong materials
+ face->mInFrustum = face->calcPixelArea(cos_angle_to_view_dir, radius);
+ face->mLastTextureUpdate = gFrameCount;
+ }
+
+ F32 vsize = face->getPixelArea();
+
+ on_screen = face->mInFrustum;
+
+ // Scale desired texture resolution higher or lower depending on texture scale
+ //
+ // Minimum usage examples: a 1024x1024 texture with aplhabet, runing string
+ // shows one letter at a time
+ //
+ // Maximum usage examples: huge chunk of terrain repeats texture
+ // TODO: make this work with the GLTF texture transforms
+ S32 te_offset = face->getTEOffset(); // offset is -1 if not inited
+ LLViewerObject* objp = face->getViewerObject();
+ const LLTextureEntry* te = (te_offset < 0 || te_offset >= objp->getNumTEs()) ? nullptr : objp->getTE(te_offset);
+ F32 min_scale = te ? llmin(fabsf(te->getScaleS()), fabsf(te->getScaleT())) : 1.f;
+ min_scale = llclamp(min_scale * min_scale, texture_scale_min(), texture_scale_max());
+ vsize /= min_scale;
+
+ // apply bias to offscreen faces all the time, but only to onscreen faces when bias is large
+ if (!face->mInFrustum || LLViewerTexture::sDesiredDiscardBias > 2.f)
+ {
+ vsize /= bias;
+ }
+
+ max_vsize = llmax(max_vsize, vsize);
}
-
- max_vsize = llmax(max_vsize, vsize);
}
}
- }
- if (imagep->getType() == LLViewerTexture::LOD_TEXTURE && imagep->getBoostLevel() == LLViewerTexture::BOOST_NONE)
- { // conditionally reset max virtual size for unboosted LOD_TEXTURES
- // this is an alternative to decaying mMaxVirtualSize over time
- // that keeps textures from continously downrezzing and uprezzing in the background
-
- if (LLViewerTexture::sDesiredDiscardBias > 2.f ||
- (!on_screen && LLViewerTexture::sDesiredDiscardBias > 1.f))
- {
- imagep->mMaxVirtualSize = 0.f;
+ if (face_count > 1024)
+ { // this texture is used in so many places we should just boost it and not bother checking its vsize
+ // this is especially important because the above is not time sliced and can hit multiple ms for a single texture
+ imagep->setBoostLevel(LLViewerFetchedTexture::BOOST_HIGH);
}
- }
+ if (imagep->getType() == LLViewerTexture::LOD_TEXTURE && imagep->getBoostLevel() == LLViewerTexture::BOOST_NONE)
+ { // conditionally reset max virtual size for unboosted LOD_TEXTURES
+ // this is an alternative to decaying mMaxVirtualSize over time
+ // that keeps textures from continously downrezzing and uprezzing in the background
+
+ if (LLViewerTexture::sDesiredDiscardBias > 2.f ||
+ (!on_screen && LLViewerTexture::sDesiredDiscardBias > 1.f))
+ {
+ imagep->mMaxVirtualSize = 0.f;
+ }
+ }
- imagep->addTextureStats(max_vsize);
+ imagep->addTextureStats(max_vsize);
+ }
#if 0
imagep->setDebugText(llformat("%d/%d - %d/%d -- %d/%d",
diff --git a/indra/newview/llvoicevisualizer.cpp b/indra/newview/llvoicevisualizer.cpp
index 305fd77126..9412136272 100644
--- a/indra/newview/llvoicevisualizer.cpp
+++ b/indra/newview/llvoicevisualizer.cpp
@@ -342,6 +342,8 @@ void LLVoiceVisualizer::render()
return;
}
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
+
if ( mSoundSymbol.mActive )
{
mPreviousTime = mCurrentTime;
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index dcaf85b894..b7738b9135 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -3219,6 +3219,7 @@ void LLVOVolume::updateSpotLightPriority()
{
return;
}
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME;
F32 r = getLightRadius();
LLVector3 pos = mDrawable->getPositionAgent();
diff --git a/indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml b/indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml
index 1500c96b8d..787b2f8be4 100644
--- a/indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml
+++ b/indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml
@@ -50,7 +50,7 @@
layout="topleft"
name="label"
left="15"
- top="5"
+ top="8"
width="105">
Day Cycle Name:
</text>