From c10494e370f6399deea835964760628b14f7e299 Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Wed, 16 Feb 2011 15:32:48 -0500 Subject: 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. --- indra/newview/llfloatertools.cpp | 3 ++- indra/newview/llvovolume.cpp | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'indra') 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("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)); } } -- cgit v1.2.3