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/llvovolume.cpp | 168 +++++++------------------------------------ 1 file changed, 25 insertions(+), 143 deletions(-) (limited to 'indra/newview/llvovolume.cpp') diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index aa60578cee..7c7b91eae8 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -410,7 +410,7 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys, if (setVolume(volume_params, 0)) { - markForUpdate(TRUE); + markForUpdate(); } } @@ -421,10 +421,7 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys, // S32 result = unpackTEMessage(mesgsys, _PREHASH_ObjectData, (S32) block_num); - if (result & teDirtyBits) - { - updateTEData(); - } + if (result & TEM_CHANGE_MEDIA) { retval |= MEDIA_FLAGS_CHANGED; @@ -446,7 +443,7 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys, if (setVolume(volume_params, 0)) { - markForUpdate(TRUE); + markForUpdate(); } S32 res2 = unpackTEMessage(*dp); if (TEM_INVALID == res2) @@ -464,10 +461,6 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys, } else { - if (res2 & teDirtyBits) - { - updateTEData(); - } if (res2 & TEM_CHANGE_MEDIA) { retval |= MEDIA_FLAGS_CHANGED; @@ -529,8 +522,7 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys, S32 result = unpackTEMessage(tdp); if (result & teDirtyBits) { - updateTEData(); - if (mDrawable) + if (mDrawable) { //on the fly TE updates break batches, isolate in octree shrinkWrap(); } @@ -755,24 +747,7 @@ void LLVOVolume::animateTextures() void LLVOVolume::updateTextures() { LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; - //const F32 TEXTURE_AREA_REFRESH_TIME = 1.f; // seconds - //if (mTextureUpdateTimer.getElapsedTimeF32() > TEXTURE_AREA_REFRESH_TIME) - { - updateTextureVirtualSize(); - - /*if (mDrawable.notNull() && !isVisible() && !mDrawable->isActive()) - { //delete vertex buffer to free up some VRAM - LLSpatialGroup* group = mDrawable->getSpatialGroup(); - if (group && (group->mVertexBuffer.notNull() || !group->mBufferMap.empty() || !group->mDrawMap.empty())) - { - group->destroyGL(true); - - //flag the group as having changed geometry so it gets a rebuild next time - //it becomes visible - group->setState(LLSpatialGroup::GEOM_DIRTY | LLSpatialGroup::MESH_DIRTY | LLSpatialGroup::NEW_DRAWINFO); - } - }*/ - } + updateTextureVirtualSize(); } BOOL LLVOVolume::isVisible() const @@ -884,7 +859,7 @@ void LLVOVolume::updateTextureVirtualSize(bool forced) if ((vsize < MIN_TEX_ANIM_SIZE && old_size > MIN_TEX_ANIM_SIZE) || (vsize > MIN_TEX_ANIM_SIZE && old_size < MIN_TEX_ANIM_SIZE)) { - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_TCOORD, FALSE); + gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_TCOORD); } } @@ -935,7 +910,7 @@ void LLVOVolume::updateTextureVirtualSize(bool forced) (texture_discard < current_discard || //texture has more data than last rebuild current_discard < 0)) //no previous rebuild { - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, FALSE); + gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME); mSculptChanged = TRUE; } @@ -1017,7 +992,7 @@ void LLVOVolume::setScale(const LLVector3 &scale, BOOL damped) //since drawable transforms do not include scale, changing volume scale //requires an immediate rebuild of volume verts. - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_POSITION, TRUE); + gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_POSITION); if (mDrawable) { @@ -1250,7 +1225,7 @@ void LLVOVolume::updateVisualComplexity() void LLVOVolume::notifyMeshLoaded() { mSculptChanged = TRUE; - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_GEOMETRY, TRUE); + gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_GEOMETRY); LLVOAvatar *av = getAvatar(); if (av && !isAnimatedObject()) @@ -1381,7 +1356,7 @@ void LLVOVolume::sculpt() LLVOVolume* volume = (*(mSculptTexture->getVolumeList(LLRender::SCULPT_TEX)))[i]; if (volume != this && volume->getVolume() == getVolume()) { - gPipeline.markRebuild(volume->mDrawable, LLDrawable::REBUILD_GEOMETRY, FALSE); + gPipeline.markRebuild(volume->mDrawable, LLDrawable::REBUILD_GEOMETRY); } } } @@ -1619,7 +1594,7 @@ BOOL LLVOVolume::updateLOD() if (lod_changed) { - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, FALSE); + gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME); mLODChanged = TRUE; } else @@ -1648,7 +1623,7 @@ BOOL LLVOVolume::setDrawableParent(LLDrawable* parentp) if (!mDrawable->isRoot()) { // rebuild vertices in parent relative space - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, TRUE); + gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME); if (mDrawable->isActive() && !parentp->isActive()) { @@ -1700,7 +1675,7 @@ BOOL LLVOVolume::setParent(LLViewerObject* parent) if (ret && mDrawable) { gPipeline.markMoved(mDrawable); - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, TRUE); + gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME); } onReparent(old_parent, parent); } @@ -2088,7 +2063,7 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) LLSpatialGroup* group = drawable->getSpatialGroup(); if (group) { - group->dirtyMesh(); + gPipeline.markRebuild(group); } updateRelativeXform(); @@ -2105,7 +2080,7 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) if (mVolumeChanged || mFaceMappingChanged) { - dirtySpatialGroup(drawable->isState(LLDrawable::IN_REBUILD_Q1)); + dirtySpatialGroup(); bool was_regen_faces = false; should_update_octree_bounds = true; @@ -2127,7 +2102,7 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) } else if (mLODChanged || mSculptChanged || mColorChanged) { - dirtySpatialGroup(drawable->isState(LLDrawable::IN_REBUILD_Q1)); + dirtySpatialGroup(); compiled = TRUE; lodOrSculptChanged(drawable, compiled, should_update_octree_bounds); @@ -2298,7 +2273,7 @@ S32 LLVOVolume::setTEColor(const U8 te, const LLColor4& color) gPipeline.markTextured(mDrawable); //treat this alpha change as an LoD update since render batches may need to get rebuilt mLODChanged = TRUE; - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, FALSE); + gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME); } retval = LLPrimitive::setTEColor(te, color); if (mDrawable.notNull() && retval) @@ -2514,16 +2489,6 @@ S32 LLVOVolume::setTEScaleT(const U8 te, const F32 t) return res; } - -void LLVOVolume::updateTEData() -{ - /*if (mDrawable.notNull()) - { - mFaceMappingChanged = TRUE; - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_MATERIAL, TRUE); - }*/ -} - bool LLVOVolume::hasMedia() const { bool result = false; @@ -3666,7 +3631,7 @@ BOOL LLVOVolume::setIsFlexible(BOOL is_flexible) res = setVolume(volume_params, 1); if (res) { - markForUpdate(TRUE); + markForUpdate(); } } return res; @@ -3714,7 +3679,7 @@ void LLVOVolume::onSetExtendedMeshFlags(U32 flags) if (/*!getRootEdit()->isAnySelected() &&*/ mDrawable.notNull()) { // Need to trigger rebuildGeom(), which is where control avatars get created/removed - getRootEdit()->recursiveMarkForUpdate(TRUE); + getRootEdit()->recursiveMarkForUpdate(); } if (isAttachment() && getAvatarAncestor()) { @@ -4451,13 +4416,13 @@ void LLVOVolume::setSelected(BOOL sel) LLViewerObject::setSelected(sel); if (isAnimatedObject()) { - getRootEdit()->recursiveMarkForUpdate(TRUE); + getRootEdit()->recursiveMarkForUpdate(); } else { if (mDrawable.notNull()) { - markForUpdate(TRUE); + markForUpdate(); } } } @@ -4554,14 +4519,14 @@ const LLMatrix4& LLVOVolume::getWorldMatrix(LLXformMatrix* xform) const return xform->getWorldMatrix(); } -void LLVOVolume::markForUpdate(BOOL priority) +void LLVOVolume::markForUpdate() { if (mDrawable) { shrinkWrap(); } - LLViewerObject::markForUpdate(priority); + LLViewerObject::markForUpdate(); mVolumeChanged = TRUE; } @@ -5497,81 +5462,6 @@ void LLVolumeGeometryManager::getGeometry(LLSpatialGroup* group) } -void handleRenderAutoMuteByteLimitChanged(const LLSD& new_value) -{ - static LLCachedControl render_auto_mute_byte_limit(gSavedSettings, "RenderAutoMuteByteLimit", 0U); - - if (0 != render_auto_mute_byte_limit) - { - //for unload - LLSculptIDSize::container_BY_SIZE_view::iterator - itL = LLSculptIDSize::instance().getSizeInfo().get().lower_bound(render_auto_mute_byte_limit), - itU = LLSculptIDSize::instance().getSizeInfo().get().end(); - - for (; itL != itU; ++itL) - { - const LLSculptIDSize::Info &nfo = *itL; - LLVOVolume *pVVol = nfo.getPtrLLDrawable()->getVOVolume(); - if (pVVol - && !pVVol->isDead() - && pVVol->isAttachment() - && !pVVol->getAvatar()->isSelf() - && LLVOVolume::NO_LOD != pVVol->getLOD() - ) - { - //postponed - pVVol->markForUnload(); - LLSculptIDSize::instance().addToUnloaded(nfo.getSculptId()); - } - } - - //for load if it was unload - itL = LLSculptIDSize::instance().getSizeInfo().get().begin(); - itU = LLSculptIDSize::instance().getSizeInfo().get().upper_bound(render_auto_mute_byte_limit); - - for (; itL != itU; ++itL) - { - const LLSculptIDSize::Info &nfo = *itL; - LLVOVolume *pVVol = nfo.getPtrLLDrawable()->getVOVolume(); - if (pVVol - && !pVVol->isDead() - && pVVol->isAttachment() - && !pVVol->getAvatar()->isSelf() - && LLVOVolume::NO_LOD == pVVol->getLOD() - ) - { - LLSculptIDSize::instance().remFromUnloaded(nfo.getSculptId()); - pVVol->updateLOD(); - pVVol->markForUpdate(TRUE); - } - } - } - else - { - LLSculptIDSize::instance().clearUnloaded(); - - LLSculptIDSize::container_BY_SIZE_view::iterator - itL = LLSculptIDSize::instance().getSizeInfo().get().begin(), - itU = LLSculptIDSize::instance().getSizeInfo().get().end(); - - for (; itL != itU; ++itL) - { - const LLSculptIDSize::Info &nfo = *itL; - LLVOVolume *pVVol = nfo.getPtrLLDrawable()->getVOVolume(); - if (pVVol - && !pVVol->isDead() - && pVVol->isAttachment() - && !pVVol->getAvatar()->isSelf() - && LLVOVolume::NO_LOD == pVVol->getLOD() - ) - { - pVVol->updateLOD(); - pVVol->markForUpdate(TRUE); - } - } - } -} - // add a face pointer to a list of face pointers without going over MAX_COUNT faces template static inline void add_face(T*** list, U32* count, T* face) @@ -5608,7 +5498,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) if (!group->hasState(LLSpatialGroup::GEOM_DIRTY | LLSpatialGroup::ALPHA_DIRTY)) { - if (group->hasState(LLSpatialGroup::MESH_DIRTY) && !LLPipeline::sDelayVBUpdate) + if (group->hasState(LLSpatialGroup::MESH_DIRTY)) { rebuildMesh(group); } @@ -6062,7 +5952,6 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) group->mGeometryBytes = geometryBytes; - if (!LLPipeline::sDelayVBUpdate) { //drawables have been rebuilt, clear rebuild status for (LLSpatialGroup::element_iter drawable_iter = group->getDataBegin(); drawable_iter != group->getDataEnd(); ++drawable_iter) @@ -6078,12 +5967,6 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) group->mLastUpdateTime = gFrameTimeSeconds; group->mBuilt = 1.f; group->clearState(LLSpatialGroup::GEOM_DIRTY | LLSpatialGroup::ALPHA_DIRTY); - - if (LLPipeline::sDelayVBUpdate) - { - group->setState(LLSpatialGroup::MESH_DIRTY | LLSpatialGroup::NEW_DRAWINFO); - } - } void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group) @@ -6135,7 +6018,7 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group) vobj->getRelativeXform(), vobj->getRelativeXformInvTrans(), face->getGeomIndex())) { //something's gone wrong with the vertex buffer accounting, rebuild this group group->dirtyGeom(); - gPipeline.markRebuild(group, TRUE); + gPipeline.markRebuild(group); } buff->unmapBuffer(); @@ -6497,7 +6380,6 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace //for debugging, set last time face was updated vs moved facep->updateRebuildFlags(); - if (!LLPipeline::sDelayVBUpdate) { //copy face geometry into vertex buffer LLDrawable* drawablep = facep->getDrawable(); LLVOVolume* vobj = drawablep->getVOVolume(); -- cgit v1.3 From 39820e4750d5b9f661ef74ee9868df9e471c5f36 Mon Sep 17 00:00:00 2001 From: RunitaiLinden Date: Thu, 18 May 2023 18:41:53 -0500 Subject: DRTVWR-559 Fix for shower curtain not opening smoothly. Incidental decruft. --- indra/newview/lldrawable.cpp | 2 +- indra/newview/lldrawable.h | 2 +- indra/newview/llvovolume.cpp | 2 +- indra/newview/pipeline.cpp | 6 +++--- indra/newview/pipeline.h | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) (limited to 'indra/newview/llvovolume.cpp') diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index 9d1b02cd8a..6b9c159291 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -942,7 +942,7 @@ void LLDrawable::updateTexture() } } -BOOL LLDrawable::updateGeometry(BOOL priority) +BOOL LLDrawable::updateGeometry() { LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE diff --git a/indra/newview/lldrawable.h b/indra/newview/lldrawable.h index 5ab1f52439..970e8c8b2a 100644 --- a/indra/newview/lldrawable.h +++ b/indra/newview/lldrawable.h @@ -166,7 +166,7 @@ public: void updateTexture(); void updateMaterial(); virtual void updateDistance(LLCamera& camera, bool force_update); - BOOL updateGeometry(BOOL priority); + BOOL updateGeometry(); void updateFaceSize(S32 idx); void updateSpecialHoverCursor(BOOL enabled); diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 7c7b91eae8..8160785d75 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -2063,7 +2063,7 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) LLSpatialGroup* group = drawable->getSpatialGroup(); if (group) { - gPipeline.markRebuild(group); + group->dirtyMesh(); } updateRelativeXform(); diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 40112421cd..715e2a2326 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -2457,9 +2457,9 @@ void LLPipeline::doOcclusion(LLCamera& camera) } } -bool LLPipeline::updateDrawableGeom(LLDrawable* drawablep, bool priority) +bool LLPipeline::updateDrawableGeom(LLDrawable* drawablep) { - bool update_complete = drawablep->updateGeometry(priority); + bool update_complete = drawablep->updateGeometry(); if (update_complete && assertInitialized()) { drawablep->setState(LLDrawable::BUILT); @@ -2611,7 +2611,7 @@ void LLPipeline::updateGeom(F32 max_dtime) drawablep->clearState(LLDrawable::FOR_UNLOAD); } - if (updateDrawableGeom(drawablep, TRUE)) + if (updateDrawableGeom(drawablep)) { drawablep->clearState(LLDrawable::IN_REBUILD_Q); mBuildQ1.erase(curiter); diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index d42253b8d7..ed110c7b9f 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -455,7 +455,7 @@ private: void unloadShaders(); void addToQuickLookup( LLDrawPool* new_poolp ); void removeFromQuickLookup( LLDrawPool* poolp ); - bool updateDrawableGeom(LLDrawable* drawable, bool priority); + bool updateDrawableGeom(LLDrawable* drawable); void assertInitializedDoError(); bool assertInitialized() { const bool is_init = isInit(); if (!is_init) assertInitializedDoError(); return is_init; }; void connectRefreshCachedSettingsSafe(const std::string name); -- cgit v1.3