diff options
author | Dave Parks <davep@lindenlab.com> | 2013-08-30 15:55:59 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2013-08-30 15:55:59 -0500 |
commit | 4bd87bb45f1c6aa2251c01311befa0975d596c3f (patch) | |
tree | cb0569424285644ac2ce5d91a8e84c1b356655ff /indra | |
parent | ef7826a930071f1829fe81d12da75b048159acc7 (diff) | |
parent | cacefaf2fc1b95557aca62dc69dbe3744c6424b0 (diff) |
Automated merge with https://bitbucket.org/lindenlab/viewer-lion
Diffstat (limited to 'indra')
-rwxr-xr-x | indra/llmath/llvolume.cpp | 30 | ||||
-rwxr-xr-x | indra/newview/llviewermenu.cpp | 2 | ||||
-rwxr-xr-x | indra/newview/llviewerpartsim.cpp | 4 | ||||
-rwxr-xr-x | indra/newview/llviewerpartsim.h | 4 | ||||
-rwxr-xr-x | indra/newview/llvopartgroup.cpp | 21 |
5 files changed, 40 insertions, 21 deletions
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 773995cb86..0c329c69b2 100755 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -802,6 +802,7 @@ BOOL LLProfile::generate(const LLProfileParams& params, BOOL path_open,F32 detai { // Scale by 4 to generate proper tex coords. mProfile[i].mul(scale); + llassert(mProfile[i].isFinite3()); } if (hollow) @@ -839,6 +840,7 @@ BOOL LLProfile::generate(const LLProfileParams& params, BOOL path_open,F32 detai { // Scale by 3 to generate proper tex coords. mProfile[i].mul(scale); + llassert(mProfile[i].isFinite3()); } if (path_open) @@ -989,6 +991,7 @@ BOOL LLProfile::generate(const LLProfileParams& params, BOOL path_open,F32 detai { mOpen = FALSE; mProfile.push_back(mProfile[0]); + llassert(mProfile[0].isFinite3()); mTotal++; } } @@ -2127,7 +2130,7 @@ BOOL LLVolume::generate() { rot_mat.rotate(*profile++, tmp); dst->setAdd(tmp,offset); - llassert(less_than_max_mag(*dst)); + llassert(dst->isFinite3()); ++dst; } } @@ -2840,6 +2843,8 @@ void LLVolume::sculptGeneratePlaceholder() p[1] = (F32)(sin(F_PI * v) * sin(2.0 * F_PI * u) * RADIUS); p[2] = (F32)(cos(F_PI * v) * RADIUS); + llassert(pt.isFinite3()); + } line += sizeT; } @@ -2927,6 +2932,8 @@ void LLVolume::sculptGenerateMapVertices(U16 sculpt_width, U16 sculpt_height, S8 LLVector4a scale(-1.f,1,1,1); pt.mul(scale); } + + llassert(pt.isFinite3()); } line += sizeT; @@ -5552,12 +5559,14 @@ BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build) tc->mV[0] = (*p)[0]+0.5f; tc->mV[1] = (*p)[1]+0.5f; - llassert(less_than_max_mag(*src)); + llassert(src->isFinite3()); update_min_max(min,max,*src); update_min_max(min_uv, max_uv, *tc); *pos = *src; + llassert(pos->isFinite3()); + ++p; ++tc; ++src; @@ -5577,11 +5586,13 @@ BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build) tc->mV[0] = (*p)[0]+0.5f; tc->mV[1] = 0.5f - (*p)[1]; - llassert(less_than_max_mag(*src)); + llassert(src->isFinite3()); update_min_max(min,max,*src); update_min_max(min_uv, max_uv, *tc); *pos = *src; + + llassert(pos->isFinite3()); ++p; ++tc; @@ -6468,8 +6479,11 @@ BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build) // mQ = { 0, a[X]*b[Y] - a[Y]*b[X], a[Z]*b[X] - a[X]*b[Z], a[Y]*b[Z] - a[Z]*b[Y] } vector1 = _mm_sub_ps( vector2, _mm_mul_ps( amQ, bmQ )); + llassert(v1.isFinite3()); + v1.store4a((F32*) output); + output++; idx += 3; } @@ -6498,14 +6512,8 @@ BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build) n1.add(c); n2.add(c); - llassert(llfinite(c.getF32ptr()[0])); - llassert(llfinite(c.getF32ptr()[1])); - llassert(llfinite(c.getF32ptr()[2])); - - llassert(!llisnan(c.getF32ptr()[0])); - llassert(!llisnan(c.getF32ptr()[1])); - llassert(!llisnan(c.getF32ptr()[2])); - + llassert(c.isFinite3()); + //even out quad contributions switch (i%2+1) { diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 33d4b65d4a..c6c1090f45 100755 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -1073,8 +1073,6 @@ class LLAdvancedCheckInfoDisplay : public view_listener_t U32 info_display = info_display_from_string( userdata.asString() ); bool new_value = false; - LL_INFOS("ViewerMenu") << "check " << userdata.asString() << LL_ENDL; - if ( info_display != 0 ) { new_value = LLPipeline::toggleRenderDebugControl( (void*)info_display ); diff --git a/indra/newview/llviewerpartsim.cpp b/indra/newview/llviewerpartsim.cpp index 96cd43a8ab..163c90019f 100755 --- a/indra/newview/llviewerpartsim.cpp +++ b/indra/newview/llviewerpartsim.cpp @@ -160,7 +160,11 @@ LLViewerPartGroup::LLViewerPartGroup(const LLVector3 ¢er_agent, const F32 bo } mVOPartGroupp->setViewerPartGroup(this); mVOPartGroupp->setPositionAgent(getCenterAgent()); + + mBoxSide = box_side; + F32 scale = box_side * 0.5f; + mVOPartGroupp->setScale(LLVector3(scale,scale,scale)); //gPipeline.addObject(mVOPartGroupp); diff --git a/indra/newview/llviewerpartsim.h b/indra/newview/llviewerpartsim.h index 095de2060c..2daa07ed8c 100755 --- a/indra/newview/llviewerpartsim.h +++ b/indra/newview/llviewerpartsim.h @@ -105,6 +105,9 @@ public: void shift(const LLVector3 &offset); + F32 getBoxRadius() { return mBoxRadius; } + F32 getBoxSide() { return mBoxSide; } + typedef std::vector<LLViewerPart*> part_list_t; part_list_t mParticles; @@ -125,6 +128,7 @@ public: protected: LLVector3 mCenterAgent; F32 mBoxRadius; + F32 mBoxSide; LLVector3 mMinObjPos; LLVector3 mMaxObjPos; diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp index a65de0c047..1630b5d484 100755 --- a/indra/newview/llvopartgroup.cpp +++ b/indra/newview/llvopartgroup.cpp @@ -176,24 +176,28 @@ BOOL LLVOPartGroup::isActive() const F32 LLVOPartGroup::getBinRadius() { - return mScale.mV[0]*2.f; + return mViewerPartGroupp->getBoxSide(); } void LLVOPartGroup::updateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax) { const LLVector3& pos_agent = getPositionAgent(); - newMin.load3( (pos_agent - mScale).mV); - newMax.load3( (pos_agent + mScale).mV); + LLVector4a scale; + LLVector4a p; + + p.load3(pos_agent.mV); + + scale.splat(mScale.mV[0]+mViewerPartGroupp->getBoxSide()*0.5f); + + newMin.setSub(p, scale); + newMax.setAdd(p,scale); llassert(newMin.isFinite3()); llassert(newMax.isFinite3()); - LLVector4a pos; - pos.load3(pos_agent.mV); - - llassert(pos.isFinite3()); - mDrawable->setPositionGroup(pos); + llassert(p.isFinite3()); + mDrawable->setPositionGroup(p); } void LLVOPartGroup::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) @@ -459,6 +463,7 @@ BOOL LLVOPartGroup::updateGeometry(LLDrawable *drawable) } //record max scale (used to stretch bounding box for visibility culling) + mScale.set(max_scale, max_scale, max_scale); mDrawable->movePartition(); |