summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/featuretable.txt3
-rw-r--r--indra/newview/featuretable_xp.txt3
-rw-r--r--indra/newview/llfloatertools.cpp11
-rw-r--r--indra/newview/llselectmgr.cpp65
-rw-r--r--indra/newview/llselectmgr.h3
-rw-r--r--indra/newview/llviewerobject.cpp54
-rw-r--r--indra/newview/llviewerobject.h13
-rw-r--r--indra/newview/llviewerobjectlist.cpp9
-rw-r--r--indra/newview/llviewerobjectlist.h2
-rw-r--r--indra/newview/skins/default/xui/en/floater_tools.xml6
10 files changed, 142 insertions, 27 deletions
diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt
index f3d6e73043..8b20086af4 100644
--- a/indra/newview/featuretable.txt
+++ b/indra/newview/featuretable.txt
@@ -1,4 +1,4 @@
-version 23
+version 24
// NOTE: This is mostly identical to featuretable_mac.txt with a few differences
// Should be combined into one table
@@ -454,6 +454,7 @@ RenderAvatarCloth 0 0
list ATI
RenderUseStreamVBO 1 0
+RenderAvatarVP 1 0
/// Tweaked NVIDIA
diff --git a/indra/newview/featuretable_xp.txt b/indra/newview/featuretable_xp.txt
index 9b901022c4..4fa3087b9d 100644
--- a/indra/newview/featuretable_xp.txt
+++ b/indra/newview/featuretable_xp.txt
@@ -1,4 +1,4 @@
-version 23
+version 24
// NOTE: This is mostly identical to featuretable_mac.txt with a few differences
// Should be combined into one table
@@ -451,6 +451,7 @@ RenderAvatarCloth 0 0
list ATI
RenderUseStreamVBO 1 0
+RenderAvatarVP 1 0
/// Tweaked NVIDIA
diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp
index 8a8177abde..e5c6fe7631 100644
--- a/indra/newview/llfloatertools.cpp
+++ b/indra/newview/llfloatertools.cpp
@@ -434,6 +434,10 @@ void LLFloaterTools::refresh()
LLSelectMgr::getInstance()->getSelection()->getSelectedObjectCost();
F32 link_cost =
LLSelectMgr::getInstance()->getSelection()->getSelectedLinksetCost();
+ F32 obj_physics_cost =
+ LLSelectMgr::getInstance()->getSelection()->getSelectedPhysicsCost();
+ F32 link_physics_cost =
+ LLSelectMgr::getInstance()->getSelection()->getSelectedLinksetPhysicsCost();
// Update the text for the counts
childSetTextArg(
@@ -443,11 +447,10 @@ void LLFloaterTools::refresh()
childSetTextArg("object_count", "[COUNT]", object_count_string);
// Update the text for the resource costs
- childSetTextArg(
- "linked_set_cost",
- "[COST]",
- llformat("%.1f", link_cost));
+ childSetTextArg("linked_set_cost","[COST]",llformat("%.1f", link_cost));
childSetTextArg("object_cost", "[COST]", llformat("%.1f", obj_cost));
+ childSetTextArg("linked_set_cost","[PHYSICS]",llformat("%.1f", link_physics_cost));
+ childSetTextArg("object_cost", "[PHYSICS]", llformat("%.1f", obj_physics_cost));
// Display rendering cost if needed
if (sShowObjectCost)
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index 57e04a43a2..f819e9fcbc 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -6230,9 +6230,13 @@ F32 LLObjectSelection::getSelectedObjectCost()
return cost;
}
-F32 LLObjectSelection::getSelectedObjectStreamingCost()
+F32 LLObjectSelection::getSelectedLinksetCost()
{
+ cleanupNodes();
F32 cost = 0.f;
+
+ std::set<LLViewerObject*> me_roots;
+
for (list_t::iterator iter = mList.begin(); iter != mList.end(); ++iter)
{
LLSelectNode* node = *iter;
@@ -6240,16 +6244,26 @@ F32 LLObjectSelection::getSelectedObjectStreamingCost()
if (object)
{
- cost += object->getStreamingCost();
+ LLViewerObject* root = static_cast<LLViewerObject*>(object->getRoot());
+ if (root)
+ {
+ if (me_roots.find(root) == me_roots.end())
+ {
+ me_roots.insert(root);
+ cost += root->getLinksetCost();
+ }
+ }
}
}
return cost;
}
-U32 LLObjectSelection::getSelectedObjectTriangleCount()
+F32 LLObjectSelection::getSelectedPhysicsCost()
{
- U32 count = 0;
+ cleanupNodes();
+ F32 cost = 0.f;
+
for (list_t::iterator iter = mList.begin(); iter != mList.end(); ++iter)
{
LLSelectNode* node = *iter;
@@ -6257,14 +6271,14 @@ U32 LLObjectSelection::getSelectedObjectTriangleCount()
if (object)
{
- count += object->getTriangleCount();
+ cost += object->getPhysicsCost();
}
}
- return count;
+ return cost;
}
-F32 LLObjectSelection::getSelectedLinksetCost()
+F32 LLObjectSelection::getSelectedLinksetPhysicsCost()
{
cleanupNodes();
F32 cost = 0.f;
@@ -6284,7 +6298,7 @@ F32 LLObjectSelection::getSelectedLinksetCost()
if (me_roots.find(root) == me_roots.end())
{
me_roots.insert(root);
- cost += root->getLinksetCost();
+ cost += root->getLinksetPhysicsCost();
}
}
}
@@ -6293,6 +6307,41 @@ F32 LLObjectSelection::getSelectedLinksetCost()
return cost;
}
+F32 LLObjectSelection::getSelectedObjectStreamingCost()
+{
+ F32 cost = 0.f;
+ for (list_t::iterator iter = mList.begin(); iter != mList.end(); ++iter)
+ {
+ LLSelectNode* node = *iter;
+ LLViewerObject* object = node->getObject();
+
+ if (object)
+ {
+ cost += object->getStreamingCost();
+ }
+ }
+
+ return cost;
+}
+
+U32 LLObjectSelection::getSelectedObjectTriangleCount()
+{
+ U32 count = 0;
+ for (list_t::iterator iter = mList.begin(); iter != mList.end(); ++iter)
+ {
+ LLSelectNode* node = *iter;
+ LLViewerObject* object = node->getObject();
+
+ if (object)
+ {
+ count += object->getTriangleCount();
+ }
+ }
+
+ return count;
+}
+
+
//-----------------------------------------------------------------------------
// getTECount()
//-----------------------------------------------------------------------------
diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h
index e598ffd47d..9a896bd5e2 100644
--- a/indra/newview/llselectmgr.h
+++ b/indra/newview/llselectmgr.h
@@ -288,6 +288,9 @@ public:
S32 getObjectCount(BOOL mesh_adjust = FALSE);
F32 getSelectedObjectCost();
F32 getSelectedLinksetCost();
+ F32 getSelectedPhysicsCost();
+ F32 getSelectedLinksetPhysicsCost();
+
F32 getSelectedObjectStreamingCost();
U32 getSelectedObjectTriangleCount();
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 9b3f81e193..dcd208fea5 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -240,6 +240,8 @@ LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRe
mClickAction(0),
mObjectCost(0.f),
mLinksetCost(0.f),
+ mPhysicsCost(0.f),
+ mLinksetPhysicsCost(0.f),
mCostStale(true),
mAttachmentItemID(LLUUID::null)
{
@@ -2931,6 +2933,28 @@ void LLViewerObject::setLinksetCost(F32 cost)
}
}
+void LLViewerObject::setPhysicsCost(F32 cost)
+{
+ mPhysicsCost = cost;
+ mCostStale = false;
+
+ if (isSelected())
+ {
+ gFloaterTools->dirty();
+ }
+}
+
+void LLViewerObject::setLinksetPhysicsCost(F32 cost)
+{
+ mLinksetPhysicsCost = cost;
+ mCostStale = false;
+
+ if (isSelected())
+ {
+ gFloaterTools->dirty();
+ }
+}
+
F32 LLViewerObject::getObjectCost()
{
@@ -2942,27 +2966,45 @@ F32 LLViewerObject::getObjectCost()
return mObjectCost;
}
-F32 LLViewerObject::getStreamingCost()
+F32 LLViewerObject::getLinksetCost()
{
- return 0.f;
+ if (mCostStale)
+ {
+ gObjectList.updateObjectCost(this);
+ }
+
+ return mLinksetCost;
}
-U32 LLViewerObject::getTriangleCount()
+F32 LLViewerObject::getPhysicsCost()
{
- return 0;
+ if (mCostStale)
+ {
+ gObjectList.updateObjectCost(this);
+ }
+
+ return mPhysicsCost;
}
-F32 LLViewerObject::getLinksetCost()
+F32 LLViewerObject::getLinksetPhysicsCost()
{
if (mCostStale)
{
gObjectList.updateObjectCost(this);
}
- return mLinksetCost;
+ return mLinksetPhysicsCost;
}
+F32 LLViewerObject::getStreamingCost()
+{
+ return 0.f;
+}
+U32 LLViewerObject::getTriangleCount()
+{
+ return 0;
+}
void LLViewerObject::updateSpatialExtents(LLVector4a& newMin, LLVector4a &newMax)
{
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index 094f01ab3d..3cc23bb085 100644
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -334,14 +334,20 @@ public:
virtual void setScale(const LLVector3 &scale, BOOL damped = FALSE);
- void setObjectCost(F32 cost);
- F32 getObjectCost();
virtual F32 getStreamingCost();
virtual U32 getTriangleCount();
+ void setObjectCost(F32 cost);
+ F32 getObjectCost();
+
void setLinksetCost(F32 cost);
F32 getLinksetCost();
+ void setPhysicsCost(F32 cost);
+ F32 getPhysicsCost();
+
+ void setLinksetPhysicsCost(F32 cost);
+ F32 getLinksetPhysicsCost();
void sendShapeUpdate();
@@ -699,6 +705,9 @@ protected:
U8 mClickAction;
F32 mObjectCost; //resource cost of this object or -1 if unknown
F32 mLinksetCost;
+ F32 mPhysicsCost;
+ F32 mLinksetPhysicsCost;
+
bool mCostStale;
static U32 sNumZombieObjects; // Objects which are dead, but not deleted
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index e6f1d8e728..97b102a6a3 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -728,7 +728,10 @@ public:
F32 object_cost =
content[iter->asString()]["resource_cost"].asReal();
- gObjectList.updateObjectCost(object_id, object_cost, link_cost);
+ F32 physics_cost = content[iter->asString()]["physics_cost"].asReal();
+ F32 link_physics_cost = content[iter->asString()]["linked_set_physics_cost"].asReal();
+
+ gObjectList.updateObjectCost(object_id, object_cost, link_cost, physics_cost, link_physics_cost);
}
else
{
@@ -1187,7 +1190,7 @@ void LLViewerObjectList::updateObjectCost(LLViewerObject* object)
mStaleObjectCost.insert(object->getID());
}
-void LLViewerObjectList::updateObjectCost(LLUUID object_id, F32 object_cost, F32 link_cost)
+void LLViewerObjectList::updateObjectCost(LLUUID object_id, F32 object_cost, F32 link_cost, F32 physics_cost, F32 link_physics_cost)
{
mPendingObjectCost.erase(object_id);
@@ -1196,6 +1199,8 @@ void LLViewerObjectList::updateObjectCost(LLUUID object_id, F32 object_cost, F32
{
object->setObjectCost(object_cost);
object->setLinksetCost(link_cost);
+ object->setPhysicsCost(physics_cost);
+ object->setLinksetPhysicsCost(link_physics_cost);
}
}
diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h
index 0f58e543ac..afa881ea58 100644
--- a/indra/newview/llviewerobjectlist.h
+++ b/indra/newview/llviewerobjectlist.h
@@ -92,7 +92,7 @@ public:
void update(LLAgent &agent, LLWorld &world);
void updateObjectCost(LLViewerObject* object);
- void updateObjectCost(LLUUID object_id, F32 object_cost, F32 link_cost);
+ void updateObjectCost(LLUUID object_id, F32 object_cost, F32 link_cost, F32 physics_cost, F32 link_physics_cost);
void onObjectCostFetchFailure(LLUUID object_id);
void shiftObjects(const LLVector3 &offset);
diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml
index 2e3349dbe8..7dca22fd5a 100644
--- a/indra/newview/skins/default/xui/en/floater_tools.xml
+++ b/indra/newview/skins/default/xui/en/floater_tools.xml
@@ -747,8 +747,9 @@
top_delta="0"
right="-10"
name="linked_set_cost"
+ tool_tip="Cost of currently selected linked sets as [prims],[physics complexity]"
width="80">
- Cost: [COST]
+ Cost: [COST] / [PHYSICS]
</text>
<text
text_color="LtGray_50"
@@ -773,8 +774,9 @@
top_delta="0"
right="-10"
name="object_cost"
+ tool_tip="Cost of currently selected objects as [prims] / [physics complexity]"
width="80">
- Cost: [COST]
+ Cost: [COST] / [PHYSICS]
</text>
<!-- <text -->
<!-- text_color="LtGray_50" -->