diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2022-09-15 20:43:02 +0300 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2022-09-15 20:43:02 +0300 |
commit | b5861e58cb802118796d6a6ba7f45c8e8f67690b (patch) | |
tree | e0ab150d6f60177b1b5ce971ed608d27e0af09c0 /indra/llmath | |
parent | eaf86980330251f1f5f8af5c4e9a7281d21a625c (diff) | |
parent | c2a27c474dc11dff4f93b0bd319cfec7de27bb22 (diff) |
Merge branch 'master' into DRTVWR-565-maint-P
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 bb193fc7a5..a9c475e5b7 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -684,7 +684,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++) @@ -6696,13 +6696,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; } } @@ -6888,7 +6894,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); |