From 366bcd0cbca43081fe58825fd463018e49b51740 Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Mon, 27 Oct 2014 17:10:08 +0200 Subject: MAINT-4435 FIXED fix in llvolume.cpp Perform full build if number of vertices less than allowed. Changes in all other files relate auxiliary methods for catching similar bugs in future. --- indra/llmath/llmath.h | 1 + indra/llmath/llvolume.cpp | 2 ++ 2 files changed, 3 insertions(+) (limited to 'indra/llmath') diff --git a/indra/llmath/llmath.h b/indra/llmath/llmath.h index b4ac1dec73..7f39e58f71 100755 --- a/indra/llmath/llmath.h +++ b/indra/llmath/llmath.h @@ -559,6 +559,7 @@ inline void ll_remove_outliers(std::vector& data, F32 k) inline void ll_nn2d_interpolation(const U8 *const src, U32 srcW, U32 srcH, U8 srcCh, U8 *const dst, U32 dstW, U32 dstH, U8 dstCh) { + llassert(NULL != src && NULL != dst); llassert(srcCh>=dstCh); S32 tmp_x = 0, tmp_y = 0, tmp_x1 = 0, tmp_x2 = 0; diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index d9a68cb577..98ff36c363 100755 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -6284,6 +6284,8 @@ BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build) num_vertices = mNumS*mNumT; num_indices = (mNumS-1)*(mNumT-1)*6; + partial_build = (num_vertices > mNumVertices || num_indices > mNumIndices) ? FALSE : partial_build; + if (!partial_build) { resizeVertices(num_vertices); -- cgit v1.2.3 From 799d13269a5cdf29a5d68c15ceac42f0407b5833 Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Mon, 3 Nov 2014 20:05:20 +0200 Subject: MAINT-3585 FIXED Viewer Crashes when attempting to upload image. The bug was fixed, the reasone of crash is following. The Core Flow view contain another GL context and will not care about restoring a previous. I restore context manually. This path also contain a minor changes in another files. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All changes described here. Сhange's for fix current bug. indra/llwindow/llwindow.h indra/llwindow/llwindowheadless.h indra/llwindow/llwindowmacosx.h indra/llwindow/llwindowsdl.h indra/llwindow/llwindowwin32.h indra/newview/lllocalbitmaps.cpp indra/newview/llviewerdisplay.cpp indra/newview/llviewerdisplay.h Twice mUsage initialization (replace to forward initialization). indra/llcharacter/lljointstate.h Looks like condition should be befor memcopy call, otherwise - possible CRASH. indra/llcommon/llmd5.cpp Unused condition and variables. indra/llmath/llsphere.cpp Looks like should be under if otherwise - possible CRASH indra\llprimitive\llmodel.cpp Useless assert's. indra/llrender/llrender.cpp indra/newview/lldaycyclemanager.cpp --- indra/llmath/llsphere.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/llmath') diff --git a/indra/llmath/llsphere.cpp b/indra/llmath/llsphere.cpp index 740047b93a..a8d6200488 100755 --- a/indra/llmath/llsphere.cpp +++ b/indra/llmath/llsphere.cpp @@ -248,8 +248,8 @@ LLSphere LLSphere::getBoundingSphere(const std::vector& sphere_list) // compute the starting step-size F32 minimum_radius = 0.5f * llmin(diagonal.mV[VX], llmin(diagonal.mV[VY], diagonal.mV[VZ])); F32 step_length = bounding_radius - minimum_radius; - S32 step_count = 0; - S32 max_step_count = 12; + //S32 step_count = 0; + //S32 max_step_count = 12; F32 half_milimeter = 0.0005f; // wander the center around in search of tighter solutions @@ -258,7 +258,7 @@ LLSphere LLSphere::getBoundingSphere(const std::vector& sphere_list) S32 last_dz = 2; while (step_length > half_milimeter - && step_count < max_step_count) + /*&& step_count < max_step_count*/) { // the algorithm for testing the maximum radius could be expensive enough // that it makes sense to NOT duplicate testing when possible, so we keep -- cgit v1.2.3 From 4364a8cccd1cbfdbea93b4332416fad1f6598436 Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Mon, 24 Nov 2014 18:41:51 +0200 Subject: MAINT-3529 FIXED Certain pathcuts made to a cube cause some faces to not react to sunlight or local lights --- indra/llmath/llvolume.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/llmath') diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 98ff36c363..ee2d57a562 100755 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -5970,7 +5970,10 @@ BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build) } else { //degenerate, make up a value - normal.set(0,0,1); + if(normal.getF32ptr()[2] >= 0) + normal.set(0.f,0.f,1.f); + else + normal.set(0.f,0.f,-1.f); } llassert(llfinite(normal.getF32ptr()[0])); -- cgit v1.2.3 From b3c8a559f6e6f340286204328e250312b2e467c5 Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Fri, 28 Nov 2014 18:17:54 +0200 Subject: MAINT-3494 FIXED Generate Normals checkbox does not control generation of normals. --- indra/llmath/llvolume.cpp | 11 +++++++++++ indra/llmath/llvolume.h | 3 +++ 2 files changed, 14 insertions(+) (limited to 'indra/llmath') diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index ee2d57a562..8d6b3b926c 100755 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -2685,6 +2685,17 @@ void LLVolume::setMeshAssetLoaded(BOOL loaded) mIsMeshAssetLoaded = loaded; } +void LLVolume::copyFacesTo(std::vector &faces) const +{ + faces = mVolumeFaces; +} + +void LLVolume::copyFacesFrom(const std::vector &faces) +{ + mVolumeFaces = std::move(faces); + mSculptLevel = 0; +} + void LLVolume::copyVolumeFaces(const LLVolume* volume) { mVolumeFaces = volume->mVolumeFaces; diff --git a/indra/llmath/llvolume.h b/indra/llmath/llvolume.h index 2f38ae7203..c8476f6897 100755 --- a/indra/llmath/llvolume.h +++ b/indra/llmath/llvolume.h @@ -993,6 +993,7 @@ public: void resizePath(S32 length); const LLAlignedArray& getMesh() const { return mMesh; } const LLVector4a& getMeshPt(const U32 i) const { return mMesh[i]; } + void setDirty() { mPathp->setDirty(); mProfilep->setDirty(); } @@ -1045,6 +1046,8 @@ public: void sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, const U8* sculpt_data, S32 sculpt_level); void copyVolumeFaces(const LLVolume* volume); + void copyFacesTo(std::vector &faces) const; + void copyFacesFrom(const std::vector &faces); void cacheOptimize(); private: -- cgit v1.2.3 From 1be14992c6d92f8e32068704190650229c2de88f Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Tue, 2 Dec 2014 12:09:50 +0200 Subject: MAINT-3494 FIXED Generate Normals checkbox does not control generation of normals. Patchset #2 --- indra/llmath/llvolume.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llmath') diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 8d6b3b926c..adf6e790d3 100755 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -2692,7 +2692,7 @@ void LLVolume::copyFacesTo(std::vector &faces) const void LLVolume::copyFacesFrom(const std::vector &faces) { - mVolumeFaces = std::move(faces); + mVolumeFaces = faces; mSculptLevel = 0; } -- cgit v1.2.3 From 10390bc470a32c91a8938d9dcb59a8ffa24786b1 Mon Sep 17 00:00:00 2001 From: simon Date: Fri, 20 Feb 2015 09:22:11 -0800 Subject: Fix merge error --- indra/llmath/llmath.h | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/llmath') diff --git a/indra/llmath/llmath.h b/indra/llmath/llmath.h index 5f696381fa..a8b27ad189 100755 --- a/indra/llmath/llmath.h +++ b/indra/llmath/llmath.h @@ -556,7 +556,6 @@ inline void ll_remove_outliers(std::vector& data, F32 k) } } - llassert(NULL != src && NULL != dst); // Include simd math header #include "llsimdmath.h" -- cgit v1.2.3