diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index fa37576b70abf05731ad1c23178ed40c880d3099..c8708ee270a5b0dbd048dee4eeb262b8c88c653d 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -11243,17 +11243,6 @@ <key>Value</key> <integer>0</integer> </map> - <key>RenderAutoMuteByteLimit</key> - <map> - <key>Comment</key> - <string>If avatar attachment size exceed this value (in bytes) attachment will not be rendered. Excludes attachments worn by own avatar.</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>U32</string> - <key>Value</key> - <integer>0</integer> - </map> <key>RenderAvatarMaxNonImpostors</key> <map> <key>Comment</key> @@ -14878,17 +14867,6 @@ <key>Value</key> <integer>1</integer> </map> - <key>RenderDelayVBUpdate</key> - <map> - <key>Comment</key> - <string>Delay vertex buffer updates until just before rendering</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>Boolean</string> - <key>Value</key> - <integer>0</integer> - </map> <key>SocialPhotoResolution</key> <map> <key>Comment</key> diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt index f8b91d716829e06238ffd221345d54d041b52922..5034d4f0cab352878ae9c68289c40973ffc2c515 100644 --- a/indra/newview/featuretable.txt +++ b/indra/newview/featuretable.txt @@ -34,7 +34,6 @@ RenderAvatarMaxNonImpostors 1 16 RenderAvatarMaxComplexity 1 350000 RenderAutoMuteSurfaceAreaLimit 1 1000.0 RenderCubeMap 1 1 -RenderDelayVBUpdate 1 0 RenderFarClip 1 256 RenderFlexTimeFactor 1 1.0 RenderFogRatio 1 4.0 diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt index dc63eb8e30ee8a92792e7d111469157b087a0f8c..f13ebecb17e3613b0fd1afb2a40e03a5852e25c8 100644 --- a/indra/newview/featuretable_mac.txt +++ b/indra/newview/featuretable_mac.txt @@ -34,7 +34,6 @@ RenderAvatarMaxNonImpostors 1 16 RenderAvatarMaxComplexity 1 350000 RenderAutoMuteSurfaceAreaLimit 1 1000.0 RenderCubeMap 1 1 -RenderDelayVBUpdate 1 0 RenderFarClip 1 256 RenderFlexTimeFactor 1 1.0 RenderFogRatio 1 4.0 diff --git a/indra/newview/llcontrolavatar.cpp b/indra/newview/llcontrolavatar.cpp index 010bd2da420d34e7c602f5aaba6efa6d95b8262c..cb3e8e355dd8bc0620159137647a9ee082181661 100644 --- a/indra/newview/llcontrolavatar.cpp +++ b/indra/newview/llcontrolavatar.cpp @@ -307,8 +307,8 @@ void LLControlAvatar::updateVolumeGeom() } } - gPipeline.markRebuild(mRootVolp->mDrawable, LLDrawable::REBUILD_ALL, TRUE); - mRootVolp->markForUpdate(TRUE); + gPipeline.markRebuild(mRootVolp->mDrawable, LLDrawable::REBUILD_ALL); + mRootVolp->markForUpdate(); // Note that attachment overrides aren't needed here, have already // been applied at the time the mControlAvatar was created, in @@ -592,7 +592,7 @@ void LLControlAvatar::updateAnimations() //if (!mRootVolp->isAnySelected()) { updateVolumeGeom(); - mRootVolp->recursiveMarkForUpdate(TRUE); + mRootVolp->recursiveMarkForUpdate(); } } diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index bbedf2f86c407981a3b769e288ab0ba360ac87b6..478fbc23ffcf9d454650f56719314b0066b8c180 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -149,7 +149,7 @@ void LLDrawable::unload() { LLVOVolume *pVVol = getVOVolume(); pVVol->setNoLOD(); - pVVol->markForUpdate(TRUE); + pVVol->markForUpdate(); } // static @@ -533,7 +533,7 @@ void LLDrawable::makeActive() if (mVObjp->getPCode() == LL_PCODE_VOLUME) { - gPipeline.markRebuild(this, LLDrawable::REBUILD_VOLUME, TRUE); + gPipeline.markRebuild(this, LLDrawable::REBUILD_VOLUME); } updatePartition(); } @@ -581,7 +581,7 @@ void LLDrawable::makeStatic(BOOL warning_enabled) if (mVObjp->getPCode() == LL_PCODE_VOLUME) { - gPipeline.markRebuild(this, LLDrawable::REBUILD_VOLUME, TRUE); + gPipeline.markRebuild(this, LLDrawable::REBUILD_VOLUME); } if (mSpatialBridge) @@ -657,7 +657,7 @@ F32 LLDrawable::updateXform(BOOL undamped) if (getVOVolume() && !isRoot()) { //child prim snapping to some position, needs a rebuild - gPipeline.markRebuild(this, LLDrawable::REBUILD_POSITION, TRUE); + gPipeline.markRebuild(this, LLDrawable::REBUILD_POSITION); } } } @@ -681,7 +681,7 @@ F32 LLDrawable::updateXform(BOOL undamped) if (vec*vec > MIN_INTERPOLATE_DISTANCE_SQUARED) { //scale change requires immediate rebuild - gPipeline.markRebuild(this, LLDrawable::REBUILD_POSITION, TRUE); + gPipeline.markRebuild(this, LLDrawable::REBUILD_POSITION); } else if (!isRoot() && (!mVObjp->getAngularVelocity().isExactlyZero() || @@ -691,7 +691,7 @@ F32 LLDrawable::updateXform(BOOL undamped) if (!isState(LLDrawable::ANIMATED_CHILD)) { setState(LLDrawable::ANIMATED_CHILD); - gPipeline.markRebuild(this, LLDrawable::REBUILD_ALL, TRUE); + gPipeline.markRebuild(this, LLDrawable::REBUILD_ALL); mVObjp->dirtySpatialGroup(); } } @@ -700,7 +700,7 @@ F32 LLDrawable::updateXform(BOOL undamped) || (1.f - dot(old_rot, target_rot)) > 0.f)) { //fix for BUG-840, MAINT-2275, MAINT-1742, MAINT-2247 mVObjp->shrinkWrap(); - gPipeline.markRebuild(this, LLDrawable::REBUILD_POSITION, TRUE); + gPipeline.markRebuild(this, LLDrawable::REBUILD_POSITION); } else if (!getVOVolume() && !isAvatar()) { @@ -811,7 +811,7 @@ void LLDrawable::updatePartition() else { //a child prim moved and needs its verts regenerated - gPipeline.markRebuild(this, LLDrawable::REBUILD_POSITION, TRUE); + gPipeline.markRebuild(this, LLDrawable::REBUILD_POSITION); } } @@ -937,7 +937,7 @@ void LLDrawable::updateTexture() if (getVOVolume()) { - gPipeline.markRebuild(this, LLDrawable::REBUILD_MATERIAL, TRUE); + gPipeline.markRebuild(this, LLDrawable::REBUILD_MATERIAL); } } @@ -980,7 +980,7 @@ void LLDrawable::shiftPos(const LLVector4a &shift_vector) if (rebuild) { - gPipeline.markRebuild(this, LLDrawable::REBUILD_ALL, TRUE); + gPipeline.markRebuild(this, LLDrawable::REBUILD_ALL); } for (S32 i = 0; i < getNumFaces(); i++) diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index af32a41ffff847ce48ff2416181d90cd9ff8d5eb..5f66d64285ab6d2974b5a25122aa38d039d0c5a9 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -219,7 +219,7 @@ void LLFace::destroy() if (group) { group->dirtyGeom(); - gPipeline.markRebuild(group, TRUE); + gPipeline.markRebuild(group); } } } @@ -258,7 +258,7 @@ void LLFace::setPool(LLFacePool* new_pool, LLViewerTexture *texturep) if (mDrawablep) { - gPipeline.markRebuild(mDrawablep, LLDrawable::REBUILD_ALL, TRUE); + gPipeline.markRebuild(mDrawablep, LLDrawable::REBUILD_ALL); } } mGeomIndex = 0; @@ -349,7 +349,7 @@ void LLFace::dirtyTexture() vobj->updateVisualComplexity(); } - gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_VOLUME, FALSE); + gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_VOLUME); } } } @@ -1192,6 +1192,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, { if (gDebugGL) { + llassert(false); LL_WARNS() << "Index buffer overflow!" << LL_ENDL; LL_WARNS() << "Indices Count: " << mIndicesCount << " VF Num Indices: " << num_indices @@ -1207,6 +1208,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, { if (gDebugGL) { + llassert(false); LL_WARNS() << "Vertex buffer overflow!" << LL_ENDL; } return FALSE; diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp index da4ba2ae8452166f1358efe82f801821ce5a5789..2ca548764809cf2448149d4ff864ff79e1674225 100644 --- a/indra/newview/llflexibleobject.cpp +++ b/indra/newview/llflexibleobject.cpp @@ -348,7 +348,7 @@ void LLVolumeImplFlexible::doIdleUpdate() if (mRenderRes == -1) { updateRenderRes(); - gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_POSITION, FALSE); + gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_POSITION); } else { @@ -361,7 +361,7 @@ void LLVolumeImplFlexible::doIdleUpdate() // MAINT-1890 Clamp the update period to ensure that the update_period is no greater than 32 frames update_period = llclamp(update_period, 1U, 32U); - // We control how fast flexies update, buy splitting updates among frames + // We control how fast flexies update, buy splitting updates among frames U64 virtual_frame_num = LLTimer::getElapsedSeconds() / SEC_PER_FLEXI_FRAME; if (visible) @@ -400,7 +400,7 @@ void LLVolumeImplFlexible::doIdleUpdate() updateRenderRes(); mVO->shrinkWrap(); - gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_POSITION, FALSE); + gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_POSITION); } } } diff --git a/indra/newview/llmanip.cpp b/indra/newview/llmanip.cpp index 83b0392d64f6cca024aefca75b739f5fcabfb802..447384fa60650f633ea4035e5d1692bfba58e2ec 100644 --- a/indra/newview/llmanip.cpp +++ b/indra/newview/llmanip.cpp @@ -73,14 +73,14 @@ void LLManip::rebuild(LLViewerObject* vobj) LLDrawable* drawablep = vobj->mDrawable; if (drawablep && drawablep->getVOVolume()) { - gPipeline.markRebuild(drawablep,LLDrawable::REBUILD_VOLUME, TRUE); + gPipeline.markRebuild(drawablep,LLDrawable::REBUILD_VOLUME); drawablep->setState(LLDrawable::MOVE_UNDAMPED); // force to UNDAMPED drawablep->updateMove(); LLSpatialGroup* group = drawablep->getSpatialGroup(); if (group) { group->dirtyGeom(); - gPipeline.markRebuild(group, TRUE); + gPipeline.markRebuild(group); } LLViewerObject::const_child_list_t& child_list = vobj->getChildren(); diff --git a/indra/newview/llsculptidsize.cpp b/indra/newview/llsculptidsize.cpp index 0c94888c01f24c4cb2f38a8e4cd99ae947756703..e4006b1fbd31ed7a667cb57dc5abb8616b76f59a 100644 --- a/indra/newview/llsculptidsize.cpp +++ b/indra/newview/llsculptidsize.cpp @@ -84,29 +84,6 @@ void LLSculptIDSize::inc(const LLDrawable *pdrawable, int sz) //trying insert the LLDrawable mSizeInfo.get<tag_BY_DRAWABLE>().insert(Info(pdrawable, sz, nfo.mSharedSizeSum, sculptId)); } - - static LLCachedControl<U32> render_auto_mute_byte_limit(gSavedSettings, "RenderAutoMuteByteLimit", 0U); - - if (0 != render_auto_mute_byte_limit && total_size > render_auto_mute_byte_limit) - { - pair_iter_iter_BY_SCULPT_ID_t it_eqr = mSizeInfo.get<tag_BY_SCULPT_ID>().equal_range(sculptId); - for (; it_eqr.first != it_eqr.second; ++it_eqr.first) - { - const Info &i = *it_eqr.first; - LLVOVolume *pVVol = i.mDrawable->getVOVolume(); - if (pVVol - && !pVVol->isDead() - && pVVol->isAttachment() - && !pVVol->getAvatar()->isSelf() - && LLVOVolume::NO_LOD != pVVol->getLOD() - ) - { - addToUnloaded(sculptId); - //immediately - const_cast<LLDrawable*>(i.mDrawable)->unload(); - } - } - } } void LLSculptIDSize::dec(const LLDrawable *pdrawable) diff --git a/indra/newview/llsky.cpp b/indra/newview/llsky.cpp index 6153a3b4f67c64f847f570131c2251329782eac0..1c2a13bac4fcfd02abb1ad0e135292b40ce2c9b2 100644 --- a/indra/newview/llsky.cpp +++ b/indra/newview/llsky.cpp @@ -116,13 +116,13 @@ void LLSky::resetVertexBuffers() if (gSky.mVOSkyp.notNull()) { gPipeline.resetVertexBuffers(gSky.mVOSkyp->mDrawable); - gPipeline.markRebuild(gSky.mVOSkyp->mDrawable, LLDrawable::REBUILD_ALL, TRUE); + gPipeline.markRebuild(gSky.mVOSkyp->mDrawable, LLDrawable::REBUILD_ALL); } if (gSky.mVOWLSkyp.notNull()) { gSky.mVOWLSkyp->resetVertexBuffers(); gPipeline.resetVertexBuffers(gSky.mVOWLSkyp->mDrawable); - gPipeline.markRebuild(gSky.mVOWLSkyp->mDrawable, LLDrawable::REBUILD_ALL, TRUE); + gPipeline.markRebuild(gSky.mVOWLSkyp->mDrawable, LLDrawable::REBUILD_ALL); } } diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index aef74dddf6a27fed5aebe898284190f3c44b1068..b847187a4ad16eefdf44f069d7e3b79951d85e56 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -246,7 +246,7 @@ BOOL LLSpatialGroup::addObject(LLDrawable *drawablep) drawablep->setGroup(this); setState(OBJECT_DIRTY | GEOM_DIRTY); setOcclusionState(LLSpatialGroup::DISCARD_QUERY, LLSpatialGroup::STATE_MODE_ALL_CAMERAS); - gPipeline.markRebuild(this, TRUE); + gPipeline.markRebuild(this); if (drawablep->isSpatialBridge()) { mBridgeList.push_back((LLSpatialBridge*) drawablep); @@ -368,7 +368,7 @@ BOOL LLSpatialGroup::removeObject(LLDrawable *drawablep, BOOL from_octree) { drawablep->setGroup(NULL); setState(GEOM_DIRTY); - gPipeline.markRebuild(this, TRUE); + gPipeline.markRebuild(this); if (drawablep->isSpatialBridge()) { @@ -411,7 +411,7 @@ void LLSpatialGroup::shift(const LLVector4a &offset) getSpatialPartition()->mPartitionType != LLViewerRegion::PARTITION_CONTROL_AV) { setState(GEOM_DIRTY); - gPipeline.markRebuild(this, TRUE); + gPipeline.markRebuild(this); } } @@ -537,7 +537,7 @@ LLSpatialGroup::LLSpatialGroup(OctreeNode* node, LLSpatialPartition* part) : LLO sg_assert(mOctreeNode->getListenerCount() == 0); setState(SG_INITIAL_STATE_MASK); - gPipeline.markRebuild(this, TRUE); + gPipeline.markRebuild(this); // let the reflection map manager know about this spatial group mReflectionProbe = gPipeline.mReflectionMapManager.registerSpatialGroup(this); @@ -611,7 +611,7 @@ F32 LLSpatialPartition::calcDistance(LLSpatialGroup* group, LLCamera& camera) //NOTE: If there is a trivial way to detect that alpha sorting here would not change the render order, //not setting this node to dirty would be a very good thing group->setState(LLSpatialGroup::ALPHA_DIRTY); - gPipeline.markRebuild(group, FALSE); + gPipeline.markRebuild(group); } } } @@ -785,7 +785,7 @@ void LLSpatialGroup::destroyGL(bool keep_occlusion) if (!keep_occlusion) { //going to need a rebuild - gPipeline.markRebuild(this, TRUE); + gPipeline.markRebuild(this); } mLastUpdateTime = gFrameTimeSeconds; @@ -1313,7 +1313,7 @@ class LLOctreeDirty : public OctreeTraveler } if (drawable->getVObj().notNull() && !group->getSpatialPartition()->mRenderByGroup) { - gPipeline.markRebuild(drawable, LLDrawable::REBUILD_ALL, TRUE); + gPipeline.markRebuild(drawable, LLDrawable::REBUILD_ALL); } } diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 05dc59311492a4d07c1177da23a7e71b6aff2691..25f9ced41425de302b82c9b016a5bf1c6079667e 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -612,8 +612,6 @@ bool toggle_show_object_render_cost(const LLSD& newvalue) return true; } -void handleRenderAutoMuteByteLimitChanged(const LLSD& new_value); - void handleTargetFPSChanged(const LLSD& newValue) { const auto targetFPS = gSavedSettings.getU32("TargetFPS"); @@ -852,7 +850,6 @@ void settings_setup_listeners() setting_setup_signal_listener(gSavedSettings, "SpellCheckDictionary", handleSpellCheckChanged); setting_setup_signal_listener(gSavedSettings, "LoginLocation", handleLoginLocationChanged); setting_setup_signal_listener(gSavedSettings, "DebugAvatarJoints", handleDebugAvatarJointsChanged); - setting_setup_signal_listener(gSavedSettings, "RenderAutoMuteByteLimit", handleRenderAutoMuteByteLimitChanged); setting_setup_signal_listener(gSavedSettings, "TargetFPS", handleTargetFPSChanged); setting_setup_signal_listener(gSavedSettings, "AutoTuneFPS", handleAutoTuneFPSChanged); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 8085d9690d1ada0ddba72a549ff6ad05c1d73997..c6077db43fe3d0eed9eec992ba567657e1b5c235 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -4564,7 +4564,7 @@ void process_object_animation(LLMessageSystem *mesgsys, void **user_data) //if (!avatarp->mRootVolp->isAnySelected()) { avatarp->updateVolumeGeom(); - avatarp->mRootVolp->recursiveMarkForUpdate(TRUE); + avatarp->mRootVolp->recursiveMarkForUpdate(); } } diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 49c6711b223e157abadadc466c51b29497076763..1218af128cd38b59aad41ca3d631829ed0714e5f 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -1062,7 +1062,7 @@ BOOL LLViewerObject::setDrawableParent(LLDrawable* parentp) parentp->setState(LLDrawable::ACTIVE_CHILD); } - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, TRUE); + gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME); if( (old_parent != parentp && old_parent) || (parentp && parentp->isActive())) { @@ -2548,7 +2548,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, { // LL_DEBUGS() << "Clearing force invisible: " << mID << ":" << getPCodeString() << ":" << getPositionAgent() << LL_ENDL; mDrawable->clearState(LLDrawable::FORCE_INVISIBLE); - gPipeline.markRebuild( mDrawable, LLDrawable::REBUILD_ALL, TRUE ); + gPipeline.markRebuild( mDrawable, LLDrawable::REBUILD_ALL); } } @@ -3226,7 +3226,7 @@ void LLViewerObject::linkControlAvatar() //if (!cav->mRootVolp->isAnySelected()) { cav->updateVolumeGeom(); - cav->mRootVolp->recursiveMarkForUpdate(TRUE); + cav->mRootVolp->recursiveMarkForUpdate(); } } } @@ -5041,7 +5041,7 @@ void LLViewerObject::updateTEMaterialTextures(U8 te) { region->loadCacheMiscExtras(obj->getLocalID()); } - obj->markForUpdate(FALSE); + obj->markForUpdate(); } }); } @@ -5275,7 +5275,7 @@ S32 LLViewerObject::setTEBumpmap(const U8 te, const U8 bump) if (mDrawable.notNull() && retval) { gPipeline.markTextured(mDrawable); - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_GEOMETRY, TRUE); + gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_GEOMETRY); } } return retval; @@ -5365,10 +5365,8 @@ S32 LLViewerObject::setTEMediaFlags(const U8 te, const U8 media_flags) setChanged(TEXTURE); if (mDrawable.notNull() && retval) { - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_TCOORD, TRUE); + gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_TCOORD); gPipeline.markTextured(mDrawable); - // JC - probably only need this if changes texture coords - //gPipeline.markRebuild(mDrawable); } } return retval; @@ -6682,33 +6680,25 @@ void LLViewerObject::updateVolume(const LLVolumeParams& volume_params) { // Transmit the update to the simulator sendShapeUpdate(); - markForUpdate(TRUE); + markForUpdate(); } } -void LLViewerObject::recursiveMarkForUpdate(BOOL priority) +void LLViewerObject::recursiveMarkForUpdate() { for (LLViewerObject* child : mChildList) { - child->markForUpdate(priority); + child->markForUpdate(); } - markForUpdate(priority); + markForUpdate(); } -void LLViewerObject::markForUpdate(BOOL priority) +void LLViewerObject::markForUpdate() { if (mDrawable.notNull()) { gPipeline.markTextured(mDrawable); - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_GEOMETRY, priority); - } -} - -void LLViewerObject::markForUnload(BOOL priority) -{ - if (mDrawable.notNull()) - { - gPipeline.markRebuild(mDrawable, LLDrawable::FOR_UNLOAD, priority); + gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_GEOMETRY); } } @@ -6933,7 +6923,7 @@ U32 LLViewerObject::getPartitionType() const return LLViewerRegion::PARTITION_NONE; } -void LLViewerObject::dirtySpatialGroup(BOOL priority) const +void LLViewerObject::dirtySpatialGroup() const { if (mDrawable) { @@ -6941,7 +6931,7 @@ void LLViewerObject::dirtySpatialGroup(BOOL priority) const if (group) { group->dirtyGeom(); - gPipeline.markRebuild(group, priority); + gPipeline.markRebuild(group); } } } @@ -6951,11 +6941,6 @@ void LLViewerObject::dirtyMesh() if (mDrawable) { gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL); - /*LLSpatialGroup* group = mDrawable->getSpatialGroup(); - if (group) - { - group->dirtyMesh(); - }*/ } } @@ -6976,7 +6961,7 @@ void LLStaticViewerObject::updateDrawable(BOOL force_damped) if (mDrawable.notNull()) { mDrawable->updateXform(TRUE); - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL, TRUE); + gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL); } clearChanged(SHIFTED); } diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index d99988eec05ee0fe70b038af2e976d021bbd9a45..1cd3b0d07d66ff496c5aae1510a172da9e5d4e40 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -474,9 +474,8 @@ class LLViewerObject void setIcon(LLViewerTexture* icon_image); void clearIcon(); - void recursiveMarkForUpdate(BOOL priority); - virtual void markForUpdate(BOOL priority); - void markForUnload(BOOL priority); + void recursiveMarkForUpdate(); + virtual void markForUpdate(); void updateVolume(const LLVolumeParams& volume_params); virtual void updateSpatialExtents(LLVector4a& min, LLVector4a& max); virtual F32 getBinRadius(); @@ -619,7 +618,7 @@ class LLViewerObject virtual S32 getLOD() const { return 3; } virtual U32 getPartitionType() const; - virtual void dirtySpatialGroup(BOOL priority = FALSE) const; + void dirtySpatialGroup() const; virtual void dirtyMesh(); const LLFlexibleObjectData* getFlexibleObjectData() const { return mFlexibleObjectDataInUse ? mFlexibleObjectData.get() : nullptr; } diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 2f2c6c477022752f7eb05dfe9b38d9adf070c68c..17b2333e42ed079afae241bc8bf3b5aa869a7589 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -805,7 +805,7 @@ void LLViewerObjectList::setAllObjectDefaultTextures(U32 nChannel, bool fShowDef } if (LLVOVolume* pVoVolume = pDrawable->getVOVolume()) - pVoVolume->markForUpdate(true); + pVoVolume->markForUpdate(); } } } @@ -2202,7 +2202,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 diff --git a/indra/newview/llviewerpartsim.cpp b/indra/newview/llviewerpartsim.cpp index 98a6ce14254cd6567254d8fa5d864f0035506b2f..300b1c1f2e2cb2aa0616960b20d3a962a7fb3af9 100644 --- a/indra/newview/llviewerpartsim.cpp +++ b/indra/newview/llviewerpartsim.cpp @@ -264,7 +264,7 @@ BOOL LLViewerPartGroup::addPart(LLViewerPart* part, F32 desired_size) return FALSE; } - gPipeline.markRebuild(mVOPartGroupp->mDrawable, LLDrawable::REBUILD_ALL, TRUE); + gPipeline.markRebuild(mVOPartGroupp->mDrawable, LLDrawable::REBUILD_ALL); mParticles.push_back(part); part->mSkipOffset=mSkippedTime; @@ -424,7 +424,7 @@ void LLViewerPartGroup::updateParticles(const F32 lastdt) // we removed one or more particles, so flag this group for update if (mVOPartGroupp.notNull()) { - gPipeline.markRebuild(mVOPartGroupp->mDrawable, LLDrawable::REBUILD_ALL, TRUE); + gPipeline.markRebuild(mVOPartGroupp->mDrawable, LLDrawable::REBUILD_ALL); } LLViewerPartSim::decPartCount(removed); } @@ -760,7 +760,7 @@ void LLViewerPartSim::updateSimulation() { if (vobj && !vobj->isDead() && vobj->mDrawable) { - gPipeline.markRebuild(vobj->mDrawable, LLDrawable::REBUILD_ALL, TRUE); + gPipeline.markRebuild(vobj->mDrawable, LLDrawable::REBUILD_ALL); } mViewerPartGroups[i]->updateParticles(dt * visirate); mViewerPartGroups[i]->mSkippedTime=0.0f; diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index e3e95dbbc4f7b95c2131533233600c3d5049a601..2d616deef9dce58e6b28c69e1cdf36b9c3b0e5f7 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -1915,7 +1915,7 @@ BOOL LLVOAvatar::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& LLDrawable* drawable = attached_object->mDrawable; if (drawable->isState(LLDrawable::RIGGED)) { //regenerate octree for rigged attachment - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_RIGGED, TRUE); + gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_RIGGED); } } } @@ -2319,7 +2319,7 @@ void LLVOAvatar::restoreMeshData() } // force mesh update as LOD might not have changed to trigger this - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_GEOMETRY, TRUE); + gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_GEOMETRY); } //----------------------------------------------------------------------------- diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 05f73df5df7704b72a2198e9064fdb4de8fcdf91..f8c124278edd1b5b183c6d2ae49f778463330a6a 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -1088,7 +1088,7 @@ void LLVOAvatarSelf::restoreMeshData() updateAttachmentVisibility(gAgentCamera.getCameraMode()); // force mesh update as LOD might not have changed to trigger this - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_GEOMETRY, TRUE); + gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_GEOMETRY); } diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp index 2c55f948a9ebf19c8c7434afd9c9b5eaed941481..9507603b608855d8cd5af9dbf60360c560be3ec8 100644 --- a/indra/newview/llvograss.cpp +++ b/indra/newview/llvograss.cpp @@ -266,7 +266,7 @@ U32 LLVOGrass::processUpdateMessage(LLMessageSystem *mesgsys, if (mDrawable) { - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, TRUE); + gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME); } return retval; @@ -292,12 +292,12 @@ void LLVOGrass::idleUpdate(LLAgent &agent, const F64 &time) if (!LLVOTree::isTreeRenderingStopped() && !mNumBlades)//restart grass rendering { mNumBlades = GRASS_MAX_BLADES; - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL, TRUE); + gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL); return; } if (mPatch && (mLastPatchUpdateTime != mPatch->getLastUpdateTime())) { - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, TRUE); + gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME); } return; @@ -351,7 +351,7 @@ BOOL LLVOGrass::updateLOD() { mNumBlades = 0 ; face->setSize(0, 0); - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL, TRUE); + gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL); } return TRUE ; } @@ -376,7 +376,7 @@ BOOL LLVOGrass::updateLOD() { face->setSize(mNumBlades*8, mNumBlades*12); } - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL, TRUE); + gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL); } else if (num_blades <= (mNumBlades >> 1)) { @@ -389,7 +389,7 @@ BOOL LLVOGrass::updateLOD() { face->setSize(mNumBlades*8, mNumBlades*12); } - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL, TRUE); + gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL); return TRUE; } @@ -736,7 +736,7 @@ void LLVOGrass::updateDrawable(BOOL force_damped) if (mDrawable.notNull()) { mDrawable->updateXform(TRUE); - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL, TRUE); + gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL); } clearChanged(SHIFTED); } diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp index 089977280ad17c7774881b178a0fd534611acb9d..4dfa7b465c5c4ce25760c1313d39327daeeabbb4 100644 --- a/indra/newview/llvopartgroup.cpp +++ b/indra/newview/llvopartgroup.cpp @@ -287,7 +287,7 @@ BOOL LLVOPartGroup::updateGeometry(LLDrawable *drawable) if (group && group->isVisible()) { - dirtySpatialGroup(TRUE); + dirtySpatialGroup(); } if (!num_parts) diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index 48fd99181461abbde6e50ee5ba1c4ef68c124a4a..0518068cbd6d0ae2e8c5c6f79aed2361c5c5d332 100644 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -585,7 +585,7 @@ void LLVOSky::restoreGL() if (mDrawable) { - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, TRUE); + gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME); } } @@ -766,7 +766,7 @@ bool LLVOSky::updateSky() if (mDrawable.notNull() && mDrawable->getFace(0) && !mDrawable->getFace(0)->getVertexBuffer()) { - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, TRUE); + gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME); } mCubeMapUpdateStage = -1; } diff --git a/indra/newview/llvosurfacepatch.cpp b/indra/newview/llvosurfacepatch.cpp index 7f16411c82a1f4d93e63c08fb62f387963c730a3..07b6322411de39cc03e8f9393de8dc9d90a664fb 100644 --- a/indra/newview/llvosurfacepatch.cpp +++ b/indra/newview/llvosurfacepatch.cpp @@ -150,7 +150,7 @@ BOOL LLVOSurfacePatch::updateGeometry(LLDrawable *drawable) { LL_PROFILE_ZONE_SCOPED; - dirtySpatialGroup(TRUE); + dirtySpatialGroup(); S32 min_comp, max_comp, range; min_comp = lltrunc(mPatchp->getMinComposition()); @@ -785,7 +785,7 @@ void LLVOSurfacePatch::dirtyGeom() { if (mDrawable) { - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL, TRUE); + gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL); LLFace* facep = mDrawable->getFace(0); if (facep) { diff --git a/indra/newview/llvotree.cpp b/indra/newview/llvotree.cpp index b3655c36b4965df531869e25b3ae6d217cff1dd2..879d6286c932ddac37a265e561790a3ad27d0dd9 100644 --- a/indra/newview/llvotree.cpp +++ b/indra/newview/llvotree.cpp @@ -377,11 +377,11 @@ void LLVOTree::idleUpdate(LLAgent &agent, const F64 &time) if (mReferenceBuffer.isNull()) { - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL, TRUE); + gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL); } else if (trunk_LOD != mTrunkLOD) { - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL, FALSE); + gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL); } else { diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index a1cd859f23cc8d8d9fff9c07a87b8a8091c7b2f6..d3992615990919920d69aab6b40438834afa1cb5 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -431,7 +431,7 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys, if (setVolume(volume_params, 0)) { - markForUpdate(TRUE); + markForUpdate(); } } @@ -442,10 +442,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; @@ -467,7 +464,7 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys, if (setVolume(volume_params, 0)) { - markForUpdate(TRUE); + markForUpdate(); } S32 res2 = unpackTEMessage(*dp); if (TEM_INVALID == res2) @@ -484,10 +481,6 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys, } else { - if (res2 & teDirtyBits) - { - updateTEData(); - } if (res2 & TEM_CHANGE_MEDIA) { retval |= MEDIA_FLAGS_CHANGED; @@ -549,8 +542,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(); } @@ -782,24 +774,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 @@ -911,7 +886,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); } } @@ -960,7 +935,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; } @@ -1042,7 +1017,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) { @@ -1275,7 +1250,7 @@ void LLVOVolume::notifyMeshLoaded() { mHasRequestedMeshData = false; mSculptChanged = TRUE; - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_GEOMETRY, TRUE); + gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_GEOMETRY); LLVOAvatar *av = getAvatar(); if (av && !isAnimatedObject()) @@ -1297,7 +1272,7 @@ void LLVOVolume::notifySkinInfoLoaded(const LLMeshSkinInfo* skin) mHasRequestedSkinData = false; mSkinInfo = skin; mSculptChanged = TRUE; - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_GEOMETRY, TRUE); + gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_GEOMETRY); LLVOAvatar *av = getAvatar(); if (av && !isAnimatedObject()) @@ -1420,7 +1395,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); } } } @@ -1668,7 +1643,7 @@ BOOL LLVOVolume::updateLOD() if (lod_changed) { - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, FALSE); + gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME); mLODChanged = TRUE; } else @@ -1697,7 +1672,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()) { @@ -1753,7 +1728,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); } @@ -2106,7 +2081,7 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) LLSpatialGroup* group = drawable->getSpatialGroup(); if (group) { - group->dirtyMesh(); + gPipeline.markRebuild(group); } updateRelativeXform(); @@ -2123,7 +2098,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; @@ -2145,7 +2120,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); @@ -2311,7 +2286,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) @@ -2532,16 +2507,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; @@ -3686,7 +3651,7 @@ BOOL LLVOVolume::setIsFlexible(BOOL is_flexible) res = setVolume(volume_params, 1); if (res) { - markForUpdate(TRUE); + markForUpdate(); } } return res; @@ -3732,7 +3697,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()) { @@ -4425,7 +4390,7 @@ void LLVOVolume::forceLOD(S32 lod) // [/SL:KB] mLOD = lod; - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, FALSE); + gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME); mLODChanged = true; } // [/FS] @@ -4498,13 +4463,13 @@ void LLVOVolume::setSelected(BOOL sel) LLViewerObject::setSelected(sel); if (isAnimatedObject()) { - getRootEdit()->recursiveMarkForUpdate(TRUE); + getRootEdit()->recursiveMarkForUpdate(); } else { if (mDrawable.notNull()) { - markForUpdate(TRUE); + markForUpdate(); } } } @@ -4601,14 +4566,14 @@ const LLMatrix4a& 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; } @@ -5532,81 +5497,6 @@ void LLVolumeGeometryManager::getGeometry(LLSpatialGroup* group) } -void handleRenderAutoMuteByteLimitChanged(const LLSD& new_value) -{ - static LLCachedControl<U32> 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<LLSculptIDSize::tag_BY_SIZE>().lower_bound(render_auto_mute_byte_limit), - itU = LLSculptIDSize::instance().getSizeInfo().get<LLSculptIDSize::tag_BY_SIZE>().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<LLSculptIDSize::tag_BY_SIZE>().begin(); - itU = LLSculptIDSize::instance().getSizeInfo().get<LLSculptIDSize::tag_BY_SIZE>().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<LLSculptIDSize::tag_BY_SIZE>().begin(), - itU = LLSculptIDSize::instance().getSizeInfo().get<LLSculptIDSize::tag_BY_SIZE>().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<typename T> static inline void add_face(T*** list, U32* count, T* face) @@ -5643,7 +5533,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); } @@ -6083,7 +5973,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_end = group->getDataEnd(); drawable_iter != drawable_end; ++drawable_iter) @@ -6099,12 +5988,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) @@ -6156,7 +6039,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(); @@ -6518,7 +6401,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(); diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h index e2e0d8905edfb9ce0e813a1d7fe141b391de480f..350931d20f3cb64008c31af01b1aa7afa22d6218 100644 --- a/indra/newview/llvovolume.h +++ b/indra/newview/llvovolume.h @@ -183,8 +183,7 @@ class LLVOVolume final : public LLViewerObject F32 getVObjRadius() const override { return mVObjRadius; }; const LLMatrix4a& getWorldMatrix(LLXformMatrix* xform) const override; - void markForUpdate(BOOL priority) override; - void markForUnload() { LLViewerObject::markForUnload(TRUE); mVolumeChanged = TRUE; } + void markForUpdate() override; void faceMappingChanged() override { mFaceMappingChanged=TRUE; } /*virtual*/ void onShift(const LLVector4a &shift_vector) override; // Called when the drawable shifts @@ -426,8 +425,7 @@ class LLVOVolume final : public LLViewerObject S32 computeLODDetail(F32 distance, F32 radius, F32 lod_factor); BOOL calcLOD(); LLFace* addFace(S32 face_index); - void updateTEData(); - + // stats tracking for render complexity static S32 mRenderComplexity_last; static S32 mRenderComplexity_current; diff --git a/indra/newview/llvowlsky.cpp b/indra/newview/llvowlsky.cpp index 2b32e022848a80f4d113cbde8b12ca046eff7a77..d582a6bcad26e64eb8cc06f439e72518f3085507 100644 --- a/indra/newview/llvowlsky.cpp +++ b/indra/newview/llvowlsky.cpp @@ -126,7 +126,7 @@ void LLVOWLSky::resetVertexBuffers() mStarsVerts = nullptr; mFsSkyVerts = nullptr; - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL, TRUE); + gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL); } void LLVOWLSky::cleanupGL() @@ -141,7 +141,7 @@ void LLVOWLSky::cleanupGL() void LLVOWLSky::restoreGL() { LLDrawPoolWLSky::restoreGL(); - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL, TRUE); + gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL); } BOOL LLVOWLSky::updateGeometry(LLDrawable * drawable) diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 96888d6d35016ba6fced63c69ec9b354c96df7c9..20770a507748099b64eb5e9c9e338060889bddbb 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -261,7 +261,6 @@ bool LLPipeline::sRenderHighlight = true; LLRender::eTexIndex LLPipeline::sRenderHighlightTextureChannel = LLRender::DIFFUSE_MAP; bool LLPipeline::sForceOldBakedUpload = false; S32 LLPipeline::sUseOcclusion = 0; -bool LLPipeline::sDelayVBUpdate = true; bool LLPipeline::sAutoMaskAlphaDeferred = true; bool LLPipeline::sAutoMaskAlphaNonDeferred = false; bool LLPipeline::sRenderTransparentWater = true; @@ -497,7 +496,6 @@ void LLPipeline::init() connectRefreshCachedSettingsSafe("RenderAutoMaskAlphaNonDeferred"); connectRefreshCachedSettingsSafe("RenderUseFarClip"); connectRefreshCachedSettingsSafe("RenderAvatarMaxNonImpostors"); - connectRefreshCachedSettingsSafe("RenderDelayVBUpdate"); connectRefreshCachedSettingsSafe("UseOcclusion"); // DEPRECATED -- connectRefreshCachedSettingsSafe("WindLightUseAtmosShaders"); // DEPRECATED -- connectRefreshCachedSettingsSafe("RenderDeferred"); @@ -1021,7 +1019,6 @@ void LLPipeline::refreshCachedSettings() LLPipeline::sUseFarClip = gSavedSettings.getBOOL("RenderUseFarClip"); LLVOAvatar::sMaxNonImpostors = gSavedSettings.getU32("RenderAvatarMaxNonImpostors"); LLVOAvatar::updateImpostorRendering(LLVOAvatar::sMaxNonImpostors); - LLPipeline::sDelayVBUpdate = gSavedSettings.getBOOL("RenderDelayVBUpdate"); LLPipeline::sRenderAttachedLights = gSavedSettings.getBOOL("RenderAttachedLights"); LLPipeline::sRenderAttachedParticles = gSavedSettings.getBOOL("RenderAttachedParticles"); @@ -1922,7 +1919,7 @@ void LLPipeline::createObject(LLViewerObject* vobj) vobj->setDrawableParent(NULL); // LLPipeline::addObject 2 } - markRebuild(drawablep, LLDrawable::REBUILD_ALL, TRUE); + markRebuild(drawablep, LLDrawable::REBUILD_ALL); if (drawablep->getVOVolume() && RenderAnimateRes) { @@ -2037,10 +2034,10 @@ void LLPipeline::updateMovedList(LLDrawable::drawable_vector_t& moved_list) { //will likely not receive any future world matrix updates // -- this keeps attachments from getting stuck in space and falling off your avatar drawablep->clearState(LLDrawable::ANIMATED_CHILD); - markRebuild(drawablep, LLDrawable::REBUILD_VOLUME, TRUE); + markRebuild(drawablep, LLDrawable::REBUILD_VOLUME); if (drawablep->getVObj()) { - drawablep->getVObj()->dirtySpatialGroup(TRUE); + drawablep->getVObj()->dirtySpatialGroup(); } } } @@ -3113,66 +3110,30 @@ void LLPipeline::markMeshDirty(LLSpatialGroup* group) mMeshDirtyGroup.push_back(group); } -void LLPipeline::markRebuild(LLSpatialGroup* group, bool priority) +void LLPipeline::markRebuild(LLSpatialGroup* group) { if (group && !group->isDead() && group->getSpatialPartition()) { - if (group->getSpatialPartition()->mPartitionType == LLViewerRegion::PARTITION_HUD) + if (!group->hasState(LLSpatialGroup::IN_BUILD_Q1)) { - priority = true; - } - - if (priority) - { - if (!group->hasState(LLSpatialGroup::IN_BUILD_Q1)) - { - llassert_always(!mGroupQ1Locked); - - mGroupQ1.push_back(group); - group->setState(LLSpatialGroup::IN_BUILD_Q1); - - if (group->hasState(LLSpatialGroup::IN_BUILD_Q2)) - { - LLSpatialGroup::sg_vector_t::iterator iter = std::find(mGroupQ2.begin(), mGroupQ2.end(), group); - if (iter != mGroupQ2.end()) - { - mGroupQ2.erase(iter); - } - group->clearState(LLSpatialGroup::IN_BUILD_Q2); - } - } - } - else if (!group->hasState(LLSpatialGroup::IN_BUILD_Q2 | LLSpatialGroup::IN_BUILD_Q1)) - { - llassert_always(!mGroupQ2Locked); - mGroupQ2.push_back(group); - group->setState(LLSpatialGroup::IN_BUILD_Q2); + llassert_always(!mGroupQ1Locked); + mGroupQ1.push_back(group); + group->setState(LLSpatialGroup::IN_BUILD_Q1); } } } -void LLPipeline::markRebuild(LLDrawable *drawablep, LLDrawable::EDrawableFlags flag, bool priority) +void LLPipeline::markRebuild(LLDrawable *drawablep, LLDrawable::EDrawableFlags flag) { if (drawablep && !drawablep->isDead() && assertInitialized()) { - if (!drawablep->isState(LLDrawable::BUILT)) - { - priority = true; - } - if (priority) + if (!drawablep->isState(LLDrawable::IN_REBUILD_Q1)) { - if (!drawablep->isState(LLDrawable::IN_REBUILD_Q1)) - { - mBuildQ1.push_back(drawablep); - drawablep->setState(LLDrawable::IN_REBUILD_Q1); // mark drawable as being in priority queue - } - } - else if (!drawablep->isState(LLDrawable::IN_REBUILD_Q2)) - { - mBuildQ2.push_back(drawablep); - drawablep->setState(LLDrawable::IN_REBUILD_Q2); // need flag here because it is just a list + mBuildQ1.push_back(drawablep); + drawablep->setState(LLDrawable::IN_REBUILD_Q1); // mark drawable as being in priority queue } + if ((flag & (LLDrawable::REBUILD_VOLUME | LLDrawable::REBUILD_POSITION)) && drawablep->getVObj().notNull()) { drawablep->getVObj()->setChanged(LLXform::SILHOUETTE); @@ -3219,7 +3180,6 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result) markVisible(drawablep, camera); } - if (!sDelayVBUpdate) { //rebuild mesh as soon as we know it's visible group->rebuildMesh(); } @@ -3275,7 +3235,6 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result) group->setVisible(); stateSort(group, camera); - if (!sDelayVBUpdate) { //rebuild mesh as soon as we know it's visible group->rebuildMesh(); } @@ -10819,7 +10778,7 @@ void LLPipeline::hideObject( const LLUUID& id ) void LLPipeline::hideDrawable( LLDrawable *pDrawable ) { pDrawable->setState( LLDrawable::FORCE_INVISIBLE ); - markRebuild( pDrawable, LLDrawable::REBUILD_ALL, TRUE ); + markRebuild( pDrawable, LLDrawable::REBUILD_ALL); //hide the children LLViewerObject::const_child_list_t& child_list = pDrawable->getVObj()->getChildren(); for ( LLViewerObject::child_list_t::const_iterator iter = child_list.begin(); @@ -10830,14 +10789,14 @@ void LLPipeline::hideDrawable( LLDrawable *pDrawable ) if ( drawable ) { drawable->setState( LLDrawable::FORCE_INVISIBLE ); - markRebuild( drawable, LLDrawable::REBUILD_ALL, TRUE ); + markRebuild( drawable, LLDrawable::REBUILD_ALL); } } } void LLPipeline::unhideDrawable( LLDrawable *pDrawable ) { pDrawable->clearState( LLDrawable::FORCE_INVISIBLE ); - markRebuild( pDrawable, LLDrawable::REBUILD_ALL, TRUE ); + markRebuild( pDrawable, LLDrawable::REBUILD_ALL); //restore children LLViewerObject::const_child_list_t& child_list = pDrawable->getVObj()->getChildren(); for ( LLViewerObject::child_list_t::const_iterator iter = child_list.begin(); @@ -10848,7 +10807,7 @@ void LLPipeline::unhideDrawable( LLDrawable *pDrawable ) if ( drawable ) { drawable->clearState( LLDrawable::FORCE_INVISIBLE ); - markRebuild( drawable, LLDrawable::REBUILD_ALL, TRUE ); + markRebuild( drawable, LLDrawable::REBUILD_ALL); } } } diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index b2a36ae79662c07fc42f83f67525a3cda51e8f59..1a37add5067d93fe23c1efecbd93a50b1b7aaa95 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -170,8 +170,8 @@ class LLPipeline void markShift(LLDrawable *drawablep); void markTextured(LLDrawable *drawablep); void markGLRebuild(LLGLUpdate* glu); - void markRebuild(LLSpatialGroup* group, bool priority = false); - void markRebuild(LLDrawable *drawablep, LLDrawable::EDrawableFlags flag = LLDrawable::REBUILD_ALL, bool priority = false); + void markRebuild(LLSpatialGroup* group); + void markRebuild(LLDrawable *drawablep, LLDrawable::EDrawableFlags flag = LLDrawable::REBUILD_ALL); void markPartitionMove(LLDrawable* drawablep); void markMeshDirty(LLSpatialGroup* group); @@ -612,7 +612,6 @@ class LLPipeline static bool sShowHUDAttachments; static bool sForceOldBakedUpload; // If true will not use capabilities to upload baked textures. static S32 sUseOcclusion; // 0 = no occlusion, 1 = read only, 2 = read/write - static bool sDelayVBUpdate; static bool sAutoMaskAlphaDeferred; static bool sAutoMaskAlphaNonDeferred; static bool sRenderTransparentWater;