From 91ee5724ca2a3059b0ab3167530f0008f6d7beb9 Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Tue, 22 Jul 2014 03:39:01 -0400 Subject: [PATCH 01/18] Fix compile errors and warnings on linux after merging Shyotl. --- indra/llmath/llmatrix4a.h | 28 ++++++++++++++++----------- indra/llmath/lloctree.h | 4 ++-- indra/newview/lldrawpool.cpp | 3 ++- indra/newview/llflexibleobject.cpp | 6 ++++-- indra/newview/llviewercamera.h | 4 ++-- indra/newview/llviewerobjectlist.cpp | 3 ++- indra/newview/llviewerpartsim.cpp | 16 +++++++++------ indra/newview/llviewertextureanim.cpp | 3 ++- 8 files changed, 41 insertions(+), 26 deletions(-) diff --git a/indra/llmath/llmatrix4a.h b/indra/llmath/llmatrix4a.h index f322c087a..0af8105ec 100644 --- a/indra/llmath/llmatrix4a.h +++ b/indra/llmath/llmatrix4a.h @@ -663,22 +663,28 @@ public: } //======================Logic==================== +private: + template inline void init_foos(LLMatrix4a& foos) const + { + static bool done(false); + if (done) return; + const LLVector4a delta(0.0001f); + foos.setIdentity(); + foos.getRow<0>().sub(delta); + foos.getRow<1>().sub(delta); + foos.getRow<2>().sub(delta); + foos.getRow<3>().sub(delta); + done = true; + } + +public: inline bool isIdentity() const { static LLMatrix4a mins; static LLMatrix4a maxs; - static LLVector4a delta(0.0001f); - static bool init_mins = ( mins.setIdentity(), - mins.getRow<0>().sub(delta), - mins.getRow<1>().sub(delta), - mins.getRow<2>().sub(delta), - mins.getRow<3>().sub(delta), true ); - static bool init_maxs = ( maxs.setIdentity(), - maxs.getRow<0>().add(delta), - maxs.getRow<1>().add(delta), - maxs.getRow<2>().add(delta), - maxs.getRow<3>().add(delta), true ); + init_foos(mins); + init_foos(maxs); LLVector4a mask1 = _mm_and_ps(_mm_cmpgt_ps(mMatrix[0],mins.getRow<0>()), _mm_cmplt_ps(mMatrix[0],maxs.getRow<0>())); LLVector4a mask2 = _mm_and_ps(_mm_cmpgt_ps(mMatrix[1],mins.getRow<1>()), _mm_cmplt_ps(mMatrix[1],maxs.getRow<1>())); diff --git a/indra/llmath/lloctree.h b/indra/llmath/lloctree.h index 5189d852b..0be162f5c 100644 --- a/indra/llmath/lloctree.h +++ b/indra/llmath/lloctree.h @@ -968,11 +968,11 @@ public: #ifdef LL_OCTREE_POOLS void* operator new(size_t size) { - return getPool(size).malloc(); + return LLOctreeNode::getPool(size).malloc(); } void operator delete(void* ptr) { - getPool(sizeof(LLOctreeNode)).free(ptr); + LLOctreeNode::getPool(sizeof(LLOctreeNode)).free(ptr); } #else void* operator new(size_t size) diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp index 7a6ca0e24..3a936eaf8 100644 --- a/indra/newview/lldrawpool.cpp +++ b/indra/newview/lldrawpool.cpp @@ -301,7 +301,8 @@ void LLFacePool::removeFaceReference(LLFace *facep) if (idx != -1) { facep->setReferenceIndex(-1); - std::vector::iterator iter = vector_replace_with_last(mReferences, mReferences.begin() + idx); + std::vector::iterator face_it(mReferences.begin() + idx); + std::vector::iterator iter = vector_replace_with_last(mReferences, face_it); if(iter != mReferences.end()) (*iter)->setReferenceIndex(idx); } diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp index e378c4458..cf97d4e82 100644 --- a/indra/newview/llflexibleobject.cpp +++ b/indra/newview/llflexibleobject.cpp @@ -80,10 +80,12 @@ LLVolumeImplFlexible::LLVolumeImplFlexible(LLViewerObject* vo, LLFlexibleObjectD LLVolumeImplFlexible::~LLVolumeImplFlexible() { - std::vector::iterator iter = vector_replace_with_last(sInstanceList, sInstanceList.begin() + mInstanceIndex); + std::vector::iterator flex_it(sInstanceList.begin() + mInstanceIndex); + std::vector::iterator iter = vector_replace_with_last(sInstanceList, flex_it); if(iter != sInstanceList.end()) (*iter)->mInstanceIndex = mInstanceIndex; - vector_replace_with_last(sUpdateDelay,sUpdateDelay.begin() + mInstanceIndex); + std::vector::iterator update_it(sUpdateDelay.begin() + mInstanceIndex); + vector_replace_with_last(sUpdateDelay, update_it); } //static diff --git a/indra/newview/llviewercamera.h b/indra/newview/llviewercamera.h index 8d4e9ce97..0c465592b 100644 --- a/indra/newview/llviewercamera.h +++ b/indra/newview/llviewercamera.h @@ -39,10 +39,10 @@ class LLViewerObject; // This rotation matrix moves the default OpenGL reference frame // (-Z at, Y up) to Cory's favorite reference frame (X at, Z up) -static LL_ALIGN_16(const LLMatrix4a OGL_TO_CFR_ROTATION(LLVector4a( 0.f, 0.f, -1.f, 0.f), // -Z becomes X +static LL_ALIGN_16(const LLMatrix4a) OGL_TO_CFR_ROTATION(LLVector4a( 0.f, 0.f, -1.f, 0.f), // -Z becomes X LLVector4a(-1.f, 0.f, 0.f, 0.f), // -X becomes Y LLVector4a( 0.f, 1.f, 0.f, 0.f), // Y becomes Z - LLVector4a( 0.f, 0.f, 0.f, 1.f) )); + LLVector4a( 0.f, 0.f, 0.f, 1.f) ); const BOOL FOR_SELECTION = TRUE; const BOOL NOT_FOR_SELECTION = FALSE; diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index e42de793e..a97bc60aa 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -1459,7 +1459,8 @@ void LLViewerObjectList::removeFromActiveList(LLViewerObject* objectp) objectp->setListIndex(-1); - std::vector >::iterator iter = vector_replace_with_last(mActiveObjects,mActiveObjects.begin() + idx); + std::vector >::iterator it(mActiveObjects.begin() + idx); + std::vector >::iterator iter = vector_replace_with_last(mActiveObjects, it); if(iter != mActiveObjects.end()) (*iter)->setListIndex(idx); diff --git a/indra/newview/llviewerpartsim.cpp b/indra/newview/llviewerpartsim.cpp index a27e1ec4e..c3f49f69f 100644 --- a/indra/newview/llviewerpartsim.cpp +++ b/indra/newview/llviewerpartsim.cpp @@ -406,7 +406,8 @@ void LLViewerPartGroup::updateParticles(const F32 lastdt) // Kill dead particles (either flagged dead, or too old) if ((part->mLastUpdateTime > part->mMaxAge) || (LLViewerPart::LL_PART_DEAD_MASK == part->mFlags)) { - vector_replace_with_last(mParticles,mParticles.begin() + i); + part_list_t::iterator it(mParticles.begin() + i); + vector_replace_with_last(mParticles, it); delete part ; } else @@ -416,7 +417,8 @@ void LLViewerPartGroup::updateParticles(const F32 lastdt) { // Transfer particles between groups LLViewerPartSim::getInstance()->put(part) ; - vector_replace_with_last(mParticles,mParticles.begin() + i); + part_list_t::iterator it(mParticles.begin() + i); + vector_replace_with_last(mParticles, it); } else { @@ -721,8 +723,9 @@ void LLViewerPartSim::updateSimulation() if (mViewerPartSources[i]->isDead()) { - vector_replace_with_last(mViewerPartSources,mViewerPartSources.begin() + i); - //mViewerPartSources.erase(mViewerPartSources.begin() + i); + source_list_t::iterator it(mViewerPartSources.begin() + i); + vector_replace_with_last(mViewerPartSources, it); + //mViewerPartSources.erase(it); count--; } else @@ -758,8 +761,9 @@ void LLViewerPartSim::updateSimulation() if (!mViewerPartGroups[i]->getCount()) { delete mViewerPartGroups[i]; - vector_replace_with_last(mViewerPartGroups,mViewerPartGroups.begin() + i); - //mViewerPartGroups.erase(mViewerPartGroups.begin() + i); + group_list_t::iterator it(mViewerPartGroups.begin() + i); + vector_replace_with_last(mViewerPartGroups, it); + //mViewerPartGroups.erase(it); i--; count--; } diff --git a/indra/newview/llviewertextureanim.cpp b/indra/newview/llviewertextureanim.cpp index 525de0ed2..1e6b7a343 100644 --- a/indra/newview/llviewertextureanim.cpp +++ b/indra/newview/llviewertextureanim.cpp @@ -49,7 +49,8 @@ LLViewerTextureAnim::LLViewerTextureAnim(LLVOVolume* vobj) : LLTextureAnim() LLViewerTextureAnim::~LLViewerTextureAnim() { - std::vector::iterator iter = vector_replace_with_last(sInstanceList, sInstanceList.begin() + mInstanceIndex); + std::vector::iterator it(sInstanceList.begin() + mInstanceIndex); + std::vector::iterator iter = vector_replace_with_last(sInstanceList, it); if(iter != sInstanceList.end()) (*iter)->mInstanceIndex = mInstanceIndex; } From f82d12d38188530267919516d7b17b57a594557f Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Tue, 22 Jul 2014 04:24:26 -0400 Subject: [PATCH 02/18] Fix linker errors on linux after merging Shyotl --- indra/newview/pipeline.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 28950e8f3..7af2dc21e 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -249,12 +249,12 @@ void drawBoxOutline(const LLVector3& pos, const LLVector3& size); U32 nhpo2(U32 v); LLVertexBuffer* ll_create_cube_vb(U32 type_mask, U32 usage); -inline const LLMatrix4a& glh_get_current_modelview() +const LLMatrix4a& glh_get_current_modelview() { return gGLModelView; } -inline const LLMatrix4a& glh_get_current_projection() +const LLMatrix4a& glh_get_current_projection() { return gGLProjection; } @@ -269,12 +269,12 @@ inline const LLMatrix4a& glh_get_last_projection() return gGLLastProjection; } -inline void glh_set_current_modelview(const LLMatrix4a& mat) +void glh_set_current_modelview(const LLMatrix4a& mat) { gGLModelView = mat; } -inline void glh_set_current_projection(const LLMatrix4a& mat) +void glh_set_current_projection(const LLMatrix4a& mat) { gGLProjection = mat; } From 398d8c52a2dc2066f2f73d62513a9cd9f8837881 Mon Sep 17 00:00:00 2001 From: Shyotl Date: Thu, 7 Aug 2014 01:57:11 -0500 Subject: [PATCH 03/18] Minor cleanup. --- indra/llcommon/llstl.h | 2 +- indra/newview/lldrawpool.cpp | 3 +-- indra/newview/llflexibleobject.cpp | 3 +-- indra/newview/llviewerobjectlist.cpp | 3 +-- indra/newview/llviewerpartsim.cpp | 12 ++++-------- indra/newview/llviewertextureanim.cpp | 3 +-- 6 files changed, 9 insertions(+), 17 deletions(-) diff --git a/indra/llcommon/llstl.h b/indra/llcommon/llstl.h index 2e3d52733..5afd5dc61 100644 --- a/indra/llcommon/llstl.h +++ b/indra/llcommon/llstl.h @@ -239,7 +239,7 @@ inline typename T::mapped_type get_ptr_in_map(const T& inmap, typename T::key_ty // //Singu note: This has been generalized to support a broader range of sequence containers template -inline typename T::iterator vector_replace_with_last(T& invec, typename T::iterator& iter) +inline typename T::iterator vector_replace_with_last(T& invec, typename T::iterator iter) { typename T::iterator last = invec.end(); if (iter == invec.end()) diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp index 3a936eaf8..7a6ca0e24 100644 --- a/indra/newview/lldrawpool.cpp +++ b/indra/newview/lldrawpool.cpp @@ -301,8 +301,7 @@ void LLFacePool::removeFaceReference(LLFace *facep) if (idx != -1) { facep->setReferenceIndex(-1); - std::vector::iterator face_it(mReferences.begin() + idx); - std::vector::iterator iter = vector_replace_with_last(mReferences, face_it); + std::vector::iterator iter = vector_replace_with_last(mReferences, mReferences.begin() + idx); if(iter != mReferences.end()) (*iter)->setReferenceIndex(idx); } diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp index cf97d4e82..6d985d386 100644 --- a/indra/newview/llflexibleobject.cpp +++ b/indra/newview/llflexibleobject.cpp @@ -80,8 +80,7 @@ LLVolumeImplFlexible::LLVolumeImplFlexible(LLViewerObject* vo, LLFlexibleObjectD LLVolumeImplFlexible::~LLVolumeImplFlexible() { - std::vector::iterator flex_it(sInstanceList.begin() + mInstanceIndex); - std::vector::iterator iter = vector_replace_with_last(sInstanceList, flex_it); + std::vector::iterator iter = vector_replace_with_last(sInstanceList, sInstanceList.begin() + mInstanceIndex); if(iter != sInstanceList.end()) (*iter)->mInstanceIndex = mInstanceIndex; std::vector::iterator update_it(sUpdateDelay.begin() + mInstanceIndex); diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index a97bc60aa..8cbd3c955 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -1459,8 +1459,7 @@ void LLViewerObjectList::removeFromActiveList(LLViewerObject* objectp) objectp->setListIndex(-1); - std::vector >::iterator it(mActiveObjects.begin() + idx); - std::vector >::iterator iter = vector_replace_with_last(mActiveObjects, it); + std::vector >::iterator iter = vector_replace_with_last(mActiveObjects, mActiveObjects.begin() + idx); if(iter != mActiveObjects.end()) (*iter)->setListIndex(idx); diff --git a/indra/newview/llviewerpartsim.cpp b/indra/newview/llviewerpartsim.cpp index c3f49f69f..3c0c37b3e 100644 --- a/indra/newview/llviewerpartsim.cpp +++ b/indra/newview/llviewerpartsim.cpp @@ -406,8 +406,7 @@ void LLViewerPartGroup::updateParticles(const F32 lastdt) // Kill dead particles (either flagged dead, or too old) if ((part->mLastUpdateTime > part->mMaxAge) || (LLViewerPart::LL_PART_DEAD_MASK == part->mFlags)) { - part_list_t::iterator it(mParticles.begin() + i); - vector_replace_with_last(mParticles, it); + vector_replace_with_last(mParticles, mParticles.begin() + i); delete part ; } else @@ -417,8 +416,7 @@ void LLViewerPartGroup::updateParticles(const F32 lastdt) { // Transfer particles between groups LLViewerPartSim::getInstance()->put(part) ; - part_list_t::iterator it(mParticles.begin() + i); - vector_replace_with_last(mParticles, it); + vector_replace_with_last(mParticles, mParticles.begin() + i); } else { @@ -723,8 +721,7 @@ void LLViewerPartSim::updateSimulation() if (mViewerPartSources[i]->isDead()) { - source_list_t::iterator it(mViewerPartSources.begin() + i); - vector_replace_with_last(mViewerPartSources, it); + vector_replace_with_last(mViewerPartSources, mViewerPartSources.begin() + i); //mViewerPartSources.erase(it); count--; } @@ -761,8 +758,7 @@ void LLViewerPartSim::updateSimulation() if (!mViewerPartGroups[i]->getCount()) { delete mViewerPartGroups[i]; - group_list_t::iterator it(mViewerPartGroups.begin() + i); - vector_replace_with_last(mViewerPartGroups, it); + vector_replace_with_last(mViewerPartGroups, mViewerPartGroups.begin() + i); //mViewerPartGroups.erase(it); i--; count--; diff --git a/indra/newview/llviewertextureanim.cpp b/indra/newview/llviewertextureanim.cpp index 1e6b7a343..525de0ed2 100644 --- a/indra/newview/llviewertextureanim.cpp +++ b/indra/newview/llviewertextureanim.cpp @@ -49,8 +49,7 @@ LLViewerTextureAnim::LLViewerTextureAnim(LLVOVolume* vobj) : LLTextureAnim() LLViewerTextureAnim::~LLViewerTextureAnim() { - std::vector::iterator it(sInstanceList.begin() + mInstanceIndex); - std::vector::iterator iter = vector_replace_with_last(sInstanceList, it); + std::vector::iterator iter = vector_replace_with_last(sInstanceList, sInstanceList.begin() + mInstanceIndex); if(iter != sInstanceList.end()) (*iter)->mInstanceIndex = mInstanceIndex; } From 2deba06212864f1d75ee851f22192fc703ca1261 Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Mon, 11 Aug 2014 14:36:37 -0400 Subject: [PATCH 04/18] Missed a spot with the date column for group bans I'm thinking of putting a setting here instead of hardcoding the date format, actually, but for now this is good enough. --- indra/newview/llpanelgrouproles.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index e66bad4eb..d9afd5b04 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -3048,7 +3048,7 @@ void LLPanelGroupBanListSubTab::populateBanList() ban_entry.columns.add().column("name").font/*.name*/("SANSSERIF_SMALL").font_style("NORMAL"); // Singu Note: We have special date columns, so our code is unique here - ban_entry.columns.add().column("ban_date").value(bd.mBanDate).format("%Y/%m%d").font/*.name*/("SANSSERIF_SMALL").font_style("NORMAL"); + ban_entry.columns.add().column("ban_date").value(bd.mBanDate).type("date").format("%Y/%m%d").font/*.name*/("SANSSERIF_SMALL").font_style("NORMAL"); mBanList->addNameItemRow(ban_entry); } From 8e2da87b9775419d2074ef339fcef9f162f646ee Mon Sep 17 00:00:00 2001 From: Damian Zhaoying Date: Mon, 11 Aug 2014 18:22:34 -0300 Subject: [PATCH 05/18] Update spanish translations to reflect a lot of changes and adds in last Alphas builds. --- .../skins/default/xui/es/floater_about.xml | 2 +- .../default/xui/es/floater_autoreplace.xml | 2 +- .../skins/default/xui/es/floater_avatar.xml | 4 + .../default/xui/es/floater_buy_currency.xml | 4 +- .../default/xui/es/floater_destinations.xml | 4 + .../default/xui/es/floater_directory.xml | 7 +- .../xui/es/floater_instant_message_ad_hoc.xml | 2 + ..._instant_message_ad_hoc_concisebuttons.xml | 3 +- ...floater_instant_message_concisebuttons.xml | 1 + .../xui/es/floater_instant_message_group.xml | 3 +- ...r_instant_message_group_concisebuttons.xml | 1 + .../skins/default/xui/es/floater_joystick.xml | 6 + .../default/xui/es/floater_media_lists.xml | 41 +++++++ .../default/xui/es/floater_object_weights.xml | 2 +- .../default/xui/es/floater_perm_prefs.xml | 26 +++-- .../skins/default/xui/es/floater_radar.xml | 2 + .../skins/default/xui/es/floater_tools.xml | 14 ++- .../skins/default/xui/es/menu_avs_list.xml | 1 + .../skins/default/xui/es/menu_login.xml | 2 +- .../skins/default/xui/es/menu_pie_object.xml | 8 +- .../skins/default/xui/es/menu_radar.xml | 2 + .../skins/default/xui/es/menu_viewer.xml | 17 +-- .../skins/default/xui/es/notifications.xml | 103 +++++++++++++++++- .../default/xui/es/panel_group_bulk_ban.xml | 25 +++++ .../default/xui/es/panel_group_general.xml | 2 +- .../default/xui/es/panel_group_invite.xml | 14 +-- .../default/xui/es/panel_group_roles.xml | 55 +++++++++- .../skins/default/xui/es/panel_login.xml | 3 +- .../xui/es/panel_preferences_ascent_chat.xml | 1 + .../es/panel_preferences_ascent_system.xml | 43 ++++++-- .../es/panel_preferences_ascent_vanity.xml | 4 +- .../xui/es/panel_preferences_audio.xml | 7 +- .../xui/es/panel_preferences_general.xml | 3 + .../xui/es/panel_preferences_graphics1.xml | 89 ++++----------- .../default/xui/es/panel_preferences_im.xml | 5 +- .../xui/es/panel_preferences_input.xml | 5 +- .../default/xui/es/panel_region_general.xml | 1 + .../skins/default/xui/es/role_actions.xml | 1 + .../newview/skins/default/xui/es/strings.xml | 35 +++++- 39 files changed, 414 insertions(+), 136 deletions(-) create mode 100644 indra/newview/skins/default/xui/es/floater_avatar.xml create mode 100644 indra/newview/skins/default/xui/es/floater_destinations.xml create mode 100644 indra/newview/skins/default/xui/es/floater_media_lists.xml create mode 100644 indra/newview/skins/default/xui/es/panel_group_bulk_ban.xml diff --git a/indra/newview/skins/default/xui/es/floater_about.xml b/indra/newview/skins/default/xui/es/floater_about.xml index fd18946c2..b6349b59c 100644 --- a/indra/newview/skins/default/xui/es/floater_about.xml +++ b/indra/newview/skins/default/xui/es/floater_about.xml @@ -1,5 +1,5 @@ - +