summaryrefslogtreecommitdiff
path: root/indra/llmath
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-09-16 20:44:37 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-09-16 21:07:39 +0300
commit76491145885eb672961b564fa782af3777e08f12 (patch)
tree0929e225b721b2d4966d5cd205380c3b53d94446 /indra/llmath
parent5a3631659fb4fe8c2b70c90c490a6c7e486289e9 (diff)
parentf83289d3a7e80bebe47f696f96aee1b7e64d1d69 (diff)
Merge branch master (DRTVWR-571) into DRTVWR-559
# Conflicts: # indra/newview/llpanelface.cpp # indra/newview/llpanelface.h
Diffstat (limited to 'indra/llmath')
-rw-r--r--indra/llmath/llvolume.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index ae753fc0f3..d4e4bb9407 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++)
@@ -6708,13 +6708,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;
}
}
@@ -6900,7 +6906,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);