summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2024-08-28 14:49:13 -0500
committerGitHub <noreply@github.com>2024-08-28 14:49:13 -0500
commitf8d48f6a29f312724b826806fdc2f9b5ed85fd13 (patch)
tree1b38bff09f95b4e7769ecb56dc8cb3a2094f9bf0 /indra
parent6a4d7b2de622503e00ff58de6a2fc7742ff4df21 (diff)
#2432 Restore default nametag behavior. (#2444)
After instrumenting nametags some more, really UI rendering performance improvements should just focus on LLFontGL::render
Diffstat (limited to 'indra')
-rw-r--r--indra/llrender/llgl.cpp3
-rw-r--r--indra/llui/llfloater.cpp3
-rw-r--r--indra/newview/app_settings/settings.xml2
-rw-r--r--indra/newview/llhudnametag.cpp27
-rw-r--r--indra/newview/llhudnametag.h2
-rw-r--r--indra/newview/llviewerdisplay.cpp2
-rw-r--r--indra/newview/llvoicevisualizer.cpp2
7 files changed, 15 insertions, 26 deletions
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/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 1d8cae4e95..ec06582d90 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -10314,7 +10314,7 @@
<key>Type</key>
<string>S32</string>
<key>Value</key>
- <integer>2</integer>
+ <integer>1</integer>
</map>
<key>ShowAxes</key>
<map>
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/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/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;