diff options
author | Eli Linden <eli@lindenlab.com> | 2010-05-25 14:33:30 -0700 |
---|---|---|
committer | Eli Linden <eli@lindenlab.com> | 2010-05-25 14:33:30 -0700 |
commit | 208d935e8f22b03178648dec4bc579a3468232f9 (patch) | |
tree | 27f68d7fc161ae87287c3f113bbcd6f68cef6c14 /indra/newview | |
parent | 16d337307ea618cc2a72b4611c3404b8c15f7f54 (diff) | |
parent | 1b56e796241f0efbcbe6a3f95d373220b6b54fad (diff) |
Merge
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/app_settings/settings.xml | 11 | ||||
-rw-r--r-- | indra/newview/llappearancemgr.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llinventorymodel.cpp | 2 | ||||
-rw-r--r-- | indra/newview/lltexlayer.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llviewertexture.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llvoavatarself.cpp | 34 | ||||
-rw-r--r-- | indra/newview/llvoavatarself.h | 21 | ||||
-rw-r--r-- | indra/newview/llwearable.cpp | 2 |
8 files changed, 53 insertions, 29 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 39e0166145..a4aa90289d 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -9053,6 +9053,17 @@ <key>Value</key> <integer>0</integer> </map> + <key>TextureDiscardLevel</key> + <map> + <key>Comment</key> + <string>Specify texture resolution (0 = highest, 5 = lowest)</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>U32</string> + <key>Value</key> + <integer>0</integer> + </map> <key>TextureLoadFullRes</key> <map> <key>Comment</key> diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index dcef86a5fc..e481611ace 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -526,7 +526,7 @@ bool LLWearableHoldingPattern::pollMissingWearables() if (done) { - gAgentAvatarp->wearablesLoaded(); + gAgentAvatarp->debugWearablesLoaded(); clearCOFLinksForMissingWearables(); onAllComplete(); } @@ -1667,7 +1667,7 @@ void LLAppearanceMgr::autopopulateOutfits() // Handler for anything that's deferred until avatar de-clouds. void LLAppearanceMgr::onFirstFullyVisible() { - gAgentAvatarp->avatarVisible(); + gAgentAvatarp->debugAvatarVisible(); autopopulateOutfits(); } diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index c373512ace..864545f870 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -1244,9 +1244,11 @@ void LLInventoryModel::addCategory(LLViewerInventoryCategory* category) void LLInventoryModel::addItem(LLViewerInventoryItem* item) { + /* const LLViewerInventoryCategory* cat = gInventory.getCategory(item->getParentUUID()); // Seraph remove for 2.1 const std::string cat_name = cat ? cat->getName() : "CAT NOT FOUND"; // Seraph remove for 2.1 llinfos << "Added item [ name:" << item->getName() << " UUID:" << item->getUUID() << " type:" << item->getActualType() << " ] to folder [ name:" << cat_name << " uuid:" << item->getParentUUID() << " ]" << llendl; // Seraph remove for 2.1 + */ llassert(item); if(item) diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp index 337627cc79..4be03596f8 100644 --- a/indra/newview/lltexlayer.cpp +++ b/indra/newview/lltexlayer.cpp @@ -237,7 +237,7 @@ BOOL LLTexLayerSetBuffer::render() { if (mTexLayerSet->isVisible()) { - mTexLayerSet->getAvatar()->bakedTextureUpload(mTexLayerSet->getBakedTexIndex(), FALSE); // FALSE for start of upload, TRUE for finish. + mTexLayerSet->getAvatar()->debugBakedTextureUpload(mTexLayerSet->getBakedTexIndex(), FALSE); // FALSE for start of upload, TRUE for finish. readBackAndUpload(); } else diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index d925ab0d90..d8a9ce9374 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -1893,6 +1893,12 @@ bool LLViewerFetchedTexture::updateFetch() h = mGLTexturep->getHeight(0); c = mComponents; } + + const U32 override_tex_discard_level = gSavedSettings.getU32("TextureDiscardLevel"); + if (override_tex_discard_level != 0) + { + desired_discard = override_tex_discard_level; + } // bypass texturefetch directly by pulling from LLTextureCache bool fetch_request_created = false; diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index c82de73f25..cf3fb01b5a 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -157,14 +157,14 @@ void LLVOAvatarSelf::initInstance() { for (U32 j = 0; j <= MAX_DISCARD_LEVEL; ++j) { - mTextureLoadTimes[i][j] = -1.0f; + mDebugTextureLoadTimes[i][j] = -1.0f; } } for (U32 i =0; i < LLVOAvatarDefines::BAKED_NUM_INDICES; ++i) { - mBakedTextureTimes[i][0] = -1.0f; - mBakedTextureTimes[i][1] = -1.0f; + mDebugBakedTextureTimes[i][0] = -1.0f; + mDebugBakedTextureTimes[i][1] = -1.0f; } status &= buildMenus(); @@ -1271,6 +1271,8 @@ BOOL LLVOAvatarSelf::isLocalTextureDataAvailable(const LLTexLayerSet* layerset) //----------------------------------------------------------------------------- BOOL LLVOAvatarSelf::isLocalTextureDataFinal(const LLTexLayerSet* layerset) const { + const U32 override_tex_discard_level = gSavedSettings.getU32("TextureDiscardLevel"); + for (U32 i = 0; i < mBakedTextureDatas.size(); i++) { if (layerset == mBakedTextureDatas[i].mTexLayerSet) @@ -1285,7 +1287,7 @@ BOOL LLVOAvatarSelf::isLocalTextureDataFinal(const LLTexLayerSet* layerset) cons const U32 wearable_count = gAgentWearables.getWearableCount(wearable_type); for (U32 wearable_index = 0; wearable_index < wearable_count; wearable_index++) { - if (getLocalDiscardLevel(*local_tex_iter, wearable_index) != 0) + if (getLocalDiscardLevel(*local_tex_iter, wearable_index) > (S32)(override_tex_discard_level)) { return FALSE; } @@ -1761,12 +1763,12 @@ BOOL LLVOAvatarSelf::getIsCloud() } /*static*/ -void LLVOAvatarSelf::onTimingLocalTexLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata) +void LLVOAvatarSelf::debugOnTimingLocalTexLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata) { - gAgentAvatarp->timingLocalTexLoaded(success, src_vi, src, aux_src, discard_level, final, userdata); + gAgentAvatarp->debugTimingLocalTexLoaded(success, src_vi, src, aux_src, discard_level, final, userdata); } -void LLVOAvatarSelf::timingLocalTexLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata) +void LLVOAvatarSelf::debugTimingLocalTexLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata) { LLAvatarTexData *data = (LLAvatarTexData *)userdata; if (!data) @@ -1776,14 +1778,14 @@ void LLVOAvatarSelf::timingLocalTexLoaded(BOOL success, LLViewerFetchedTexture * ETextureIndex index = data->mIndex; -if (index < 0 || index >= TEX_NUM_INDICES) + if (index < 0 || index >= TEX_NUM_INDICES) { return; } if (discard_level >=0 && discard_level <= MAX_DISCARD_LEVEL) // ignore discard level -1, as it means we have no data. { - mTextureLoadTimes[(U32)index][(U32)discard_level] = mDebugSelfLoadTimer.getElapsedTimeF32(); + mDebugTextureLoadTimes[(U32)index][(U32)discard_level] = mDebugSelfLoadTimer.getElapsedTimeF32(); } if (final) { @@ -1791,14 +1793,14 @@ if (index < 0 || index >= TEX_NUM_INDICES) } } -void LLVOAvatarSelf::bakedTextureUpload(EBakedTextureIndex index, BOOL finished) +void LLVOAvatarSelf::debugBakedTextureUpload(EBakedTextureIndex index, BOOL finished) { U32 done = 0; if (finished) { done = 1; } - mBakedTextureTimes[index][done] = mDebugSelfLoadTimer.getElapsedTimeF32(); + mDebugBakedTextureTimes[index][done] = mDebugSelfLoadTimer.getElapsedTimeF32(); } const LLUUID& LLVOAvatarSelf::grabBakedTexture(EBakedTextureIndex baked_index) const @@ -1963,7 +1965,7 @@ void LLVOAvatarSelf::setNewBakedTexture( ETextureIndex te, const LLUUID& uuid ) const LLVOAvatarDictionary::TextureEntry *texture_dict = LLVOAvatarDictionary::getInstance()->getTexture(te); if (texture_dict->mIsBakedTexture) { - bakedTextureUpload(texture_dict->mBakedTextureIndex, TRUE); // FALSE for start of upload, TRUE for finish. + debugBakedTextureUpload(texture_dict->mBakedTextureIndex, TRUE); // FALSE for start of upload, TRUE for finish. llinfos << "New baked texture: " << texture_dict->mName << " UUID: " << uuid <<llendl; } else @@ -1993,8 +1995,8 @@ void LLVOAvatarSelf::outputRezDiagnostics() const { const F32 final_time = mDebugSelfLoadTimer.getElapsedTimeF32(); llinfos << "REZTIME: Myself rez stats:" << llendl; - llinfos << "\t Time from avatar creation to load wearables: " << (S32)mTimeWearablesLoaded << llendl; - llinfos << "\t Time from avatar creation to de-cloud: " << (S32)mTimeAvatarVisible << llendl; + llinfos << "\t Time from avatar creation to load wearables: " << (S32)mDebugTimeWearablesLoaded << llendl; + llinfos << "\t Time from avatar creation to de-cloud: " << (S32)mDebugTimeAvatarVisible << llendl; llinfos << "\t Time from avatar creation to de-cloud for others: " << (S32)final_time << llendl; llinfos << "\t Load time for each texture: " << llendl; for (U32 i = 0; i < LLVOAvatarDefines::TEX_NUM_INDICES; ++i) @@ -2005,7 +2007,7 @@ void LLVOAvatarSelf::outputRezDiagnostics() const for (j=0; j <= MAX_DISCARD_LEVEL; j++) { out << "\t"; - S32 load_time = (S32)mTextureLoadTimes[i][j]; + S32 load_time = (S32)mDebugTextureLoadTimes[i][j]; if (load_time == -1) { out << "*"; @@ -2025,7 +2027,7 @@ void LLVOAvatarSelf::outputRezDiagnostics() const llinfos << "\t Time points for each upload (start / finish)" << llendl; for (U32 i = 0; i < LLVOAvatarDefines::BAKED_NUM_INDICES; ++i) { - llinfos << "\t\t (" << i << ") \t" << (S32)mBakedTextureTimes[i][0] << " / " << (S32)mBakedTextureTimes[i][1] << llendl; + llinfos << "\t\t (" << i << ") \t" << (S32)mDebugBakedTextureTimes[i][0] << " / " << (S32)mDebugBakedTextureTimes[i][1] << llendl; } } diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h index 666219f3aa..ce37ba2766 100644 --- a/indra/newview/llvoavatarself.h +++ b/indra/newview/llvoavatarself.h @@ -124,8 +124,6 @@ public: //-------------------------------------------------------------------- public: /*virtual*/ BOOL getIsCloud(); - void bakedTextureUpload(LLVOAvatarDefines::EBakedTextureIndex index, BOOL finished); - static void onTimingLocalTexLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata); //-------------------------------------------------------------------- // Region state @@ -215,8 +213,11 @@ public: void setCachedBakedTexture(LLVOAvatarDefines::ETextureIndex i, const LLUUID& uuid); void forceBakeAllTextures(bool slam_for_debug = false); static void processRebakeAvatarTextures(LLMessageSystem* msg, void**); + BOOL protected: /*virtual*/ void removeMissingBakedTextures(); +private: + LLFrameTimer mBakeTimeoutTimer; //-------------------------------------------------------------------- // Layers @@ -348,16 +349,18 @@ public: LLUUID mAvatarID; LLVOAvatarDefines::ETextureIndex mIndex; }; - void wearablesLoaded() { mTimeWearablesLoaded = mDebugSelfLoadTimer.getElapsedTimeF32(); } - void avatarVisible() { mTimeAvatarVisible = mDebugSelfLoadTimer.getElapsedTimeF32(); } + void debugWearablesLoaded() { mDebugTimeWearablesLoaded = mDebugSelfLoadTimer.getElapsedTimeF32(); } + void debugAvatarVisible() { mDebugTimeAvatarVisible = mDebugSelfLoadTimer.getElapsedTimeF32(); } void outputRezDiagnostics() const; + void debugBakedTextureUpload(LLVOAvatarDefines::EBakedTextureIndex index, BOOL finished); + static void debugOnTimingLocalTexLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata); private: LLFrameTimer mDebugSelfLoadTimer; - F32 mTimeWearablesLoaded; - F32 mTimeAvatarVisible; - F32 mTextureLoadTimes[LLVOAvatarDefines::TEX_NUM_INDICES][MAX_DISCARD_LEVEL+1]; // load time for each texture at each discard level - F32 mBakedTextureTimes[LLVOAvatarDefines::BAKED_NUM_INDICES][2]; // time to start upload and finish upload of each baked texture - void timingLocalTexLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata); + F32 mDebugTimeWearablesLoaded; + F32 mDebugTimeAvatarVisible; + F32 mDebugTextureLoadTimes[LLVOAvatarDefines::TEX_NUM_INDICES][MAX_DISCARD_LEVEL+1]; // load time for each texture at each discard level + F32 mDebugBakedTextureTimes[LLVOAvatarDefines::BAKED_NUM_INDICES][2]; // time to start upload and finish upload of each baked texture + void debugTimingLocalTexLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata); /** Diagnostics ** ** diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp index 6c27aefebb..10b9a18fa8 100644 --- a/indra/newview/llwearable.cpp +++ b/indra/newview/llwearable.cpp @@ -442,7 +442,7 @@ BOOL LLWearable::importFile( LLFILE* file ) delete mSavedTEMap[te]; } - image->setLoadedCallback(LLVOAvatarSelf::onTimingLocalTexLoaded,0,TRUE,FALSE, new LLVOAvatarSelf::LLAvatarTexData(id, (LLVOAvatarDefines::ETextureIndex)te)); + image->setLoadedCallback(LLVOAvatarSelf::debugOnTimingLocalTexLoaded,0,TRUE,FALSE, new LLVOAvatarSelf::LLAvatarTexData(id, (LLVOAvatarDefines::ETextureIndex)te)); LLUUID textureid(text_buffer); |