# Conflicts:
#	indra/llcommon/llqueuedthread.cpp
#	indra/llcommon/lluuid.cpp
#	indra/llimage/llimageworker.h
#	indra/newview/app_settings/settings.xml
#	indra/newview/llappviewerwin32.cpp
#	indra/newview/llfilepicker.cpp
#	indra/newview/llviewercontrol.cpp
#	indra/newview/llviewerobject.h
#	indra/newview/llvovolume.cpp
#	indra/newview/pipeline.cpp
master
Ansariel 2023-05-17 23:23:28 +02:00
commit aac968e43a
38 changed files with 162 additions and 372 deletions

View File

@ -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

View File

@ -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);
}

View File

@ -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();
}

View File

@ -51,7 +51,7 @@ public:
handle_t decodeImage(const LLPointer<LLImageFormatted>& image,
S32 discard, BOOL needs_aux,
const LLPointer<Responder>& responder);
S32 getPending();
size_t getPending();
size_t update(F32 max_time_ms);
void shutdown();

View File

@ -13845,17 +13845,6 @@ Change of this parameter will affect the layout of buttons in notification toast
<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>
@ -17916,19 +17905,6 @@ Change of this parameter will affect the layout of buttons in notification toast
<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>
<key>Backup</key>
<integer>0</integer>
</map>
<key>ShowPhysicsShapeInEdit</key>
<map>
<key>Comment</key>

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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;
}

View File

@ -838,12 +838,14 @@ bool LLAppViewerWin32::init()
// </FS:ND>
//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)

View File

@ -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();
}
}

View File

@ -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++)

View File

@ -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;

View File

@ -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);
}
}
}

View File

@ -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();

View File

@ -85,29 +85,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)

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -716,8 +716,6 @@ bool toggle_show_object_render_cost(const LLSD& newvalue)
return true;
}
void handleRenderAutoMuteByteLimitChanged(const LLSD& new_value);
// <FS:Ansariel> 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);

View File

@ -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();
}
}

View File

@ -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);
}

View File

@ -462,9 +462,8 @@ public:
// <FS:Ansariel> Getter for HUD icon attached to the object
LLPointer<LLHUDIcon> 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;

View File

@ -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

View File

@ -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()
// <vobj && !vobj->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;

View File

@ -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()
// <FS:Beq> better state change flagging
if( changed_slow_state )
{
gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_GEOMETRY, true);
gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_GEOMETRY);
}
// </FS:Beq>
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -301,7 +301,7 @@ BOOL LLVOPartGroup::updateGeometry(LLDrawable *drawable)
if (group && group->isVisible())
{
dirtySpatialGroup(TRUE);
dirtySpatialGroup();
}
if (!num_parts)

View File

@ -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;
}

View File

@ -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)
{

View File

@ -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
{

View File

@ -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,
}
}
// </FS:Beq>
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;
}
//</FS:Beq>
@ -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<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)
@ -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();

View File

@ -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;

View File

@ -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)

View File

@ -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");
// <FS:Ansariel> 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);
// <FS:Beq> 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();
}
}
// <FS:ND> 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
}
// <FS:Ansariel> 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())
// </FS:Ansariel>
// <FS:Ansariel> 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())
// </FS:Ansariel>
{
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);
}
}
}

View File

@ -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;

View File

@ -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<LLComboBox>("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;

View File

@ -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);