diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/VIEWER_VERSION.txt | 2 | ||||
-rw-r--r-- | indra/newview/lldrawpoolbump.cpp | 4 | ||||
-rw-r--r-- | indra/newview/lllogininstance.cpp | 86 | ||||
-rw-r--r-- | indra/newview/lllogininstance.h | 1 | ||||
-rw-r--r-- | indra/newview/llspatialpartition.h | 2 | ||||
-rw-r--r-- | indra/newview/llviewertexture.cpp | 16 | ||||
-rw-r--r-- | indra/newview/llviewertexture.h | 5 | ||||
-rw-r--r-- | indra/newview/llvovolume.cpp | 51 |
8 files changed, 77 insertions, 90 deletions
diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt index 10abd6ae5b..4aa5a3a58e 100644 --- a/indra/newview/VIEWER_VERSION.txt +++ b/indra/newview/VIEWER_VERSION.txt @@ -1 +1 @@ -6.6.6 +6.6.8 diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp index 8db6a10e26..ed991a2bbf 100644 --- a/indra/newview/lldrawpoolbump.cpp +++ b/indra/newview/lldrawpoolbump.cpp @@ -77,7 +77,9 @@ static S32 cube_channel = -1; static S32 diffuse_channel = -1; static S32 bump_channel = -1; -#define LL_BUMPLIST_MULTITHREADED 0 // TODO -- figure out why this doesn't work +// Enabled after changing LLViewerTexture::mNeedsCreateTexture to an +// LLAtomicBool; this should work just fine, now. HB +#define LL_BUMPLIST_MULTITHREADED 1 // static void LLStandardBumpmap::init() diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp index 82ecfbd4dc..dd8c9b2dde 100644 --- a/indra/newview/lllogininstance.cpp +++ b/indra/newview/lllogininstance.cpp @@ -451,26 +451,8 @@ void LLLoginInstance::handleLoginFailure(const LLSD& event) LLSD args(llsd::map( "MESSAGE", LLTrans::getString(response["message_id"]) )); LLSD payload; - LLNotificationsUtil::add("PromptMFAToken", args, payload, [=](LLSD const & notif, LLSD const & response) { - bool continue_clicked = response["continue"].asBoolean(); - std::string token = response["token"].asString(); - LL_DEBUGS("LLLogin") << "PromptMFAToken: response: " << response << " continue_clicked" << continue_clicked << LL_ENDL; - - // strip out whitespace - SL-17034/BUG-231938 - token = boost::regex_replace(token, boost::regex("\\s"), ""); - - if (continue_clicked && !token.empty()) - { - LL_INFOS("LLLogin") << "PromptMFAToken: token submitted" << LL_ENDL; - - // Set the request data to true and retry login. - mRequestData["params"]["token"] = token; - reconnect(); - } else { - LL_INFOS("LLLogin") << "PromptMFAToken: no token, attemptComplete" << LL_ENDL; - attemptComplete(); - } - }); + LLNotificationsUtil::add("PromptMFAToken", args, payload, + boost::bind(&LLLoginInstance::handleMFAChallenge, this, _1, _2)); } else if( reason_response == "key" || reason_response == "presence" @@ -547,23 +529,59 @@ void LLLoginInstance::handleIndeterminate(const LLSD& event) bool LLLoginInstance::handleTOSResponse(bool accepted, const std::string& key) { - if(accepted) - { - LL_INFOS("LLLogin") << "LLLoginInstance::handleTOSResponse: accepted" << LL_ENDL; + if(accepted) + { + LL_INFOS("LLLogin") << "LLLoginInstance::handleTOSResponse: accepted " << LL_ENDL; - // Set the request data to true and retry login. - mRequestData["params"][key] = true; - reconnect(); - } - else - { - LL_INFOS("LLLogin") << "LLLoginInstance::handleTOSResponse: attemptComplete" << LL_ENDL; + // Set the request data to true and retry login. + mRequestData["params"][key] = true; - attemptComplete(); - } + if (!mRequestData["params"]["token"].asString().empty()) + { + // SL-18511 this TOS failure happened while we are in the middle of an MFA challenge/response. + // the previously entered token is very likely expired, so prompt again + LLSD args(llsd::map( "MESSAGE", LLTrans::getString("LoginFailedAuthenticationMFARequired") )); + LLSD payload; + LLNotificationsUtil::add("PromptMFAToken", args, payload, + boost::bind(&LLLoginInstance::handleMFAChallenge, this, _1, _2)); + } + else + { + reconnect(); + } + } + else + { + LL_INFOS("LLLogin") << "LLLoginInstance::handleTOSResponse: attemptComplete" << LL_ENDL; + + attemptComplete(); + } + + LLEventPumps::instance().obtain(TOS_REPLY_PUMP).stopListening(TOS_LISTENER_NAME); + return true; +} - LLEventPumps::instance().obtain(TOS_REPLY_PUMP).stopListening(TOS_LISTENER_NAME); - return true; +bool LLLoginInstance::handleMFAChallenge(LLSD const & notif, LLSD const & response) +{ + bool continue_clicked = response["continue"].asBoolean(); + std::string token = response["token"].asString(); + LL_DEBUGS("LLLogin") << "PromptMFAToken: response: " << response << " continue_clicked" << continue_clicked << LL_ENDL; + + // strip out whitespace - SL-17034/BUG-231938 + token = boost::regex_replace(token, boost::regex("\\s"), ""); + + if (continue_clicked && !token.empty()) + { + LL_INFOS("LLLogin") << "PromptMFAToken: token submitted" << LL_ENDL; + + // Set the request data to true and retry login. + mRequestData["params"]["token"] = token; + reconnect(); + } else { + LL_INFOS("LLLogin") << "PromptMFAToken: no token, attemptComplete" << LL_ENDL; + attemptComplete(); + } + return true; } std::string construct_start_string() diff --git a/indra/newview/lllogininstance.h b/indra/newview/lllogininstance.h index b759b43474..ee3ef0e4b1 100644 --- a/indra/newview/lllogininstance.h +++ b/indra/newview/lllogininstance.h @@ -84,6 +84,7 @@ private: void syncWithUpdater(ResponsePtr resp, const LLSD& notification, const LLSD& response); bool handleTOSResponse(bool v, const std::string& key); + bool handleMFAChallenge(LLSD const & notif, LLSD const & response); void attemptComplete() { mAttemptComplete = true; } // In the future an event? diff --git a/indra/newview/llspatialpartition.h b/indra/newview/llspatialpartition.h index f7bc9fb644..6d3ef33801 100644 --- a/indra/newview/llspatialpartition.h +++ b/indra/newview/llspatialpartition.h @@ -264,7 +264,7 @@ public: return lhs->mAvatarp < rhs->mAvatarp; } - return lhs->mRenderOrder < rhs->mRenderOrder; + return lhs->mRenderOrder > rhs->mRenderOrder; } }; diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index e3ac56d0d3..8a11c5cf8f 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -1118,7 +1118,7 @@ void LLViewerFetchedTexture::init(bool firstinit) mLoadedCallbackDesiredDiscardLevel = S8_MAX; mPauseLoadedCallBacks = FALSE; - mNeedsCreateTexture = FALSE; + mNeedsCreateTexture = false; mIsRawImageValid = FALSE; mRawDiscardLevel = INVALID_DISCARD_LEVEL; @@ -1400,12 +1400,12 @@ void LLViewerFetchedTexture::addToCreateTexture() { //just update some variables, not to create a real GL texture. createGLTexture(mRawDiscardLevel, mRawImage, 0, FALSE); - mNeedsCreateTexture = FALSE; + mNeedsCreateTexture = false; destroyRawImage(); } else if(!force_update && getDiscardLevel() > -1 && getDiscardLevel() <= mRawDiscardLevel) { - mNeedsCreateTexture = FALSE; + mNeedsCreateTexture = false; destroyRawImage(); } else @@ -1441,7 +1441,7 @@ void LLViewerFetchedTexture::addToCreateTexture() mRawDiscardLevel += i; if(mRawDiscardLevel >= getDiscardLevel() && getDiscardLevel() > 0) { - mNeedsCreateTexture = FALSE; + mNeedsCreateTexture = false; destroyRawImage(); return; } @@ -1473,7 +1473,7 @@ BOOL LLViewerFetchedTexture::preCreateTexture(S32 usename/*= 0*/) destroyRawImage(); return FALSE; } - mNeedsCreateTexture = FALSE; + mNeedsCreateTexture = false; if (mRawImage.isNull()) { @@ -1609,14 +1609,14 @@ void LLViewerFetchedTexture::postCreateTexture() destroyRawImage(); } - mNeedsCreateTexture = FALSE; + mNeedsCreateTexture = false; } void LLViewerFetchedTexture::scheduleCreateTexture() { if (!mNeedsCreateTexture) { - mNeedsCreateTexture = TRUE; + mNeedsCreateTexture = true; if (preCreateTexture()) { #if LL_IMAGEGL_THREAD_CHECK @@ -1630,7 +1630,7 @@ void LLViewerFetchedTexture::scheduleCreateTexture() memcpy(data_copy, data, size); } #endif - mNeedsCreateTexture = TRUE; + mNeedsCreateTexture = true; auto mainq = LLImageGLThread::sEnabled ? mMainQueue.lock() : nullptr; if (mainq) { diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index b953d7006b..2f5e0d01df 100644 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -27,6 +27,7 @@ #ifndef LL_LLVIEWERTEXTURE_H #define LL_LLVIEWERTEXTURE_H +#include "llatomic.h" #include "llgltexture.h" #include "lltimer.h" #include "llframetimer.h" @@ -528,7 +529,9 @@ protected: LLFrameTimer mStopFetchingTimer; // Time since mDecodePriority == 0.f. BOOL mInImageList; // TRUE if image is in list (in which case don't reset priority!) - BOOL mNeedsCreateTexture; + // This needs to be atomic, since it is written both in the main thread + // and in the GL image worker thread... HB + LLAtomicBool mNeedsCreateTexture; BOOL mForSculpt ; //a flag if the texture is used as sculpt data. BOOL mIsFetched ; //is loaded from remote or from cache, not generated locally. diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index e923115c43..a4e0d367c8 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -5515,7 +5515,7 @@ static inline void add_face(T*** list, U32* count, T* face) { if (count[1] < MAX_FACE_COUNT) { - //face->setDrawOrderIndex(count[1]); + face->setDrawOrderIndex(count[1]); list[1][count[1]++] = face; } } @@ -5523,36 +5523,12 @@ static inline void add_face(T*** list, U32* count, T* face) { if (count[0] < MAX_FACE_COUNT) { - //face->setDrawOrderIndex(count[0]); + face->setDrawOrderIndex(count[0]); list[0][count[0]++] = face; } } } -// return index into linkset for given object (0 for root prim) -U32 get_linkset_index(LLVOVolume* vobj) -{ - LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE; - if (vobj->isRootEdit()) - { - return 0; - } - - LLViewerObject* root = vobj->getRootEdit(); - U32 idx = 1; - for (const auto& child : root->getChildren()) - { - if (child == vobj) - { - return idx; - } - ++idx; - } - - llassert(false); - return idx; //should never get here -} - void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) { LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME; @@ -5714,8 +5690,6 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) { avatar->addAttachmentOverridesForObject(vobj, NULL, false); } - - U32 linkset_index = get_linkset_index(vobj); // Standard rigged mesh attachments: bool rigged = !vobj->isAnimatedObject() && skinInfo && vobj->isAttachment(); @@ -5736,9 +5710,6 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) continue; } - // order by linkset index first and face index second - facep->setDrawOrderIndex(linkset_index * 100 + i); - //ALWAYS null out vertex buffer on rebuild -- if the face lands in a render // batch, it will recover its vertex buffer reference from the spatial group facep->setVertexBuffer(NULL); @@ -5763,6 +5734,11 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) if (facep->isState(LLFace::RIGGED)) { //face is not rigged but used to be, remove from rigged face pool + LLDrawPoolAvatar* pool = (LLDrawPoolAvatar*)facep->getPool(); + if (pool) + { + pool->removeFace(facep); + } facep->clearState(LLFace::RIGGED); facep->mAvatar = NULL; facep->mSkinInfo = NULL; @@ -6216,14 +6192,6 @@ struct CompareBatchBreakerRigged } }; -struct CompareDrawOrder -{ - bool operator()(const LLFace* const& lhs, const LLFace* const& rhs) - { - return lhs->getDrawOrderIndex() < rhs->getDrawOrderIndex(); - } -}; - U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace** faces, U32 face_count, BOOL distance_sort, BOOL batch_textures, BOOL rigged) { LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME; @@ -6267,11 +6235,6 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace //sort faces by things that break batches, including avatar and mesh id std::sort(faces, faces + face_count, CompareBatchBreakerRigged()); } - else - { - // preserve legacy draw order for rigged faces - std::sort(faces, faces + face_count, CompareDrawOrder()); - } } else if (!distance_sort) { |