diff options
author | Dave Parks <davep@lindenlab.com> | 2022-09-16 16:25:38 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2022-09-16 16:25:38 -0500 |
commit | 09f3d6eaeea79aa2e46644cfb4badd11d429525b (patch) | |
tree | 6f2d915bbf8bdb95466943e4d9ac377cee823440 /indra/llmath | |
parent | 8dc59e5ef37836b15d478fb0d04e3043a9f986de (diff) | |
parent | 1478cacfcda16162bd3d854a275afcc6a41852dd (diff) |
Merge branch 'DRTVWR-559' of ssh://bitbucket.org/lindenlab/viewer into DRTVWR-559
Diffstat (limited to 'indra/llmath')
-rw-r--r-- | indra/llmath/llvolume.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 559d790d77..454969b912 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -690,7 +690,7 @@ LLProfile::Face* LLProfile::addHole(const LLProfileParams& params, BOOL flat, F3 Face *face = addFace(mTotalOut, mTotal-mTotalOut,0,LL_FACE_INNER_SIDE, flat); - static LLAlignedArray<LLVector4a,64> pt; + static thread_local LLAlignedArray<LLVector4a,64> pt; pt.resize(mTotal) ; for (S32 i=mTotalOut;i<mTotal;i++) @@ -6703,13 +6703,19 @@ BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build) else { // Get s value for tex-coord. - if (!flat) + S32 index = mBeginS + s; + if (index >= profile.size()) + { + // edge? + ss = flat ? 1.f - begin_stex : 1.f; + } + else if (!flat) { - ss = profile[mBeginS + s][2]; + ss = profile[index][2]; } else { - ss = profile[mBeginS + s][2] - begin_stex; + ss = profile[index][2] - begin_stex; } } @@ -6895,7 +6901,7 @@ BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build) LLVector4a* norm = mNormals; - static LLAlignedArray<LLVector4a, 64> triangle_normals; + static thread_local LLAlignedArray<LLVector4a, 64> triangle_normals; try { triangle_normals.resize(count); |