summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNyx (Neal Orman) <nyx@lindenlab.com>2011-02-16 15:32:48 -0500
committerNyx (Neal Orman) <nyx@lindenlab.com>2011-02-16 15:32:48 -0500
commitc10494e370f6399deea835964760628b14f7e299 (patch)
tree05776da0cd18949ad50d8315d2b5d0c1e1bf542d
parent4046a9082d793e71cac26a31d44c127decd6821f (diff)
SH-997 FIX verify texture performance stats
Got some better, reproducible numbers, which puts 32x32 textures at 538 points and 1024x1024 textures at 1024 points.
-rw-r--r--indra/newview/llfloatertools.cpp3
-rw-r--r--indra/newview/llvovolume.cpp6
2 files changed, 5 insertions, 4 deletions
diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp
index ceaf3c1449..1410facb53 100644
--- a/indra/newview/llfloatertools.cpp
+++ b/indra/newview/llfloatertools.cpp
@@ -427,7 +427,8 @@ void LLFloaterTools::refresh()
if (sShowObjectCost)
{
std::string prim_cost_string;
- LLResMgr::getInstance()->getIntegerString(prim_cost_string, calcRenderCost());
+ S32 cost = LLSelectMgr::getInstance()->getSelection()->getSelectedObjectRenderCost();
+ LLResMgr::getInstance()->getIntegerString(prim_cost_string, cost);
getChild<LLUICtrl>("RenderingCost")->setTextArg("[COUNT]", prim_cost_string);
}
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 01027e6a11..7703019f99 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -2945,7 +2945,7 @@ U32 LLVOVolume::getRenderCost(texture_cost_t &textures) const
// per-prim costs
static const U32 ARC_PARTICLE_COST = 1;
static const U32 ARC_PARTICLE_MAX = 2048;
- static const U32 ARC_TEXTURE_COST = 5;
+ static const U32 ARC_TEXTURE_COST = 32;
// per-prim multipliers
static const F32 ARC_GLOW_MULT = 1.5f; // tested based on performance
@@ -3043,7 +3043,7 @@ U32 LLVOVolume::getRenderCost(texture_cost_t &textures) const
LLViewerFetchedTexture *texture = LLViewerTextureManager::getFetchedTexture(sculpt_id);
if (texture)
{
- S32 texture_cost = (S32)(ARC_TEXTURE_COST * (texture->getFullHeight() / 128.f + texture->getFullWidth() / 128.f + 1));
+ S32 texture_cost = 512 + (S32)(ARC_TEXTURE_COST * (texture->getFullHeight() / 128.f + texture->getFullWidth() / 128.f));
textures.insert(texture_cost_t::value_type(sculpt_id, texture_cost));
}
}
@@ -3075,7 +3075,7 @@ U32 LLVOVolume::getRenderCost(texture_cost_t &textures) const
{
if (textures.find(img->getID()) == textures.end())
{
- S32 texture_cost = (S32)(ARC_TEXTURE_COST * (img->getFullHeight() / 128.f + img->getFullWidth() / 128.f + 1));
+ S32 texture_cost = 512 + (S32)(ARC_TEXTURE_COST * (img->getFullHeight() / 128.f + img->getFullWidth() / 128.f));
textures.insert(texture_cost_t::value_type(img->getID(), texture_cost));
}
}