From 0d9c23372bf8b34387b7d9de89234d3e9a5fd879 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 9 Jun 2022 14:09:33 -0500 Subject: SL-17551 Add "Select Reflection Probes" menu option and make invisible objects less annoying when alt-zooming in edit mode. --- indra/newview/llviewerobjectlist.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 0e585f13fc..593f593a0f 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -1838,6 +1838,8 @@ void LLViewerObjectList::renderObjectBounds(const LLVector3 ¢er) void LLViewerObjectList::generatePickList(LLCamera &camera) { + llassert(false); +#if 0 //deprecated LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; LLViewerObject *objectp; @@ -1961,10 +1963,13 @@ void LLViewerObjectList::generatePickList(LLCamera &camera) LLHUDIcon::generatePickIDs(i * step, step); } +#endif } LLViewerObject *LLViewerObjectList::getSelectedObject(const U32 object_id) { + llassert(false); +#if 0 std::set::iterator pick_it; for (pick_it = mSelectPickList.begin(); pick_it != mSelectPickList.end(); ++pick_it) { @@ -1973,6 +1978,7 @@ LLViewerObject *LLViewerObjectList::getSelectedObject(const U32 object_id) return (*pick_it); } } +#endif return NULL; } -- cgit v1.2.3 From bc85cc300d32c543ab80204a9b2fcf54b4b11935 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 9 Jun 2022 14:26:23 -0500 Subject: SL-17551 Followup -- remove some dead pick-render related code. --- indra/newview/llviewerobjectlist.cpp | 173 +---------------------------------- 1 file changed, 1 insertion(+), 172 deletions(-) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 593f593a0f..47a996d894 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -1339,38 +1339,13 @@ void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp) } // Don't clean up mObject references, these will be cleaned up more efficiently later! - // Also, not cleaned up - removeDrawable(objectp->mDrawable); - + if(new_dead_object) { mNumDeadObjects++; } } -void LLViewerObjectList::removeDrawable(LLDrawable* drawablep) -{ - LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE; - - if (!drawablep) - { - return; - } - - for (S32 i = 0; i < drawablep->getNumFaces(); i++) - { - LLFace* facep = drawablep->getFace(i) ; - if(facep) - { - LLViewerObject* objectp = facep->getViewerObject(); - if(objectp) - { - mSelectPickList.erase(objectp); - } - } - } -} - BOOL LLViewerObjectList::killObject(LLViewerObject *objectp) { // Don't ever kill gAgentAvatarp, just force it to the agent's region @@ -1836,152 +1811,6 @@ void LLViewerObjectList::renderObjectBounds(const LLVector3 ¢er) { } -void LLViewerObjectList::generatePickList(LLCamera &camera) -{ - llassert(false); -#if 0 //deprecated - LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; - - LLViewerObject *objectp; - S32 i; - // Reset all of the GL names to zero. - for (vobj_list_t::iterator iter = mObjects.begin(); iter != mObjects.end(); ++iter) - { - (*iter)->mGLName = 0; - } - - mSelectPickList.clear(); - - std::vector pick_drawables; - - for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin(); - iter != LLWorld::getInstance()->getRegionList().end(); ++iter) - { - LLViewerRegion* region = *iter; - for (U32 i = 0; i < LLViewerRegion::NUM_PARTITIONS; i++) - { - LLSpatialPartition* part = region->getSpatialPartition(i); - if (part) - { - part->cull(camera, &pick_drawables, TRUE); - } - } - } - - for (std::vector::iterator iter = pick_drawables.begin(); - iter != pick_drawables.end(); iter++) - { - LLDrawable* drawablep = *iter; - if( !drawablep ) - continue; - - LLViewerObject* last_objectp = NULL; - for (S32 face_num = 0; face_num < drawablep->getNumFaces(); face_num++) - { - LLFace * facep = drawablep->getFace(face_num); - if (!facep) continue; - - LLViewerObject* objectp = facep->getViewerObject(); - - if (objectp && objectp != last_objectp) - { - mSelectPickList.insert(objectp); - last_objectp = objectp; - } - } - } - - LLHUDNameTag::addPickable(mSelectPickList); - - for (std::vector::iterator iter = LLCharacter::sInstances.begin(); - iter != LLCharacter::sInstances.end(); ++iter) - { - objectp = (LLVOAvatar*) *iter; - if (!objectp->isDead()) - { - if (objectp->mDrawable.notNull() && objectp->mDrawable->isVisible()) - { - mSelectPickList.insert(objectp); - } - } - } - - // add all hud objects to pick list - if (isAgentAvatarValid()) - { - for (LLVOAvatar::attachment_map_t::iterator iter = gAgentAvatarp->mAttachmentPoints.begin(); - iter != gAgentAvatarp->mAttachmentPoints.end(); ) - { - LLVOAvatar::attachment_map_t::iterator curiter = iter++; - LLViewerJointAttachment* attachment = curiter->second; - if (attachment->getIsHUDAttachment()) - { - for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attachment_iter = attachment->mAttachedObjects.begin(); - attachment_iter != attachment->mAttachedObjects.end(); - ++attachment_iter) - { - if (LLViewerObject* attached_object = attachment_iter->get()) - { - mSelectPickList.insert(attached_object); - LLViewerObject::const_child_list_t& child_list = attached_object->getChildren(); - for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin(); - iter != child_list.end(); iter++) - { - LLViewerObject* childp = *iter; - if (childp) - { - mSelectPickList.insert(childp); - } - } - } - } - } - } - } - - S32 num_pickables = (S32)mSelectPickList.size() + LLHUDIcon::getNumInstances(); - - if (num_pickables != 0) - { - S32 step = (0x000fffff - GL_NAME_INDEX_OFFSET) / num_pickables; - - std::set::iterator pick_it; - i = 0; - for (pick_it = mSelectPickList.begin(); pick_it != mSelectPickList.end();) - { - LLViewerObject* objp = (*pick_it); - if (!objp || objp->isDead() || !objp->mbCanSelect) - { - mSelectPickList.erase(pick_it++); - continue; - } - - objp->mGLName = (i * step) + GL_NAME_INDEX_OFFSET; - i++; - ++pick_it; - } - - LLHUDIcon::generatePickIDs(i * step, step); - } -#endif -} - -LLViewerObject *LLViewerObjectList::getSelectedObject(const U32 object_id) -{ - llassert(false); -#if 0 - std::set::iterator pick_it; - for (pick_it = mSelectPickList.begin(); pick_it != mSelectPickList.end(); ++pick_it) - { - if ((*pick_it)->mGLName == object_id) - { - return (*pick_it); - } - } -#endif - return NULL; -} - void LLViewerObjectList::addDebugBeacon(const LLVector3 &pos_agent, const std::string &string, const LLColor4 &color, -- cgit v1.2.3 From 8a19c8e073e6f34dc1579ed7ab2ac64f567a1793 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 11 Nov 2022 15:19:41 -0600 Subject: SL-18615 Fix for beacons not rendering and beacon highlights flickering. --- indra/newview/llviewerobjectlist.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 768b4f425b..955979e605 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -1812,12 +1812,15 @@ void LLViewerObjectList::renderObjectBounds(const LLVector3 ¢er) { } +extern BOOL gCubeSnapshot; + void LLViewerObjectList::addDebugBeacon(const LLVector3 &pos_agent, const std::string &string, const LLColor4 &color, const LLColor4 &text_color, S32 line_width) { + llassert(!gCubeSnapshot); LLDebugBeacon beacon; beacon.mPositionAgent = pos_agent; beacon.mString = string; -- cgit v1.2.3 From b5db671f7c28eb2a9f9974df1c34cf8c025fb8cc Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 29 Nov 2022 09:15:02 -0600 Subject: SL-18682 WIP -- Add debug settings that aid in emulating low end hardware. --- indra/newview/llviewerobjectlist.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 955979e605..dc0785f990 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -789,7 +789,7 @@ void LLViewerObjectList::updateApparentAngles(LLAgent &agent) max_value = llmin((S32) mObjects.size(), mCurLazyUpdateIndex + num_updates); } - +#if 0 // Slam priorities for textures that we care about (hovered, selected, and focused) // Hovered // Assumes only one level deep of parenting @@ -820,6 +820,7 @@ void LLViewerObjectList::updateApparentAngles(LLAgent &agent) } } func; LLSelectMgr::getInstance()->getSelection()->applyToRootObjects(&func); +#endif // Iterate through some of the objects and lazy update their texture priorities for (i = mCurLazyUpdateIndex; i < max_value; i++) -- cgit v1.2.3 From e46323b0b9fea77522ee4637a82e2e86de15bb83 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 29 Nov 2022 10:50:25 -0600 Subject: SL-18682 WIP -- Clear BOOST_SELECTED as needed. GL 3.2 compatibility pass. Fix for stack underflow when reflection probes disabled. --- indra/newview/llviewerobjectlist.cpp | 54 ++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 27 deletions(-) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index dc0785f990..816fa6607e 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -789,7 +789,33 @@ void LLViewerObjectList::updateApparentAngles(LLAgent &agent) max_value = llmin((S32) mObjects.size(), mCurLazyUpdateIndex + num_updates); } -#if 0 + // Iterate through some of the objects and lazy update their texture priorities + for (i = mCurLazyUpdateIndex; i < max_value; i++) + { + objectp = mObjects[i]; + if (!objectp->isDead()) + { + num_objects++; + + // Update distance & gpw + objectp->setPixelAreaAndAngle(agent); // Also sets the approx. pixel area + objectp->updateTextures(); // Update the image levels of textures for this object. + } + } + + mCurLazyUpdateIndex = max_value; + if (mCurLazyUpdateIndex == mObjects.size()) + { + // restart + mCurLazyUpdateIndex = 0; + mCurBin = 0; // keep in sync with index (mObjects.size() could have changed) + } + else + { + mCurBin = (mCurBin + 1) % NUM_BINS; + } + +#if 1 // Slam priorities for textures that we care about (hovered, selected, and focused) // Hovered // Assumes only one level deep of parenting @@ -822,32 +848,6 @@ void LLViewerObjectList::updateApparentAngles(LLAgent &agent) LLSelectMgr::getInstance()->getSelection()->applyToRootObjects(&func); #endif - // Iterate through some of the objects and lazy update their texture priorities - for (i = mCurLazyUpdateIndex; i < max_value; i++) - { - objectp = mObjects[i]; - if (!objectp->isDead()) - { - num_objects++; - - // Update distance & gpw - objectp->setPixelAreaAndAngle(agent); // Also sets the approx. pixel area - objectp->updateTextures(); // Update the image levels of textures for this object. - } - } - - mCurLazyUpdateIndex = max_value; - if (mCurLazyUpdateIndex == mObjects.size()) - { - // restart - mCurLazyUpdateIndex = 0; - mCurBin = 0; // keep in sync with index (mObjects.size() could have changed) - } - else - { - mCurBin = (mCurBin + 1) % NUM_BINS; - } - LLVOAvatar::cullAvatarsByPixelArea(); } -- cgit v1.2.3 From 25ede8638209fac8dde5b71bece4bc1dfa30ea16 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 10 Mar 2023 10:52:35 -0600 Subject: SL-19172 Texture streaming tune up. Incidental decruft. --- indra/newview/llviewerobjectlist.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 816fa6607e..bb22d90cd9 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -815,19 +815,19 @@ void LLViewerObjectList::updateApparentAngles(LLAgent &agent) mCurBin = (mCurBin + 1) % NUM_BINS; } -#if 1 +#if 0 // Slam priorities for textures that we care about (hovered, selected, and focused) // Hovered // Assumes only one level deep of parenting LLSelectNode* nodep = LLSelectMgr::instance().getHoverNode(); - if (nodep) - { - objectp = nodep->getObject(); - if (objectp) - { - objectp->boostTexturePriority(); - } - } + if (nodep) + { + objectp = nodep->getObject(); + if (objectp) + { + objectp->boostTexturePriority(); + } + } // Focused objectp = gAgentCamera.getFocusObject(); @@ -835,6 +835,7 @@ void LLViewerObjectList::updateApparentAngles(LLAgent &agent) { objectp->boostTexturePriority(); } +#endif // Selected struct f : public LLSelectedObjectFunctor @@ -846,7 +847,6 @@ void LLViewerObjectList::updateApparentAngles(LLAgent &agent) } } func; LLSelectMgr::getInstance()->getSelection()->applyToRootObjects(&func); -#endif LLVOAvatar::cullAvatarsByPixelArea(); } -- cgit v1.2.3 From 6f5f16e0319bde183534a779839299dca7fe50ab Mon Sep 17 00:00:00 2001 From: RunitaiLinden Date: Wed, 17 May 2023 13:40:33 -0500 Subject: SL-19655 Remove concept of "low priority" updates (RenderDebugGLSession assertion stomping pass). Remove a couple unused debug settings and related code. --- indra/newview/llviewerobjectlist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index ea2a955ab1..e576784db8 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -2075,7 +2075,7 @@ void LLViewerObjectList::findOrphans(LLViewerObject* objectp, U32 ip, U32 port) // Make the drawable visible again and set the drawable parent childp->mDrawable->clearState(LLDrawable::FORCE_INVISIBLE); childp->setDrawableParent(objectp->mDrawable); // LLViewerObjectList::findOrphans() - gPipeline.markRebuild( childp->mDrawable, LLDrawable::REBUILD_ALL, TRUE ); + gPipeline.markRebuild( childp->mDrawable, LLDrawable::REBUILD_ALL); } // Make certain particles, icon and HUD aren't hidden -- cgit v1.2.3 From 21b67896e9d1d181f39b8e44b9efe2b4c153d22b Mon Sep 17 00:00:00 2001 From: RunitaiLinden Date: Mon, 26 Jun 2023 15:37:18 -0500 Subject: SL-19909 Fix for reflection probes on vehicles blocking mouse clicks. Incidental instrumentation and decruft. --- indra/newview/llviewerobjectlist.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index e576784db8..ce4f9b7e64 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -1353,6 +1353,7 @@ void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp) BOOL LLViewerObjectList::killObject(LLViewerObject *objectp) { + LL_PROFILE_ZONE_SCOPED; // Don't ever kill gAgentAvatarp, just force it to the agent's region // unless region is NULL which is assumed to mean you are logging out. if ((objectp == gAgentAvatarp) && gAgent.getRegion()) @@ -1379,6 +1380,7 @@ BOOL LLViewerObjectList::killObject(LLViewerObject *objectp) void LLViewerObjectList::killObjects(LLViewerRegion *regionp) { + LL_PROFILE_ZONE_SCOPED; LLViewerObject *objectp; @@ -1438,6 +1440,8 @@ void LLViewerObjectList::cleanDeadObjects(BOOL use_timer) return; } + LL_PROFILE_ZONE_SCOPED; + S32 num_removed = 0; LLViewerObject *objectp; -- cgit v1.2.3