summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/lldrawable.cpp6
-rw-r--r--indra/newview/lldrawpoolavatar.cpp132
-rw-r--r--indra/newview/lldrawpoolbump.cpp11
-rw-r--r--indra/newview/lldrawpoolwlsky.cpp6
-rwxr-xr-xindra/newview/llface.cpp9
-rw-r--r--indra/newview/llfloaterhardwaresettings.cpp4
-rw-r--r--indra/newview/llfloaterwebcontent.cpp2
-rw-r--r--indra/newview/llfloaterwebcontent.h5
-rw-r--r--indra/newview/llmaniptranslate.cpp3
-rw-r--r--indra/newview/llmediactrl.cpp2
-rw-r--r--indra/newview/llmediactrl.h3
-rwxr-xr-xindra/newview/llmeshrepository.cpp24
-rw-r--r--indra/newview/llnamelistctrl.h3
-rw-r--r--indra/newview/lltoast.cpp2
-rw-r--r--indra/newview/lltoast.h3
-rw-r--r--indra/newview/llviewershadermgr.cpp29
-rw-r--r--indra/newview/llviewershadermgr.h2
-rw-r--r--indra/newview/llviewertexturelist.cpp14
-rw-r--r--indra/newview/llviewertexturelist.h2
-rw-r--r--indra/newview/llvovolume.cpp15
-rw-r--r--indra/newview/llwaterparamset.h15
-rw-r--r--indra/newview/llwlparamset.cpp55
-rw-r--r--indra/newview/llwlparamset.h9
-rw-r--r--indra/newview/pipeline.cpp91
-rw-r--r--indra/newview/tests/llagentaccess_test.cpp2
-rw-r--r--indra/newview/tests/lllogininstance_test.cpp2
-rw-r--r--indra/newview/tests/llremoteparcelrequest_test.cpp2
-rw-r--r--indra/newview/tests/llsecapi_test.cpp2
-rw-r--r--indra/newview/tests/llsechandler_basic_test.cpp2
-rw-r--r--indra/newview/tests/llslurl_test.cpp2
-rw-r--r--indra/newview/tests/lltranslate_test.cpp2
-rw-r--r--indra/newview/tests/llviewerhelputil_test.cpp2
-rw-r--r--indra/newview/tests/llviewernetwork_test.cpp2
-rw-r--r--indra/newview/tests/llworldmipmap_test.cpp2
34 files changed, 283 insertions, 184 deletions
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index d046b22133..d29181a3ce 100644
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -577,6 +577,12 @@ F32 LLDrawable::updateXform(BOOL undamped)
mVObjp->dirtySpatialGroup();
}
}
+ else if (!isRoot()
+ && ( dist_vec_squared(old_pos, target_pos) > 0.f
+ || (1.f - dot(old_rot, target_rot)) > 0.f))
+ { // update child prims moved from LSL
+ gPipeline.markRebuild(this, LLDrawable::REBUILD_POSITION, TRUE);
+ }
else if (!getVOVolume() && !isAvatar())
{
movePartition();
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index c3cf744222..d5afa25c9c 100644
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -1165,85 +1165,85 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
{ //render rigged attachments
if (!avatarp->isVisuallyMuted())
{
- if (pass == 3)
- {
- if (is_deferred_render)
- {
- renderDeferredRiggedSimple(avatarp);
- }
- else
- {
- renderRiggedSimple(avatarp);
- }
- }
+ if (pass == 3)
+ {
+ if (is_deferred_render)
+ {
+ renderDeferredRiggedSimple(avatarp);
+ }
+ else
+ {
+ renderRiggedSimple(avatarp);
+ }
+ }
else if (pass == 4)
- {
- if (is_deferred_render)
- {
- renderDeferredRiggedBump(avatarp);
- }
- else
- {
- renderRiggedFullbright(avatarp);
- }
- }
+ {
+ if (is_deferred_render)
+ {
+ renderDeferredRiggedBump(avatarp);
+ }
+ else
+ {
+ renderRiggedFullbright(avatarp);
+ }
+ }
else if (pass == 5)
- {
- renderRiggedShinySimple(avatarp);
- }
+ {
+ renderRiggedShinySimple(avatarp);
+ }
else if (pass == 6)
- {
- renderRiggedFullbrightShiny(avatarp);
- }
+ {
+ renderRiggedFullbrightShiny(avatarp);
+ }
else if (pass >= 7 && pass < 9)
- {
- if (pass == 7)
- {
- renderRiggedAlpha(avatarp);
- }
+ {
+ if (pass == 7)
+ {
+ renderRiggedAlpha(avatarp);
+ }
else if (pass == 8)
- {
- renderRiggedFullbrightAlpha(avatarp);
- }
- }
+ {
+ renderRiggedFullbrightAlpha(avatarp);
+ }
+ }
else if (pass == 9)
- {
- renderRiggedGlow(avatarp);
- }
+ {
+ renderRiggedGlow(avatarp);
+ }
}
}
else
{
- if ((sShaderLevel >= SHADER_LEVEL_CLOTH))
- {
- LLMatrix4 rot_mat;
- LLViewerCamera::getInstance()->getMatrixToLocal(rot_mat);
- LLMatrix4 cfr(OGL_TO_CFR_ROTATION);
- rot_mat *= cfr;
+ if ((sShaderLevel >= SHADER_LEVEL_CLOTH))
+ {
+ LLMatrix4 rot_mat;
+ LLViewerCamera::getInstance()->getMatrixToLocal(rot_mat);
+ LLMatrix4 cfr(OGL_TO_CFR_ROTATION);
+ rot_mat *= cfr;
- LLVector4 wind;
- wind.setVec(avatarp->mWindVec);
- wind.mV[VW] = 0;
- wind = wind * rot_mat;
- wind.mV[VW] = avatarp->mWindVec.mV[VW];
-
- sVertexProgram->uniform4fv(LLViewerShaderMgr::AVATAR_WIND, 1, wind.mV);
- F32 phase = -1.f * (avatarp->mRipplePhase);
-
- F32 freq = 7.f + (noise1(avatarp->mRipplePhase) * 2.f);
- LLVector4 sin_params(freq, freq, freq, phase);
- sVertexProgram->uniform4fv(LLViewerShaderMgr::AVATAR_SINWAVE, 1, sin_params.mV);
-
- LLVector4 gravity(0.f, 0.f, -CLOTHING_GRAVITY_EFFECT, 0.f);
- gravity = gravity * rot_mat;
- sVertexProgram->uniform4fv(LLViewerShaderMgr::AVATAR_GRAVITY, 1, gravity.mV);
- }
+ LLVector4 wind;
+ wind.setVec(avatarp->mWindVec);
+ wind.mV[VW] = 0;
+ wind = wind * rot_mat;
+ wind.mV[VW] = avatarp->mWindVec.mV[VW];
- if( !single_avatar || (avatarp == single_avatar) )
- {
- avatarp->renderSkinned(AVATAR_RENDER_PASS_SINGLE);
- }
+ sVertexProgram->uniform4fv(LLViewerShaderMgr::AVATAR_WIND, 1, wind.mV);
+ F32 phase = -1.f * (avatarp->mRipplePhase);
+
+ F32 freq = 7.f + (noise1(avatarp->mRipplePhase) * 2.f);
+ LLVector4 sin_params(freq, freq, freq, phase);
+ sVertexProgram->uniform4fv(LLViewerShaderMgr::AVATAR_SINWAVE, 1, sin_params.mV);
+
+ LLVector4 gravity(0.f, 0.f, -CLOTHING_GRAVITY_EFFECT, 0.f);
+ gravity = gravity * rot_mat;
+ sVertexProgram->uniform4fv(LLViewerShaderMgr::AVATAR_GRAVITY, 1, gravity.mV);
}
+
+ if( !single_avatar || (avatarp == single_avatar) )
+ {
+ avatarp->renderSkinned(AVATAR_RENDER_PASS_SINGLE);
+ }
+}
}
void LLDrawPoolAvatar::getRiggedGeometry(LLFace* face, LLPointer<LLVertexBuffer>& buffer, U32 data_mask, const LLMeshSkinInfo* skin, LLVolume* volume, const LLVolumeFace& vol_face)
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp
index 5a4f9591f7..7e95046479 100644
--- a/indra/newview/lldrawpoolbump.cpp
+++ b/indra/newview/lldrawpoolbump.cpp
@@ -1370,9 +1370,14 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI
LLGLDisable blend(GL_BLEND);
gGL.setColorMask(TRUE, TRUE);
gNormalMapGenProgram.bind();
- gNormalMapGenProgram.uniform1f("norm_scale", gSavedSettings.getF32("RenderNormalMapScale"));
- gNormalMapGenProgram.uniform1f("stepX", 1.f/bump->getWidth());
- gNormalMapGenProgram.uniform1f("stepY", 1.f/bump->getHeight());
+
+ static LLStaticHashedString sNormScale("norm_scale");
+ static LLStaticHashedString sStepX("stepX");
+ static LLStaticHashedString sStepY("stepY");
+
+ gNormalMapGenProgram.uniform1f(sNormScale, gSavedSettings.getF32("RenderNormalMapScale"));
+ gNormalMapGenProgram.uniform1f(sStepX, 1.f/bump->getWidth());
+ gNormalMapGenProgram.uniform1f(sStepY, 1.f/bump->getHeight());
LLVector2 v((F32) bump->getWidth()/gPipeline.mScreen.getWidth(),
(F32) bump->getHeight()/gPipeline.mScreen.getHeight());
diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp
index b5faff7968..b0e69aa9b5 100644
--- a/indra/newview/lldrawpoolwlsky.cpp
+++ b/indra/newview/lldrawpoolwlsky.cpp
@@ -152,7 +152,8 @@ void LLDrawPoolWLSky::renderDome(F32 camHeightLocal, LLGLSLShader * shader) cons
gGL.translatef(0.f,-camHeightLocal, 0.f);
// Draw WL Sky
- shader->uniform3f("camPosLocal", 0.f, camHeightLocal, 0.f);
+ static LLStaticHashedString sCamPosLocal("camPosLocal");
+ shader->uniform3f(sCamPosLocal, 0.f, camHeightLocal, 0.f);
gSky.mVOWLSkyp->drawDome();
@@ -207,7 +208,8 @@ void LLDrawPoolWLSky::renderStars(void) const
if (LLGLSLShader::sNoFixedFunction)
{
gCustomAlphaProgram.bind();
- gCustomAlphaProgram.uniform1f("custom_alpha", star_alpha.mV[3]);
+ static LLStaticHashedString sCustomAlpha("custom_alpha");
+ gCustomAlphaProgram.uniform1f(sCustomAlpha, star_alpha.mV[3]);
}
else
{
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index ef91a459e7..86e5f20812 100755
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -57,6 +57,9 @@ extern BOOL gGLDebugLoggingEnabled;
#define LL_MAX_INDICES_COUNT 1000000
+static LLStaticHashedString sTextureIndexIn("texture_index_in");
+static LLStaticHashedString sColorIn("color_in");
+
BOOL LLFace::sSafeRenderSelect = TRUE; // FALSE
#define DOTVEC(a,b) (a.mV[0]*b.mV[0] + a.mV[1]*b.mV[1] + a.mV[2]*b.mV[2])
@@ -1438,7 +1441,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
vp[2] = 0;
vp[3] = 0;
- gTransformPositionProgram.uniform1i("texture_index_in", val);
+ gTransformPositionProgram.uniform1i(sTextureIndexIn, val);
glBeginTransformFeedback(GL_POINTS);
buff->setBuffer(LLVertexBuffer::MAP_VERTEX);
@@ -1456,7 +1459,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
S32 val = *((S32*) color.mV);
- gTransformColorProgram.uniform1i("color_in", val);
+ gTransformColorProgram.uniform1i(sColorIn, val);
glBeginTransformFeedback(GL_POINTS);
buff->setBuffer(LLVertexBuffer::MAP_VERTEX);
push_for_transform(buff, vf.mNumVertices, mGeomCount);
@@ -1477,7 +1480,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
(glow << 16) |
(glow << 24);
- gTransformColorProgram.uniform1i("color_in", glow32);
+ gTransformColorProgram.uniform1i(sColorIn, glow32);
glBeginTransformFeedback(GL_POINTS);
buff->setBuffer(LLVertexBuffer::MAP_VERTEX);
push_for_transform(buff, vf.mNumVertices, mGeomCount);
diff --git a/indra/newview/llfloaterhardwaresettings.cpp b/indra/newview/llfloaterhardwaresettings.cpp
index 116bd241c4..664f7d4fd6 100644
--- a/indra/newview/llfloaterhardwaresettings.cpp
+++ b/indra/newview/llfloaterhardwaresettings.cpp
@@ -89,8 +89,10 @@ void LLFloaterHardwareSettings::refresh()
void LLFloaterHardwareSettings::refreshEnabledState()
{
+ F32 mem_multiplier = gSavedSettings.getF32("RenderTextureMemoryMultiple");
+
S32 min_tex_mem = LLViewerTextureList::getMinVideoRamSetting();
- S32 max_tex_mem = LLViewerTextureList::getMaxVideoRamSetting();
+ S32 max_tex_mem = LLViewerTextureList::getMaxVideoRamSetting(false, mem_multiplier);
getChild<LLSliderCtrl>("GraphicsCardTextureMemory")->setMinValue(min_tex_mem);
getChild<LLSliderCtrl>("GraphicsCardTextureMemory")->setMaxValue(max_tex_mem);
diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp
index 3fe2518de6..94c3f4149c 100644
--- a/indra/newview/llfloaterwebcontent.cpp
+++ b/indra/newview/llfloaterwebcontent.cpp
@@ -54,7 +54,7 @@ LLFloaterWebContent::_Params::_Params()
LLFloaterWebContent::LLFloaterWebContent( const Params& params )
: LLFloater( params ),
- LLInstanceTracker<LLFloaterWebContent, std::string>(params.id()),
+ INSTANCE_TRACKER_KEYED(LLFloaterWebContent, std::string)(params.id()),
mWebBrowser(NULL),
mAddressCombo(NULL),
mSecureLockIcon(NULL),
diff --git a/indra/newview/llfloaterwebcontent.h b/indra/newview/llfloaterwebcontent.h
index cfc87e9015..409c15fb0b 100644
--- a/indra/newview/llfloaterwebcontent.h
+++ b/indra/newview/llfloaterwebcontent.h
@@ -40,10 +40,11 @@ class LLIconCtrl;
class LLFloaterWebContent :
public LLFloater,
public LLViewerMediaObserver,
- public LLInstanceTracker<LLFloaterWebContent, std::string>
+ public INSTANCE_TRACKER_KEYED(LLFloaterWebContent, std::string)
{
public:
- typedef LLInstanceTracker<LLFloaterWebContent, std::string> instance_tracker_t;
+
+ typedef INSTANCE_TRACKER_KEYED(LLFloaterWebContent, std::string) instance_tracker_t;
LOG_CLASS(LLFloaterWebContent);
struct _Params : public LLInitParam::Block<_Params>
diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp
index 362308c176..0228807dc8 100644
--- a/indra/newview/llmaniptranslate.cpp
+++ b/indra/newview/llmaniptranslate.cpp
@@ -1698,7 +1698,8 @@ void LLManipTranslate::highlightIntersection(LLVector3 normal,
gGL.getModelviewMatrix().inverse().mult_vec_matrix(plane);
- gClipProgram.uniform4fv("clip_plane", 1, plane.v);
+ static LLStaticHashedString sClipPlane("clip_plane");
+ gClipProgram.uniform4fv(sClipPlane, 1, plane.v);
BOOL particles = gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_PARTICLES);
BOOL clouds = gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_CLOUDS);
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp
index 99b4707158..48730f0f20 100644
--- a/indra/newview/llmediactrl.cpp
+++ b/indra/newview/llmediactrl.cpp
@@ -81,7 +81,7 @@ LLMediaCtrl::Params::Params()
LLMediaCtrl::LLMediaCtrl( const Params& p) :
LLPanel( p ),
- LLInstanceTracker<LLMediaCtrl, LLUUID>(LLUUID::generateNewID()),
+ INSTANCE_TRACKER_KEYED(LLMediaCtrl, LLUUID)(LLUUID::generateNewID()),
mTextureDepthBytes( 4 ),
mBorder(NULL),
mFrequentUpdates( true ),
diff --git a/indra/newview/llmediactrl.h b/indra/newview/llmediactrl.h
index 7f2a5e1642..4fed21bf22 100644
--- a/indra/newview/llmediactrl.h
+++ b/indra/newview/llmediactrl.h
@@ -42,10 +42,11 @@ class LLMediaCtrl :
public LLPanel,
public LLViewerMediaObserver,
public LLViewerMediaEventEmitter,
- public LLInstanceTracker<LLMediaCtrl, LLUUID>
+ public INSTANCE_TRACKER_KEYED(LLMediaCtrl, LLUUID)
{
LOG_CLASS(LLMediaCtrl);
public:
+
struct Params : public LLInitParam::Block<Params, LLPanel::Params>
{
Optional<std::string> start_url;
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index ae48898e82..306f29f703 100755
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -1918,7 +1918,7 @@ void LLMeshLODResponder::completedRaw(U32 status, const std::string& reason,
if (data_size < mRequestedBytes)
{
- if (status == 499 || status == 503)
+ if (status == HTTP_INTERNAL_ERROR || status == HTTP_SERVICE_UNAVAILABLE)
{ //timeout or service unavailable, try again
llwarns << "Timeout or service unavailable, retrying." << llendl;
LLMeshRepository::sHTTPRetryCount++;
@@ -1926,7 +1926,7 @@ void LLMeshLODResponder::completedRaw(U32 status, const std::string& reason,
}
else
{
- llassert(status == 499 || status == 503); //intentionally trigger a breakpoint
+ llassert(status == HTTP_INTERNAL_ERROR || status == HTTP_SERVICE_UNAVAILABLE); //intentionally trigger a breakpoint
llwarns << "Unhandled status " << status << llendl;
}
return;
@@ -1982,7 +1982,7 @@ void LLMeshSkinInfoResponder::completedRaw(U32 status, const std::string& reason
if (data_size < mRequestedBytes)
{
- if (status == 499 || status == 503)
+ if (status == HTTP_INTERNAL_ERROR || status == HTTP_SERVICE_UNAVAILABLE)
{ //timeout or service unavailable, try again
llwarns << "Timeout or service unavailable, retrying." << llendl;
LLMeshRepository::sHTTPRetryCount++;
@@ -1990,7 +1990,7 @@ void LLMeshSkinInfoResponder::completedRaw(U32 status, const std::string& reason
}
else
{
- llassert(status == 499 || status == 503); //intentionally trigger a breakpoint
+ llassert(status == HTTP_INTERNAL_ERROR || status == HTTP_SERVICE_UNAVAILABLE); //intentionally trigger a breakpoint
llwarns << "Unhandled status " << status << llendl;
}
return;
@@ -2045,7 +2045,7 @@ void LLMeshDecompositionResponder::completedRaw(U32 status, const std::string& r
if (data_size < mRequestedBytes)
{
- if (status == 499 || status == 503)
+ if (status == HTTP_INTERNAL_ERROR || status == HTTP_SERVICE_UNAVAILABLE)
{ //timeout or service unavailable, try again
llwarns << "Timeout or service unavailable, retrying." << llendl;
LLMeshRepository::sHTTPRetryCount++;
@@ -2053,7 +2053,7 @@ void LLMeshDecompositionResponder::completedRaw(U32 status, const std::string& r
}
else
{
- llassert(status == 499 || status == 503); //intentionally trigger a breakpoint
+ llassert(status == HTTP_INTERNAL_ERROR || status == HTTP_SERVICE_UNAVAILABLE); //intentionally trigger a breakpoint
llwarns << "Unhandled status " << status << llendl;
}
return;
@@ -2109,7 +2109,7 @@ void LLMeshPhysicsShapeResponder::completedRaw(U32 status, const std::string& re
if (data_size < mRequestedBytes)
{
- if (status == 499 || status == 503)
+ if (status == HTTP_INTERNAL_ERROR || status == HTTP_SERVICE_UNAVAILABLE)
{ //timeout or service unavailable, try again
llwarns << "Timeout or service unavailable, retrying." << llendl;
LLMeshRepository::sHTTPRetryCount++;
@@ -2117,7 +2117,7 @@ void LLMeshPhysicsShapeResponder::completedRaw(U32 status, const std::string& re
}
else
{
- llassert(status == 499 || status == 503); //intentionally trigger a breakpoint
+ llassert(status == HTTP_INTERNAL_ERROR || status == HTTP_SERVICE_UNAVAILABLE); //intentionally trigger a breakpoint
llwarns << "Unhandled status " << status << llendl;
}
return;
@@ -2170,16 +2170,16 @@ void LLMeshHeaderResponder::completedRaw(U32 status, const std::string& reason,
// << "Header responder failed with status: "
// << status << ": " << reason << llendl;
- // 503 (service unavailable) or 499 (timeout)
+ // 503 (service unavailable) or 499 (internal Linden-generated error)
// can be due to server load and can be retried
// TODO*: Add maximum retry logic, exponential backoff
// and (somewhat more optional than the others) retries
// again after some set period of time
- llassert(status == 503 || status == 499);
+ llassert(status == HTTP_SERVICE_UNAVAILABLE || status == HTTP_REQUEST_TIME_OUT || status == HTTP_INTERNAL_ERROR);
- if (status == 503 || status == 499)
+ if (status == HTTP_SERVICE_UNAVAILABLE || status == HTTP_REQUEST_TIME_OUT || status == HTTP_INTERNAL_ERROR)
{ //retry
llwarns << "Timeout or service unavailable, retrying." << llendl;
LLMeshRepository::sHTTPRetryCount++;
@@ -2191,7 +2191,7 @@ void LLMeshHeaderResponder::completedRaw(U32 status, const std::string& reason,
}
else
{
- llwarns << "Unhandled status." << llendl;
+ llwarns << "Unhandled status: " << status << llendl;
}
}
diff --git a/indra/newview/llnamelistctrl.h b/indra/newview/llnamelistctrl.h
index 09c3d49fe7..103806a1bd 100644
--- a/indra/newview/llnamelistctrl.h
+++ b/indra/newview/llnamelistctrl.h
@@ -64,9 +64,10 @@ private:
class LLNameListCtrl
-: public LLScrollListCtrl, public LLInstanceTracker<LLNameListCtrl>
+: public LLScrollListCtrl, public INSTANCE_TRACKER(LLNameListCtrl)
{
public:
+
typedef enum e_name_type
{
INDIVIDUAL,
diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp
index 9dfb29b905..49debe67f6 100644
--- a/indra/newview/lltoast.cpp
+++ b/indra/newview/lltoast.cpp
@@ -572,7 +572,7 @@ S32 LLToast::notifyParent(const LLSD& info)
//static
void LLToast::updateClass()
{
- for (LLInstanceTracker<LLToast>::instance_iter iter = LLInstanceTracker<LLToast>::beginInstances(); iter != LLInstanceTracker<LLToast>::endInstances(); )
+ for (INSTANCE_TRACKER(LLToast)::instance_iter iter = INSTANCE_TRACKER(LLToast)::beginInstances(); iter != INSTANCE_TRACKER(LLToast)::endInstances(); )
{
LLToast& toast = *iter++;
diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h
index e1d99b1bcb..8f77e7b78b 100644
--- a/indra/newview/lltoast.h
+++ b/indra/newview/lltoast.h
@@ -69,10 +69,11 @@ private :
* Represents toast pop-up.
* This is a parent view for all toast panels.
*/
-class LLToast : public LLModalDialog, public LLInstanceTracker<LLToast>
+class LLToast : public LLModalDialog, public INSTANCE_TRACKER(LLToast)
{
friend class LLToastLifeTimer;
public:
+
typedef boost::function<void (LLToast* toast)> toast_callback_t;
typedef boost::signals2::signal<void (LLToast* toast)> toast_signal_t;
typedef boost::signals2::signal<void (LLToast* toast, bool mouse_enter)> toast_hover_check_signal_t;
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index c7677759af..7d7889845d 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -52,6 +52,13 @@
#define UNIFORM_ERRS LL_ERRS("Shader")
#endif
+static LLStaticHashedString sTexture0("texture0");
+static LLStaticHashedString sTexture1("texture1");
+static LLStaticHashedString sTex0("tex0");
+static LLStaticHashedString sTex1("tex1");
+static LLStaticHashedString sGlowMap("glowMap");
+static LLStaticHashedString sScreenMap("screenMap");
+
// Lots of STL stuff in here, using namespace std to keep things more readable
using std::vector;
using std::pair;
@@ -2049,8 +2056,8 @@ BOOL LLViewerShaderMgr::loadShadersObject()
if (success)
{ //lldrawpoolbump assumes "texture0" has channel 0 and "texture1" has channel 1
gObjectBumpProgram.bind();
- gObjectBumpProgram.uniform1i("texture0", 0);
- gObjectBumpProgram.uniform1i("texture1", 1);
+ gObjectBumpProgram.uniform1i(sTexture0, 0);
+ gObjectBumpProgram.uniform1i(sTexture1, 1);
gObjectBumpProgram.unbind();
}
}
@@ -2609,7 +2616,7 @@ BOOL LLViewerShaderMgr::loadShadersInterface()
if (success)
{
gSplatTextureRectProgram.bind();
- gSplatTextureRectProgram.uniform1i("screenMap", 0);
+ gSplatTextureRectProgram.uniform1i(sScreenMap, 0);
gSplatTextureRectProgram.unbind();
}
}
@@ -2625,8 +2632,8 @@ BOOL LLViewerShaderMgr::loadShadersInterface()
if (success)
{
gGlowCombineProgram.bind();
- gGlowCombineProgram.uniform1i("glowMap", 0);
- gGlowCombineProgram.uniform1i("screenMap", 1);
+ gGlowCombineProgram.uniform1i(sGlowMap, 0);
+ gGlowCombineProgram.uniform1i(sScreenMap, 1);
gGlowCombineProgram.unbind();
}
}
@@ -2642,8 +2649,8 @@ BOOL LLViewerShaderMgr::loadShadersInterface()
if (success)
{
gGlowCombineFXAAProgram.bind();
- gGlowCombineFXAAProgram.uniform1i("glowMap", 0);
- gGlowCombineFXAAProgram.uniform1i("screenMap", 1);
+ gGlowCombineFXAAProgram.uniform1i(sGlowMap, 0);
+ gGlowCombineFXAAProgram.uniform1i(sScreenMap, 1);
gGlowCombineFXAAProgram.unbind();
}
}
@@ -2660,8 +2667,8 @@ BOOL LLViewerShaderMgr::loadShadersInterface()
if (success)
{
gTwoTextureAddProgram.bind();
- gTwoTextureAddProgram.uniform1i("tex0", 0);
- gTwoTextureAddProgram.uniform1i("tex1", 1);
+ gTwoTextureAddProgram.uniform1i(sTex0, 0);
+ gTwoTextureAddProgram.uniform1i(sTex1, 1);
}
}
@@ -2676,7 +2683,7 @@ BOOL LLViewerShaderMgr::loadShadersInterface()
if (success)
{
gOneTextureNoColorProgram.bind();
- gOneTextureNoColorProgram.uniform1i("tex0", 0);
+ gOneTextureNoColorProgram.uniform1i(sTex0, 0);
}
}
@@ -2691,7 +2698,7 @@ BOOL LLViewerShaderMgr::loadShadersInterface()
if (success)
{
gSolidColorProgram.bind();
- gSolidColorProgram.uniform1i("tex0", 0);
+ gSolidColorProgram.uniform1i(sTex0, 0);
gSolidColorProgram.unbind();
}
}
diff --git a/indra/newview/llviewershadermgr.h b/indra/newview/llviewershadermgr.h
index b8552d2d95..dd1325277c 100644
--- a/indra/newview/llviewershadermgr.h
+++ b/indra/newview/llviewershadermgr.h
@@ -127,6 +127,8 @@ public:
/* virtual */ void updateShaderUniforms(LLGLSLShader * shader);
private:
+
+ UniformVec mShinyUniforms;
// the list of shaders we need to propagate parameters to.
std::vector<LLGLSLShader *> mShaderList;
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index b9f5c432d0..82d990cf97 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -1191,7 +1191,7 @@ S32 LLViewerTextureList::getMinVideoRamSetting()
//static
// Returns max setting for TextureMemory (in MB)
-S32 LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended)
+S32 LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended, float mem_multiplier)
{
S32 max_texmem;
if (gGLManager.mVRAM != 0)
@@ -1235,7 +1235,10 @@ S32 LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended)
max_texmem = llmin(max_texmem, (S32)(system_ram/2));
else
max_texmem = llmin(max_texmem, (S32)(system_ram));
-
+
+ // limit the texture memory to a multiple of the default if we've found some cards to behave poorly otherwise
+ max_texmem = llmin(max_texmem, (S32) (mem_multiplier * (F32) max_texmem));
+
max_texmem = llclamp(max_texmem, getMinVideoRamSetting(), MAX_VIDEO_RAM_IN_MEGA_BYTES);
return max_texmem;
@@ -1248,7 +1251,7 @@ void LLViewerTextureList::updateMaxResidentTexMem(S32 mem)
// Initialize the image pipeline VRAM settings
S32 cur_mem = gSavedSettings.getS32("TextureMemory");
F32 mem_multiplier = gSavedSettings.getF32("RenderTextureMemoryMultiple");
- S32 default_mem = getMaxVideoRamSetting(true); // recommended default
+ S32 default_mem = getMaxVideoRamSetting(true, mem_multiplier); // recommended default
if (mem == 0)
{
mem = cur_mem > 0 ? cur_mem : default_mem;
@@ -1258,10 +1261,7 @@ void LLViewerTextureList::updateMaxResidentTexMem(S32 mem)
mem = default_mem;
}
- // limit the texture memory to a multiple of the default if we've found some cards to behave poorly otherwise
- mem = llmin(mem, (S32) (mem_multiplier * (F32) default_mem));
-
- mem = llclamp(mem, getMinVideoRamSetting(), getMaxVideoRamSetting());
+ mem = llclamp(mem, getMinVideoRamSetting(), getMaxVideoRamSetting(false, mem_multiplier));
if (mem != cur_mem)
{
gSavedSettings.setS32("TextureMemory", mem);
diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h
index 3dda973d3f..88dea4448b 100644
--- a/indra/newview/llviewertexturelist.h
+++ b/indra/newview/llviewertexturelist.h
@@ -114,7 +114,7 @@ public:
void setDebugFetching(LLViewerFetchedTexture* tex, S32 debug_level);
static S32 getMinVideoRamSetting();
- static S32 getMaxVideoRamSetting(bool get_recommended = false);
+ static S32 getMaxVideoRamSetting(bool get_recommended, float mem_multiplier);
private:
void updateImagesDecodePriorities();
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index b0f23fca42..7adf18b6d0 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -3846,10 +3846,13 @@ void LLRiggedVolume::update(const LLMeshSkinInfo* skin, LLVOAvatar* avatar, cons
}
//build matrix palette
- LLMatrix4a mp[64];
+ static const size_t kMaxJoints = 64;
+
+ LLMatrix4a mp[kMaxJoints];
LLMatrix4* mat = (LLMatrix4*) mp;
- for (U32 j = 0; j < skin->mJointNames.size(); ++j)
+ U32 maxJoints = llmin(skin->mJointNames.size(), kMaxJoints);
+ for (U32 j = 0; j < maxJoints; ++j)
{
LLJoint* joint = avatar->getJoint(skin->mJointNames[j]);
if (joint)
@@ -3904,8 +3907,10 @@ void LLRiggedVolume::update(const LLMeshSkinInfo* skin, LLVOAvatar* avatar, cons
F32 w = wght[k];
LLMatrix4a src;
- src.setMul(mp[idx[k]], w);
-
+ // Insure ref'd bone is in our clamped array of mats
+ llassert(idx[k] < kMaxJoints);
+ // clamp k to kMaxJoints to avoid reading garbage off stack in release
+ src.setMul(mp[idx[(k < kMaxJoints) ? k : 0]], w);
final_mat.add(src);
}
@@ -5042,8 +5047,8 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
flexi = flexi || facep->getViewerObject()->getVolume()->isUnique();
}
+ }
}
- }
if (flexi && buffer_usage && buffer_usage != GL_STREAM_DRAW_ARB)
diff --git a/indra/newview/llwaterparamset.h b/indra/newview/llwaterparamset.h
index b28585af59..368cb0ccba 100644
--- a/indra/newview/llwaterparamset.h
+++ b/indra/newview/llwaterparamset.h
@@ -33,6 +33,7 @@
#include "v4math.h"
#include "v4color.h"
#include "llviewershadermgr.h"
+#include "llstringtable.h"
class LLWaterParamSet;
@@ -47,6 +48,9 @@ public:
private:
LLSD mParamValues;
+ std::vector<LLStaticHashedString> mParamHashedNames;
+
+ void updateHashedNames();
public:
@@ -140,6 +144,17 @@ inline void LLWaterParamSet::setAll(const LLSD& val)
mParamValues[mIt->first] = mIt->second;
}
}
+ updateHashedNames();
+}
+
+inline void LLWaterParamSet::updateHashedNames()
+{
+ mParamHashedNames.clear();
+ // Iterate through values
+ for(LLSD::map_iterator iter = mParamValues.beginMap(); iter != mParamValues.endMap(); ++iter)
+ {
+ mParamHashedNames.push_back(LLStaticHashedString(iter->first));
+ }
}
inline const LLSD& LLWaterParamSet::getAll()
diff --git a/indra/newview/llwlparamset.cpp b/indra/newview/llwlparamset.cpp
index b04d30db55..745cdae441 100644
--- a/indra/newview/llwlparamset.cpp
+++ b/indra/newview/llwlparamset.cpp
@@ -38,6 +38,22 @@
#include <sstream>
+static LLStaticHashedString sStarBrightness("star_brightness");
+static LLStaticHashedString sPresetNum("preset_num");
+static LLStaticHashedString sSunAngle("sun_angle");
+static LLStaticHashedString sEastAngle("east_angle");
+static LLStaticHashedString sEnableCloudScroll("enable_cloud_scroll");
+static LLStaticHashedString sCloudScrollRate("cloud_scroll_rate");
+static LLStaticHashedString sLightNorm("lightnorm");
+static LLStaticHashedString sCloudDensity("cloud_pos_density1");
+static LLStaticHashedString sCloudScale("cloud_scale");
+static LLStaticHashedString sCloudShadow("cloud_shadow");
+static LLStaticHashedString sDensityMultiplier("density_multiplier");
+static LLStaticHashedString sDistanceMultiplier("distance_multiplier");
+static LLStaticHashedString sHazeDensity("haze_density");
+static LLStaticHashedString sHazeHorizon("haze_horizon");
+static LLStaticHashedString sMaxY("max_y");
+
LLWLParamSet::LLWLParamSet(void) :
mName("Unnamed Preset"),
mCloudScrollXOffset(0.f), mCloudScrollYOffset(0.f)
@@ -48,21 +64,24 @@ static LLFastTimer::DeclareTimer FTM_WL_PARAM_UPDATE("WL Param Update");
void LLWLParamSet::update(LLGLSLShader * shader) const
{
LLFastTimer t(FTM_WL_PARAM_UPDATE);
-
- for(LLSD::map_const_iterator i = mParamValues.beginMap();
- i != mParamValues.endMap();
- ++i)
+ LLSD::map_const_iterator i = mParamValues.beginMap();
+ std::vector<LLStaticHashedString>::const_iterator n = mParamHashedNames.begin();
+ for(;(i != mParamValues.endMap()) && (n != mParamHashedNames.end());++i, n++)
{
- const std::string& param = i->first;
+ const LLStaticHashedString& param = *n;
- if (param == "star_brightness" || param == "preset_num" || param == "sun_angle" ||
- param == "east_angle" || param == "enable_cloud_scroll" ||
- param == "cloud_scroll_rate" || param == "lightnorm" )
+ // check that our pre-hashed names are still tracking the mParamValues map correctly
+ //
+ llassert(param.String() == i->first);
+
+ if (param == sStarBrightness || param == sPresetNum || param == sSunAngle ||
+ param == sEastAngle || param == sEnableCloudScroll ||
+ param == sCloudScrollRate || param == sLightNorm )
{
continue;
}
- if (param == "cloud_pos_density1")
+ if (param == sCloudDensity)
{
LLVector4 val;
val.mV[0] = F32(i->second[0].asReal()) + mCloudScrollXOffset;
@@ -74,10 +93,10 @@ void LLWLParamSet::update(LLGLSLShader * shader) const
shader->uniform4fv(param, 1, val.mV);
stop_glerror();
}
- else if (param == "cloud_scale" || param == "cloud_shadow" ||
- param == "density_multiplier" || param == "distance_multiplier" ||
- param == "haze_density" || param == "haze_horizon" ||
- param == "max_y" )
+ else if (param == sCloudScale || param == sCloudShadow ||
+ param == sDensityMultiplier || param == sDistanceMultiplier ||
+ param == sHazeDensity || param == sHazeHorizon ||
+ param == sMaxY )
{
F32 val = (F32) i->second[0].asReal();
@@ -378,3 +397,13 @@ void LLWLParamSet::updateCloudScrolling(void)
mCloudScrollYOffset += F32(delta_t * (getCloudScrollY() - 10.f) / 100.f);
}
}
+
+void LLWLParamSet::updateHashedNames()
+{
+ mParamHashedNames.clear();
+ // Iterate through values
+ for(LLSD::map_iterator iter = mParamValues.beginMap(); iter != mParamValues.endMap(); ++iter)
+ {
+ mParamHashedNames.push_back(LLStaticHashedString(iter->first));
+ }
+} \ No newline at end of file
diff --git a/indra/newview/llwlparamset.h b/indra/newview/llwlparamset.h
index b087119dd5..3e9f77ba6c 100644
--- a/indra/newview/llwlparamset.h
+++ b/indra/newview/llwlparamset.h
@@ -29,9 +29,11 @@
#include <string>
#include <map>
+#include <vector>
#include "v4math.h"
#include "v4color.h"
+#include "llstaticstringtable.h"
class LLWLParamSet;
class LLGLSLShader;
@@ -47,9 +49,12 @@ public:
private:
LLSD mParamValues;
-
+ std::vector<LLStaticHashedString> mParamHashedNames;
+
float mCloudScrollXOffset, mCloudScrollYOffset;
+ void updateHashedNames();
+
public:
LLWLParamSet();
@@ -177,6 +182,8 @@ inline void LLWLParamSet::setAll(const LLSD& val)
if(val.isMap()) {
mParamValues = val;
}
+
+ updateHashedNames();
}
inline const LLSD& LLWLParamSet::getAll()
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index d9771af254..54a62a858a 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -253,6 +253,17 @@ LLFastTimer::DeclareTimer FTM_RENDER_DEFERRED("Deferred Shading");
static LLFastTimer::DeclareTimer FTM_STATESORT_DRAWABLE("Sort Drawables");
static LLFastTimer::DeclareTimer FTM_STATESORT_POSTSORT("Post Sort");
+static LLStaticHashedString sTint("tint");
+static LLStaticHashedString sAmbiance("ambiance");
+static LLStaticHashedString sAlphaScale("alpha_scale");
+static LLStaticHashedString sNormMat("norm_mat");
+static LLStaticHashedString sOffset("offset");
+static LLStaticHashedString sScreenRes("screenRes");
+static LLStaticHashedString sDelta("delta");
+static LLStaticHashedString sDistFactor("dist_factor");
+static LLStaticHashedString sKern("kern");
+static LLStaticHashedString sKernScale("kern_scale");
+
//----------------------------------------
std::string gPoolNames[] =
{
@@ -4621,9 +4632,9 @@ void LLPipeline::renderDebug()
if (LLGLSLShader::sNoFixedFunction)
{
gPathfindingProgram.bind();
- gPathfindingProgram.uniform1f("tint", 1.f);
- gPathfindingProgram.uniform1f("ambiance", 1.f);
- gPathfindingProgram.uniform1f("alpha_scale", 1.f);
+ gPathfindingProgram.uniform1f(sTint, 1.f);
+ gPathfindingProgram.uniform1f(sAmbiance, 1.f);
+ gPathfindingProgram.uniform1f(sAlphaScale, 1.f);
}
//Requried character physics capsule render parameters
@@ -4640,7 +4651,7 @@ void LLPipeline::renderDebug()
llPathingLibInstance->renderSimpleShapeCapsuleID( gGL, id, pos, rot );
gGL.setColorMask(true, false);
LLGLEnable blend(GL_BLEND);
- gPathfindingProgram.uniform1f("alpha_scale", 0.90f);
+ gPathfindingProgram.uniform1f(sAlphaScale, 0.90f);
llPathingLibInstance->renderSimpleShapeCapsuleID( gGL, id, pos, rot );
gPathfindingProgram.bind();
}
@@ -4667,9 +4678,9 @@ void LLPipeline::renderDebug()
{
gPathfindingProgram.bind();
- gPathfindingProgram.uniform1f("tint", 1.f);
- gPathfindingProgram.uniform1f("ambiance", ambiance);
- gPathfindingProgram.uniform1f("alpha_scale", 1.f);
+ gPathfindingProgram.uniform1f(sTint, 1.f);
+ gPathfindingProgram.uniform1f(sAmbiance, ambiance);
+ gPathfindingProgram.uniform1f(sAlphaScale, 1.f);
}
if ( !pathfindingConsole->isRenderWorld() )
@@ -4693,7 +4704,7 @@ void LLPipeline::renderDebug()
if ( pathfindingConsole->isRenderWorld() )
{
LLGLEnable blend(GL_BLEND);
- gPathfindingProgram.uniform1f("alpha_scale", 0.66f);
+ gPathfindingProgram.uniform1f(sAlphaScale, 0.66f);
llPathingLibInstance->renderNavMesh();
}
else
@@ -4705,8 +4716,8 @@ void LLPipeline::renderDebug()
if (LLGLSLShader::sNoFixedFunction)
{
gPathfindingNoNormalsProgram.bind();
- gPathfindingNoNormalsProgram.uniform1f("tint", 1.f);
- gPathfindingNoNormalsProgram.uniform1f("alpha_scale", 1.f);
+ gPathfindingNoNormalsProgram.uniform1f(sTint, 1.f);
+ gPathfindingNoNormalsProgram.uniform1f(sAlphaScale, 1.f);
llPathingLibInstance->renderNavMeshEdges();
gPathfindingProgram.bind();
}
@@ -4746,7 +4757,7 @@ void LLPipeline::renderDebug()
gGL.setColorMask(true, false);
//render the bookends
LLGLEnable blend(GL_BLEND);
- gPathfindingProgram.uniform1f("alpha_scale", 0.90f);
+ gPathfindingProgram.uniform1f(sAlphaScale, 0.90f);
llPathingLibInstance->renderPathBookend( gGL, LLPathingLib::LLPL_START );
llPathingLibInstance->renderPathBookend( gGL, LLPathingLib::LLPL_END );
gPathfindingProgram.bind();
@@ -4764,7 +4775,7 @@ void LLPipeline::renderDebug()
if (LLGLSLShader::sNoFixedFunction)
{
LLGLEnable blend(GL_BLEND);
- gPathfindingProgram.uniform1f("alpha_scale", 0.90f);
+ gPathfindingProgram.uniform1f(sAlphaScale, 0.90f);
llPathingLibInstance->renderSimpleShapes( gGL, gAgent.getRegion()->getWaterHeight() );
}
else
@@ -4812,7 +4823,7 @@ void LLPipeline::renderDebug()
LLGLEnable blend(GL_BLEND);
{
- gPathfindingProgram.uniform1f("ambiance", ambiance);
+ gPathfindingProgram.uniform1f(sAmbiance, ambiance);
{ //draw solid overlay
LLGLDepthTest depth(GL_TRUE, GL_FALSE, GL_LEQUAL);
@@ -4827,8 +4838,8 @@ void LLPipeline::renderDebug()
if (pathfindingConsole->isRenderXRay())
{
- gPathfindingProgram.uniform1f("tint", gSavedSettings.getF32("PathfindingXRayTint"));
- gPathfindingProgram.uniform1f("alpha_scale", gSavedSettings.getF32("PathfindingXRayOpacity"));
+ gPathfindingProgram.uniform1f(sTint, gSavedSettings.getF32("PathfindingXRayTint"));
+ gPathfindingProgram.uniform1f(sAlphaScale, gSavedSettings.getF32("PathfindingXRayOpacity"));
LLGLEnable blend(GL_BLEND);
LLGLDepthTest depth(GL_TRUE, GL_FALSE, GL_GREATER);
@@ -4836,13 +4847,13 @@ void LLPipeline::renderDebug()
if (gSavedSettings.getBOOL("PathfindingXRayWireframe"))
{ //draw hidden wireframe as darker and less opaque
- gPathfindingProgram.uniform1f("ambiance", 1.f);
+ gPathfindingProgram.uniform1f(sAmbiance, 1.f);
llPathingLibInstance->renderNavMeshShapesVBO( render_order[i] );
}
else
{
glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
- gPathfindingProgram.uniform1f("ambiance", ambiance);
+ gPathfindingProgram.uniform1f(sAmbiance, ambiance);
llPathingLibInstance->renderNavMeshShapesVBO( render_order[i] );
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
}
@@ -4850,9 +4861,9 @@ void LLPipeline::renderDebug()
{ //draw visible wireframe as brighter, thicker and more opaque
glPolygonOffset(offset, offset);
- gPathfindingProgram.uniform1f("ambiance", 1.f);
- gPathfindingProgram.uniform1f("tint", 1.f);
- gPathfindingProgram.uniform1f("alpha_scale", 1.f);
+ gPathfindingProgram.uniform1f(sAmbiance, 1.f);
+ gPathfindingProgram.uniform1f(sTint, 1.f);
+ gPathfindingProgram.uniform1f(sAlphaScale, 1.f);
glLineWidth(gSavedSettings.getF32("PathfindingLineWidth"));
LLGLDisable blendOut(GL_BLEND);
@@ -4884,19 +4895,19 @@ void LLPipeline::renderDebug()
glLineWidth(2.0f);
LLGLEnable cull(GL_CULL_FACE);
- gPathfindingProgram.uniform1f("tint", gSavedSettings.getF32("PathfindingXRayTint"));
- gPathfindingProgram.uniform1f("alpha_scale", gSavedSettings.getF32("PathfindingXRayOpacity"));
+ gPathfindingProgram.uniform1f(sTint, gSavedSettings.getF32("PathfindingXRayTint"));
+ gPathfindingProgram.uniform1f(sAlphaScale, gSavedSettings.getF32("PathfindingXRayOpacity"));
if (gSavedSettings.getBOOL("PathfindingXRayWireframe"))
{ //draw hidden wireframe as darker and less opaque
glPolygonMode( GL_FRONT_AND_BACK, GL_LINE );
- gPathfindingProgram.uniform1f("ambiance", 1.f);
+ gPathfindingProgram.uniform1f(sAmbiance, 1.f);
llPathingLibInstance->renderNavMesh();
glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
}
else
{
- gPathfindingProgram.uniform1f("ambiance", ambiance);
+ gPathfindingProgram.uniform1f(sAmbiance, ambiance);
llPathingLibInstance->renderNavMesh();
}
@@ -4904,8 +4915,8 @@ void LLPipeline::renderDebug()
if (LLGLSLShader::sNoFixedFunction)
{
gPathfindingNoNormalsProgram.bind();
- gPathfindingNoNormalsProgram.uniform1f("tint", gSavedSettings.getF32("PathfindingXRayTint"));
- gPathfindingNoNormalsProgram.uniform1f("alpha_scale", gSavedSettings.getF32("PathfindingXRayOpacity"));
+ gPathfindingNoNormalsProgram.uniform1f(sTint, gSavedSettings.getF32("PathfindingXRayTint"));
+ gPathfindingNoNormalsProgram.uniform1f(sAlphaScale, gSavedSettings.getF32("PathfindingXRayOpacity"));
llPathingLibInstance->renderNavMeshEdges();
gPathfindingProgram.bind();
}
@@ -7965,7 +7976,7 @@ void LLPipeline::renderDeferredLighting()
}
}
- gDeferredSunProgram.uniform3fv("offset", slice, offset);
+ gDeferredSunProgram.uniform3fv(sOffset, slice, offset);
{
LLGLDisable blend(GL_BLEND);
@@ -8009,10 +8020,10 @@ void LLPipeline::renderDeferredLighting()
x += 1.f;
}
- gDeferredBlurLightProgram.uniform2f("delta", 1.f, 0.f);
- gDeferredBlurLightProgram.uniform1f("dist_factor", dist_factor);
- gDeferredBlurLightProgram.uniform3fv("kern", kern_length, gauss[0].mV);
- gDeferredBlurLightProgram.uniform1f("kern_scale", blur_size * (kern_length/2.f - 0.5f));
+ gDeferredBlurLightProgram.uniform2f(sDelta, 1.f, 0.f);
+ gDeferredBlurLightProgram.uniform1f(sDistFactor, dist_factor);
+ gDeferredBlurLightProgram.uniform3fv(sKern, kern_length, gauss[0].mV);
+ gDeferredBlurLightProgram.uniform1f(sKernScale, blur_size * (kern_length/2.f - 0.5f));
{
LLGLDisable blend(GL_BLEND);
@@ -8029,7 +8040,7 @@ void LLPipeline::renderDeferredLighting()
mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
mDeferredLight.bindTarget();
- gDeferredBlurLightProgram.uniform2f("delta", 0.f, 1.f);
+ gDeferredBlurLightProgram.uniform2f(sDelta, 0.f, 1.f);
{
LLGLDisable blend(GL_BLEND);
@@ -10259,7 +10270,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
avatar->mImpostor.clear();
renderGeom(camera);
}
-
+
LLDrawPoolAvatar::sMinimumAlpha = old_alpha;
{ //create alpha mask based on depth buffer (grey out if muted)
@@ -10312,13 +10323,13 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
}
{
- gGL.begin(LLRender::QUADS);
- gGL.vertex3f(-1, -1, clip_plane);
- gGL.vertex3f(1, -1, clip_plane);
- gGL.vertex3f(1, 1, clip_plane);
- gGL.vertex3f(-1, 1, clip_plane);
- gGL.end();
- gGL.flush();
+ gGL.begin(LLRender::QUADS);
+ gGL.vertex3f(-1, -1, clip_plane);
+ gGL.vertex3f(1, -1, clip_plane);
+ gGL.vertex3f(1, 1, clip_plane);
+ gGL.vertex3f(-1, 1, clip_plane);
+ gGL.end();
+ gGL.flush();
}
if (LLGLSLShader::sNoFixedFunction)
diff --git a/indra/newview/tests/llagentaccess_test.cpp b/indra/newview/tests/llagentaccess_test.cpp
index 3ba25f3c10..426ad40342 100644
--- a/indra/newview/tests/llagentaccess_test.cpp
+++ b/indra/newview/tests/llagentaccess_test.cpp
@@ -40,7 +40,7 @@
static U32 test_preferred_maturity = SIM_ACCESS_PG;
LLControlGroup::LLControlGroup(const std::string& name)
- : LLInstanceTracker<LLControlGroup, std::string>(name)
+ : INSTANCE_TRACKER_KEYED(LLControlGroup, std::string)(name)
{
}
diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp
index 7705b4c567..25da5939f1 100644
--- a/indra/newview/tests/lllogininstance_test.cpp
+++ b/indra/newview/tests/lllogininstance_test.cpp
@@ -167,7 +167,7 @@ std::string LLGridManager::getAppSLURLBase(const std::string& grid_name)
LLControlGroup gSavedSettings("Global");
LLControlGroup::LLControlGroup(const std::string& name) :
- LLInstanceTracker<LLControlGroup, std::string>(name){}
+ INSTANCE_TRACKER_KEYED(LLControlGroup, std::string)(name){}
LLControlGroup::~LLControlGroup() {}
void LLControlGroup::setBOOL(const std::string& name, BOOL val) {}
BOOL LLControlGroup::getBOOL(const std::string& name) { return FALSE; }
diff --git a/indra/newview/tests/llremoteparcelrequest_test.cpp b/indra/newview/tests/llremoteparcelrequest_test.cpp
index ed66066b0a..da273132db 100644
--- a/indra/newview/tests/llremoteparcelrequest_test.cpp
+++ b/indra/newview/tests/llremoteparcelrequest_test.cpp
@@ -69,7 +69,7 @@ void LLAgent::sendReliableMessage(void) { }
LLUUID gAgentSessionID;
LLUUID gAgentID;
LLUIColor::LLUIColor(void) { }
-LLControlGroup::LLControlGroup(std::string const & name) : LLInstanceTracker<LLControlGroup, std::string>(name) { }
+LLControlGroup::LLControlGroup(std::string const & name) : INSTANCE_TRACKER_KEYED(LLControlGroup, std::string)(name) { }
LLControlGroup::~LLControlGroup(void) { }
void LLUrlEntryParcel::processParcelInfo(const LLUrlEntryParcel::LLParcelData& parcel_data) { }
diff --git a/indra/newview/tests/llsecapi_test.cpp b/indra/newview/tests/llsecapi_test.cpp
index 703603e2db..83a4149971 100644
--- a/indra/newview/tests/llsecapi_test.cpp
+++ b/indra/newview/tests/llsecapi_test.cpp
@@ -37,7 +37,7 @@
// Mock objects for the dependencies of the code we're testing
LLControlGroup::LLControlGroup(const std::string& name)
-: LLInstanceTracker<LLControlGroup, std::string>(name) {}
+: INSTANCE_TRACKER_KEYED(LLControlGroup, std::string)(name) {}
LLControlGroup::~LLControlGroup() {}
BOOL LLControlGroup::declareString(const std::string& name,
const std::string& initial_val,
diff --git a/indra/newview/tests/llsechandler_basic_test.cpp b/indra/newview/tests/llsechandler_basic_test.cpp
index 0235400976..814010028f 100644
--- a/indra/newview/tests/llsechandler_basic_test.cpp
+++ b/indra/newview/tests/llsechandler_basic_test.cpp
@@ -69,7 +69,7 @@ extern bool _cert_hostname_wildcard_match(const std::string& hostname, const std
std::string gFirstName;
std::string gLastName;
LLControlGroup::LLControlGroup(const std::string& name)
-: LLInstanceTracker<LLControlGroup, std::string>(name) {}
+: INSTANCE_TRACKER_KEYED(LLControlGroup, std::string)(name) {}
LLControlGroup::~LLControlGroup() {}
BOOL LLControlGroup::declareString(const std::string& name,
const std::string& initial_val,
diff --git a/indra/newview/tests/llslurl_test.cpp b/indra/newview/tests/llslurl_test.cpp
index 09343ef227..d7debd6c67 100644
--- a/indra/newview/tests/llslurl_test.cpp
+++ b/indra/newview/tests/llslurl_test.cpp
@@ -35,7 +35,7 @@
// Mock objects for the dependencies of the code we're testing
LLControlGroup::LLControlGroup(const std::string& name)
-: LLInstanceTracker<LLControlGroup, std::string>(name) {}
+: INSTANCE_TRACKER_KEYED(LLControlGroup, std::string)(name) {}
LLControlGroup::~LLControlGroup() {}
BOOL LLControlGroup::declareString(const std::string& name,
const std::string& initial_val,
diff --git a/indra/newview/tests/lltranslate_test.cpp b/indra/newview/tests/lltranslate_test.cpp
index fd9527d631..c13660332d 100644
--- a/indra/newview/tests/lltranslate_test.cpp
+++ b/indra/newview/tests/lltranslate_test.cpp
@@ -295,7 +295,7 @@ LLControlGroup gSavedSettings("test");
std::string LLUI::getLanguage() { return "en"; }
std::string LLTrans::getString(const std::string &xml_desc, const LLStringUtil::format_map_t& args) { return "dummy"; }
-LLControlGroup::LLControlGroup(const std::string& name) : LLInstanceTracker<LLControlGroup, std::string>(name) {}
+LLControlGroup::LLControlGroup(const std::string& name) : INSTANCE_TRACKER_KEYED(LLControlGroup, std::string)(name) {}
std::string LLControlGroup::getString(const std::string& name) { return "dummy"; }
LLControlGroup::~LLControlGroup() {}
diff --git a/indra/newview/tests/llviewerhelputil_test.cpp b/indra/newview/tests/llviewerhelputil_test.cpp
index 710881d811..102cad8852 100644
--- a/indra/newview/tests/llviewerhelputil_test.cpp
+++ b/indra/newview/tests/llviewerhelputil_test.cpp
@@ -47,7 +47,7 @@ static std::string gOS;
// Mock objects for the dependencies of the code we're testing
LLControlGroup::LLControlGroup(const std::string& name)
- : LLInstanceTracker<LLControlGroup, std::string>(name) {}
+ : INSTANCE_TRACKER_KEYED(LLControlGroup, std::string)(name) {}
LLControlGroup::~LLControlGroup() {}
BOOL LLControlGroup::declareString(const std::string& name,
const std::string& initial_val,
diff --git a/indra/newview/tests/llviewernetwork_test.cpp b/indra/newview/tests/llviewernetwork_test.cpp
index a1e97ea17e..725b5122fb 100644
--- a/indra/newview/tests/llviewernetwork_test.cpp
+++ b/indra/newview/tests/llviewernetwork_test.cpp
@@ -35,7 +35,7 @@
// Mock objects for the dependencies of the code we're testing
LLControlGroup::LLControlGroup(const std::string& name)
-: LLInstanceTracker<LLControlGroup, std::string>(name) {}
+: INSTANCE_TRACKER_KEYED(LLControlGroup, std::string)(name) {}
LLControlGroup::~LLControlGroup() {}
BOOL LLControlGroup::declareString(const std::string& name,
const std::string& initial_val,
diff --git a/indra/newview/tests/llworldmipmap_test.cpp b/indra/newview/tests/llworldmipmap_test.cpp
index e7ef017760..47453a1b1a 100644
--- a/indra/newview/tests/llworldmipmap_test.cpp
+++ b/indra/newview/tests/llworldmipmap_test.cpp
@@ -46,7 +46,7 @@ void LLViewerTexture::setBoostLevel(S32 ) { }
LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromUrl(const std::string&, BOOL, LLViewerTexture::EBoostLevel, S8,
LLGLint, LLGLenum, const LLUUID& ) { return NULL; }
-LLControlGroup::LLControlGroup(const std::string& name) : LLInstanceTracker<LLControlGroup, std::string>(name) { }
+LLControlGroup::LLControlGroup(const std::string& name) : INSTANCE_TRACKER_KEYED(LLControlGroup, std::string)(name) { }
LLControlGroup::~LLControlGroup() { }
std::string LLControlGroup::getString(const std::string& ) { return std::string("test_url"); }
LLControlGroup gSavedSettings("test_settings");