diff --git a/indra/llcommon/llqueuedthread.cpp b/indra/llcommon/llqueuedthread.cpp index 06495a3a94..2f48ca8f9d 100644 --- a/indra/llcommon/llqueuedthread.cpp +++ b/indra/llcommon/llqueuedthread.cpp @@ -185,7 +185,7 @@ void LLQueuedThread::incQueue() // May be called from any thread size_t LLQueuedThread::getPending() { - return mRequestQueue.size(); + return mRequestQueue.size(); } // MAIN thread diff --git a/indra/llcommon/lluuid.cpp b/indra/llcommon/lluuid.cpp index 89349ec0c1..c885143444 100644 --- a/indra/llcommon/lluuid.cpp +++ b/indra/llcommon/lluuid.cpp @@ -883,6 +883,10 @@ U32 LLUUID::getRandomSeed() // time from generating the same seed. pid_t pid = LLApp::getPid(); + seed[6] = (unsigned char)(pid >> 8); + seed[7] = (unsigned char)(pid); + getSystemTime((uuid_time_t*)(&seed[8])); + U64 seed64 = HBXXH64((const void*)seed, 16).digest(); return U32(seed64) ^ U32(seed64 >> 32); } diff --git a/indra/llimage/llimageworker.cpp b/indra/llimage/llimageworker.cpp index e55982b4db..8bd5bd9584 100644 --- a/indra/llimage/llimageworker.cpp +++ b/indra/llimage/llimageworker.cpp @@ -79,7 +79,7 @@ size_t LLImageDecodeThread::update(F32 max_time_ms) return getPending(); } -S32 LLImageDecodeThread::getPending() +size_t LLImageDecodeThread::getPending() { return mThreadPool->getQueue().size(); } diff --git a/indra/llimage/llimageworker.h b/indra/llimage/llimageworker.h index b2fda06696..ca4c0d93d0 100644 --- a/indra/llimage/llimageworker.h +++ b/indra/llimage/llimageworker.h @@ -51,7 +51,7 @@ public: handle_t decodeImage(const LLPointer& image, S32 discard, BOOL needs_aux, const LLPointer& responder); - S32 getPending(); + size_t getPending(); size_t update(F32 max_time_ms); void shutdown(); diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index c8f4684418..b8c19e3339 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -13845,17 +13845,6 @@ Change of this parameter will affect the layout of buttons in notification toast Value 0 - RenderAutoMuteByteLimit - - Comment - If avatar attachment size exceed this value (in bytes) attachment will not be rendered. Excludes attachments worn by own avatar. - Persist - 1 - Type - U32 - Value - 0 - RenderAvatarMaxNonImpostors Comment @@ -17916,19 +17905,6 @@ Change of this parameter will affect the layout of buttons in notification toast Value 1 - RenderDelayVBUpdate - - Comment - Delay vertex buffer updates until just before rendering - Persist - 1 - Type - Boolean - Value - 0 - Backup - 0 - ShowPhysicsShapeInEdit Comment diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt index 364fa30263..687680bd52 100644 --- a/indra/newview/featuretable.txt +++ b/indra/newview/featuretable.txt @@ -35,7 +35,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_linux.txt b/indra/newview/featuretable_linux.txt index f76f53f826..e9ca05c752 100644 --- a/indra/newview/featuretable_linux.txt +++ b/indra/newview/featuretable_linux.txt @@ -1,4 +1,4 @@ -version 41 +version 42 // The version number above should be incremented IF AND ONLY IF some // change has been made that is sufficiently important to justify // resetting the graphics preferences of all users to the recommended @@ -35,7 +35,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 fbd71e186e..0d5b6aab6c 100644 --- a/indra/newview/featuretable_mac.txt +++ b/indra/newview/featuretable_mac.txt @@ -35,7 +35,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/fslslbridge.cpp b/indra/newview/fslslbridge.cpp index 980e530bcb..43c357d403 100644 --- a/indra/newview/fslslbridge.cpp +++ b/indra/newview/fslslbridge.cpp @@ -1180,7 +1180,7 @@ void FSLSLBridge::setupBridgePrim(LLViewerObject* object) object->updateFlags(); object->setChanged(LLXform::MOVED | LLXform::SILHOUETTE | LLXform::TEXTURE); - object->markForUpdate(TRUE); + object->markForUpdate(); LL_DEBUGS("FSLSLBridge") << "End bridge container setup." << LL_ENDL; } diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index f3b43244c4..c5918bf4c0 100644 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -838,12 +838,14 @@ bool LLAppViewerWin32::init() // //bool needs_log_file = !isSecondInstance() && debugLoggingEnabled("BUGSPLAT"); + //LL_DEBUGS("BUGSPLAT"); //if (needs_log_file) //{ // // Startup only! // LL_INFOS("BUGSPLAT") << "Engaged BugSplat logging to bugsplat.log" << LL_ENDL; // dwFlags |= MDSF_LOGFILE | MDSF_LOG_VERBOSE; //} + //LL_ENDL; // have to convert normal wide strings to strings of __wchar_t sBugSplatSender = new MiniDmpSender( @@ -855,12 +857,14 @@ bool LLAppViewerWin32::init() sBugSplatSender->setCallback(bugsplatSendLog); + //LL_DEBUGS("BUGSPLAT"); //if (needs_log_file) //{ // // Log file will be created in %TEMP%, but it will be moved into logs folder in case of crash // std::string log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "bugsplat.log"); // sBugSplatSender->setLogFilePath(WCSTR(log_file)); //} + //LL_ENDL; // engage stringize() overload that converts from wstring LL_INFOS("BUGSPLAT") << "Engaged BugSplat(" << LL_TO_STRING(LL_VIEWER_CHANNEL) diff --git a/indra/newview/llcontrolavatar.cpp b/indra/newview/llcontrolavatar.cpp index 3ab6fcd9cd..a642998b28 100644 --- a/indra/newview/llcontrolavatar.cpp +++ b/indra/newview/llcontrolavatar.cpp @@ -314,8 +314,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 @@ -600,7 +600,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 da5e58fb06..52fc52a036 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -156,7 +156,7 @@ void LLDrawable::unload() { LLVOVolume *pVVol = getVOVolume(); pVVol->setNoLOD(); - pVVol->markForUpdate(TRUE); + pVVol->markForUpdate(); } // static @@ -542,7 +542,7 @@ void LLDrawable::makeActive() if (mVObjp->getPCode() == LL_PCODE_VOLUME) { - gPipeline.markRebuild(this, LLDrawable::REBUILD_VOLUME, TRUE); + gPipeline.markRebuild(this, LLDrawable::REBUILD_VOLUME); } updatePartition(); } @@ -590,7 +590,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) @@ -666,7 +666,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); } } } @@ -690,7 +690,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() || @@ -700,7 +700,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(); } } @@ -709,7 +709,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()) { @@ -820,7 +820,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); } } @@ -951,7 +951,7 @@ void LLDrawable::updateTexture() if (getVOVolume()) { - gPipeline.markRebuild(this, LLDrawable::REBUILD_MATERIAL, TRUE); + gPipeline.markRebuild(this, LLDrawable::REBUILD_MATERIAL); } } @@ -994,7 +994,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 a809b06f74..33ca6fa0e1 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); } } } @@ -1236,6 +1236,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 @@ -1251,6 +1252,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 500e3cc41b..c9370b49f1 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 e974c00c37..e2b62cdab8 100644 --- a/indra/newview/llmanip.cpp +++ b/indra/newview/llmanip.cpp @@ -74,14 +74,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 3d5102902d..5d051d0ebf 100644 --- a/indra/newview/llsculptidsize.cpp +++ b/indra/newview/llsculptidsize.cpp @@ -85,29 +85,6 @@ void LLSculptIDSize::inc(const LLDrawable *pdrawable, int sz) //trying insert the LLDrawable mSizeInfo.get().insert(Info(pdrawable, sz, nfo.mSharedSizeSum, sculptId)); } - - static LLCachedControl 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().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(i.mDrawable)->unload(); - } - } - } } void LLSculptIDSize::dec(const LLDrawable *pdrawable) diff --git a/indra/newview/llsky.cpp b/indra/newview/llsky.cpp index c5d49a81f1..4926b86b14 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 89694be490..469dc7c8ef 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -252,7 +252,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); @@ -374,7 +374,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()) { @@ -417,7 +417,7 @@ void LLSpatialGroup::shift(const LLVector4a &offset) getSpatialPartition()->mPartitionType != LLViewerRegion::PARTITION_CONTROL_AV) { setState(GEOM_DIRTY); - gPipeline.markRebuild(this, TRUE); + gPipeline.markRebuild(this); } } @@ -543,7 +543,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); @@ -617,7 +617,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); } } } @@ -794,7 +794,7 @@ void LLSpatialGroup::destroyGL(bool keep_occlusion) if (!keep_occlusion) { //going to need a rebuild - gPipeline.markRebuild(this, TRUE); + gPipeline.markRebuild(this); } mLastUpdateTime = gFrameTimeSeconds; @@ -1330,7 +1330,7 @@ public: } 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 c6a685396c..86f8e3ffe4 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -716,8 +716,6 @@ bool toggle_show_object_render_cost(const LLSD& newvalue) return true; } -void handleRenderAutoMuteByteLimitChanged(const LLSD& new_value); - // Change visibility of main chatbar if autohide setting is changed static void handleAutohideChatbarChanged(const LLSD& new_value) { @@ -1270,7 +1268,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 006bd5c9f0..8f429e9fca 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -5351,7 +5351,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 1175782521..372c1a0750 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -1104,7 +1104,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())) { @@ -2595,7 +2595,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); } } @@ -3298,7 +3298,7 @@ void LLViewerObject::linkControlAvatar() //if (!cav->mRootVolp->isAnySelected()) { cav->updateVolumeGeom(); - cav->mRootVolp->recursiveMarkForUpdate(TRUE); + cav->mRootVolp->recursiveMarkForUpdate(); } } } @@ -5149,7 +5149,7 @@ void LLViewerObject::updateTEMaterialTextures(U8 te) { region->loadCacheMiscExtras(obj->getLocalID()); } - obj->markForUpdate(FALSE); + obj->markForUpdate(); } }); } @@ -5383,7 +5383,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; @@ -5473,10 +5473,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; @@ -6815,35 +6813,27 @@ 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_list_t::iterator iter = mChildList.begin(); iter != mChildList.end(); iter++) { LLViewerObject* child = *iter; - 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); } } @@ -7069,7 +7059,7 @@ U32 LLViewerObject::getPartitionType() const return LLViewerRegion::PARTITION_NONE; } -void LLViewerObject::dirtySpatialGroup(BOOL priority) const +void LLViewerObject::dirtySpatialGroup() const { if (mDrawable) { @@ -7077,7 +7067,7 @@ void LLViewerObject::dirtySpatialGroup(BOOL priority) const if (group) { group->dirtyGeom(); - gPipeline.markRebuild(group, priority); + gPipeline.markRebuild(group); } } } @@ -7087,11 +7077,6 @@ void LLViewerObject::dirtyMesh() if (mDrawable) { gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL); - /*LLSpatialGroup* group = mDrawable->getSpatialGroup(); - if (group) - { - group->dirtyMesh(); - }*/ } } @@ -7112,7 +7097,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 7cf9ad7705..5f9412f3d4 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -462,9 +462,8 @@ public: // Getter for HUD icon attached to the object LLPointer getIcon() const { return mIcon; }; - 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(); @@ -611,7 +610,7 @@ public: virtual S32 getLOD() const { return 3; } virtual U32 getPartitionType() const; - virtual void dirtySpatialGroup(BOOL priority = FALSE) const; + void dirtySpatialGroup() const; virtual void dirtyMesh(); virtual LLNetworkData* getParameterEntry(U16 param_type) const; diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index f5a0a9477d..4a5270e2a4 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -853,7 +853,7 @@ void LLViewerObjectList::setAllObjectDefaultTextures(U32 nChannel, bool fShowDef } if (LLVOVolume* pVoVolume = pDrawable->getVOVolume()) - pVoVolume->markForUpdate(true); + pVoVolume->markForUpdate(); } } } @@ -2422,7 +2422,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 f77ed8abaf..423a59e5b6 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; @@ -426,7 +426,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); } @@ -770,7 +770,7 @@ void LLViewerPartSim::updateSimulation() // isDead()) 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 d672f85af7..2c39e75f23 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2002,7 +2002,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); } } } @@ -2437,7 +2437,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); } //----------------------------------------------------------------------------- @@ -9315,7 +9315,7 @@ void LLVOAvatar::updateTooSlow() // better state change flagging if( changed_slow_state ) { - 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 d76b6c8012..af64574e94 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -1441,7 +1441,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 2a18af5f81..3e9642ea57 100644 --- a/indra/newview/llvograss.cpp +++ b/indra/newview/llvograss.cpp @@ -274,7 +274,7 @@ U32 LLVOGrass::processUpdateMessage(LLMessageSystem *mesgsys, if (mDrawable) { - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, TRUE); + gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME); } return retval; @@ -300,12 +300,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; @@ -358,7 +358,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 ; } @@ -383,7 +383,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)) { @@ -396,7 +396,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; } @@ -782,7 +782,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 bcc6945491..ac990c0636 100644 --- a/indra/newview/llvopartgroup.cpp +++ b/indra/newview/llvopartgroup.cpp @@ -301,7 +301,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 3d7ce5f2f7..e35a1f8cb3 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); } } @@ -772,7 +772,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 5479b8abfb..53b6eb276e 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 cc960a3149..8f1fbc87ef 100644 --- a/indra/newview/llvotree.cpp +++ b/indra/newview/llvotree.cpp @@ -387,11 +387,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 bd48964515..8874be7848 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -466,7 +466,7 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys, if (setVolume(volume_params, 0)) { - markForUpdate(TRUE); + markForUpdate(); } } @@ -501,10 +501,6 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys, } } // - if (result & teDirtyBits) - { - updateTEData(); - } if (result & TEM_CHANGE_MEDIA) { retval |= MEDIA_FLAGS_CHANGED; @@ -552,7 +548,7 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys, if (setVolume(volume_params, 0)) { - markForUpdate(TRUE); + markForUpdate(); } S32 res2 = unpackTEMessage(*dp); if (TEM_INVALID == res2) @@ -590,10 +586,6 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys, } else { - if (res2 & teDirtyBits) - { - updateTEData(); - } if (res2 & TEM_CHANGE_MEDIA) { retval |= MEDIA_FLAGS_CHANGED; @@ -655,8 +647,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(); } @@ -884,24 +875,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 @@ -1013,7 +987,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); } } @@ -1064,7 +1038,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; } @@ -1172,7 +1146,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) { @@ -1408,7 +1382,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()) @@ -1539,7 +1513,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); } } } @@ -1766,7 +1740,7 @@ BOOL LLVOVolume::calcLOD() void LLVOVolume::forceLOD(S32 lod) { mLOD = lod; - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, FALSE); + gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME); mLODChanged = true; } // @@ -1793,7 +1767,7 @@ BOOL LLVOVolume::updateLOD() if (lod_changed) { - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, FALSE); + gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME); mLODChanged = TRUE; } else @@ -1822,7 +1796,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()) { @@ -1879,7 +1853,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); } @@ -2278,7 +2252,7 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) LLSpatialGroup* group = drawable->getSpatialGroup(); if (group) { - group->dirtyMesh(); + gPipeline.markRebuild(group); } updateRelativeXform(); @@ -2295,7 +2269,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; @@ -2317,7 +2291,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); @@ -2495,7 +2469,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) @@ -2711,16 +2685,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; @@ -3863,7 +3827,7 @@ BOOL LLVOVolume::setIsFlexible(BOOL is_flexible) res = setVolume(volume_params, 1); if (res) { - markForUpdate(TRUE); + markForUpdate(); } } return res; @@ -3911,7 +3875,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()) { @@ -4688,13 +4652,13 @@ void LLVOVolume::setSelected(BOOL sel) LLViewerObject::setSelected(sel); if (isAnimatedObject()) { - getRootEdit()->recursiveMarkForUpdate(TRUE); + getRootEdit()->recursiveMarkForUpdate(); } else { if (mDrawable.notNull()) { - markForUpdate(TRUE); + markForUpdate(); } } } @@ -4791,14 +4755,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; } @@ -5778,81 +5742,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) @@ -5889,7 +5778,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); } @@ -6386,7 +6275,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) @@ -6402,12 +6290,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) @@ -6460,7 +6342,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(); @@ -6826,7 +6708,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 c590cbf637..044cbd3871 100644 --- a/indra/newview/llvovolume.h +++ b/indra/newview/llvovolume.h @@ -184,8 +184,7 @@ public: F32 getVObjRadius() const override { return mVObjRadius; }; const LLMatrix4& 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 @@ -429,8 +428,7 @@ protected: 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 ab80d19eb2..98329ae894 100644 --- a/indra/newview/llvowlsky.cpp +++ b/indra/newview/llvowlsky.cpp @@ -124,7 +124,7 @@ void LLVOWLSky::resetVertexBuffers() mStarsVerts = nullptr; mFsSkyVerts = nullptr; - gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL, TRUE); + gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL); } void LLVOWLSky::cleanupGL() @@ -139,7 +139,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 0414f40117..048230a6e4 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -298,7 +298,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; @@ -510,7 +509,6 @@ void LLPipeline::init() connectRefreshCachedSettingsSafe("RenderAutoMaskAlphaNonDeferred"); connectRefreshCachedSettingsSafe("RenderUseFarClip"); connectRefreshCachedSettingsSafe("RenderAvatarMaxNonImpostors"); - connectRefreshCachedSettingsSafe("RenderDelayVBUpdate"); connectRefreshCachedSettingsSafe("UseOcclusion"); // DEPRECATED -- connectRefreshCachedSettingsSafe("WindLightUseAtmosShaders"); // DEPRECATED -- connectRefreshCachedSettingsSafe("RenderDeferred"); @@ -1039,7 +1037,6 @@ void LLPipeline::refreshCachedSettings() LLPipeline::sShowJellyDollAsImpostor = gSavedSettings.getBOOL("RenderJellyDollsAsImpostors"); LLVOAvatar::sMaxNonImpostors = gSavedSettings.getU32("RenderAvatarMaxNonImpostors"); LLVOAvatar::updateImpostorRendering(LLVOAvatar::sMaxNonImpostors); - LLPipeline::sDelayVBUpdate = gSavedSettings.getBOOL("RenderDelayVBUpdate"); // Make change to RenderAttachedLights & RenderAttachedParticles instant LLPipeline::sRenderAttachedLights = gSavedSettings.getBOOL("RenderAttachedLights"); LLPipeline::sRenderAttachedParticles = gSavedSettings.getBOOL("RenderAttachedParticles"); @@ -1864,7 +1861,7 @@ void LLPipeline::createObject(LLViewerObject* vobj) vobj->setDrawableParent(NULL); // LLPipeline::addObject 2 } - markRebuild(drawablep, LLDrawable::REBUILD_ALL, TRUE); + markRebuild(drawablep, LLDrawable::REBUILD_ALL); // FIRE-23122 BUG-225920 Remove broken RenderAnimateRes functionality. //if (drawablep->getVOVolume() && RenderAnimateRes) @@ -1983,10 +1980,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(); } } // removing elements in the middle of a vector is a really bad idea. I'll just create a new one and swap it at the end. @@ -3096,70 +3093,34 @@ 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)) + if (!drawablep->isState(LLDrawable::IN_REBUILD_Q1)) { - priority = true; + mBuildQ1.push_back(drawablep); + drawablep->setState(LLDrawable::IN_REBUILD_Q1); // mark drawable as being in priority queue } - if (priority) - { - 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 - } - // FIRE-16485: Crash when calling texture refresh on an object that has a blacklisted copy - //if (flag & (LLDrawable::REBUILD_VOLUME | LLDrawable::REBUILD_POSITION)) - if ((flag & (LLDrawable::REBUILD_VOLUME | LLDrawable::REBUILD_POSITION)) && drawablep->getVObj().notNull()) - // + + // FIRE-16485: Crash when calling texture refresh on an object that has a blacklisted copy + //if (flag & (LLDrawable::REBUILD_VOLUME | LLDrawable::REBUILD_POSITION)) + if ((flag & (LLDrawable::REBUILD_VOLUME | LLDrawable::REBUILD_POSITION)) && drawablep->getVObj().notNull()) + // { drawablep->getVObj()->setChanged(LLXform::SILHOUETTE); } @@ -3207,7 +3168,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(); } @@ -3266,7 +3226,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(); } @@ -10976,7 +10935,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(); @@ -10987,14 +10946,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(); @@ -11005,7 +10964,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 8432bb54f1..b887a53d82 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -191,8 +191,8 @@ public: 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); @@ -642,7 +642,6 @@ public: 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; diff --git a/indra/newview/vjfloaterlocalmesh.cpp b/indra/newview/vjfloaterlocalmesh.cpp index 697a3842d9..513f3b2ac9 100644 --- a/indra/newview/vjfloaterlocalmesh.cpp +++ b/indra/newview/vjfloaterlocalmesh.cpp @@ -392,22 +392,34 @@ bool LLFloaterLocalMesh::processPrimCreated(LLViewerObject* object) return false; } - if(auto floater_ptr = LLLocalMeshSystem::getInstance()->getFloaterPointer()) + if (auto floater_ptr = LLLocalMeshSystem::getInstance()->getFloaterPointer()) { - floater_ptr->update_selected_target( object->getID() ); + floater_ptr->update_selected_target(object->getID()); auto scroll_ctrl_selected_item = floater_ptr->mScrollCtrl->getFirstSelected(); - if(!scroll_ctrl_selected_item){return true;}; // at this point we have a valid object even if we can't fill it. + if (!scroll_ctrl_selected_item) + { + // at this point we have a valid object even if we can't fill it. + return true; + } auto scroll_ctrl_selected_column = scroll_ctrl_selected_item->getColumn(LOCAL_TRACKING_ID_COLUMN); - if(!scroll_ctrl_selected_column){return true;}; // at this point we have a valid object even if we can't fill it. + if (!scroll_ctrl_selected_column) + { + // at this point we have a valid object even if we can't fill it. + return true; + } auto objectlist_combo_box = floater_ptr->getChild("object_apply_list"); - if(!objectlist_combo_box){return true;}; // at this point we have a valid object even if we can't fill it. + if (!objectlist_combo_box) + { + // at this point we have a valid object even if we can't fill it. + return true; + } // TODO: replace this with check box. "apply selected" bool apply_local { scroll_ctrl_selected_item && scroll_ctrl_selected_column && objectlist_combo_box }; - if ( apply_local ) + if (apply_local) { local_id = scroll_ctrl_selected_column->getValue().asUUID(); // fill it up with local goodness @@ -419,13 +431,13 @@ bool LLFloaterLocalMesh::processPrimCreated(LLViewerObject* object) int object_idx = objectlist_combo_box->getFirstSelectedIndex(); LLLocalMeshSystem::getInstance()->applyVObject(object->getID(), local_id, object_idx, use_scale); volp = object->getVolume(); - if(!volp) + if (!volp) { return true; } volume_params = volp->getParams(); object->updateVolume(volume_params); - object->markForUpdate(true); + object->markForUpdate(); } } return true; diff --git a/indra/newview/vjlocalmesh.cpp b/indra/newview/vjlocalmesh.cpp index 656525e0ab..fe8b3b9625 100644 --- a/indra/newview/vjlocalmesh.cpp +++ b/indra/newview/vjlocalmesh.cpp @@ -779,12 +779,12 @@ void LLLocalMeshFile::applyToVObject(LLUUID viewer_object_id, int object_index, // force refresh (selected/edit mode won't let it redraw otherwise) auto& target_drawable = target_object->mDrawable; - if( target_drawable.notNull() ) + if (target_drawable.notNull()) { - target_object->markForUpdate(true); + target_object->markForUpdate(); // target_drawable->updateSpatialExtents(); // target_drawable->movePartition(); - gPipeline.markRebuild(target_drawable, LLDrawable::REBUILD_ALL, true); + gPipeline.markRebuild(target_drawable, LLDrawable::REBUILD_ALL); if(auto floater_ptr = LLLocalMeshSystem::getInstance()->getFloaterPointer(); floater_ptr != nullptr) { floater_ptr->toggleSelectTool(false);