diff options
author | Erik Kundiman <erik@megapahit.org> | 2024-12-15 12:34:37 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2024-12-15 12:34:37 +0800 |
commit | 3316ffb3b571b8730d26d6e8b2ee00fc9cbdf7c0 (patch) | |
tree | 200cd8497a4fdd782ac4dbfd2ad5fb1632e03275 /indra/llmath/llvolume.cpp | |
parent | d4e433b37af94ee11880deeede74a87a728f4775 (diff) | |
parent | 5b77436cf0ad749d36e8f0c60077eeb24698d644 (diff) |
Merge remote-tracking branch 'secondlife/release/2024.09-ExtraFPS' into 2024.09-ExtraFPS
Diffstat (limited to 'indra/llmath/llvolume.cpp')
-rw-r--r-- | indra/llmath/llvolume.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index b2f14f71cc..6bf276a3cf 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -5163,7 +5163,10 @@ bool LLVolumeFace::VertexMapData::ComparePosition::operator()(const LLVector3& a void LLVolumeFace::remap() { // Generate a remap buffer - std::vector<unsigned int> remap(mNumVertices); + // Documentation for meshopt_generateVertexRemapMulti claims that remap should use vertice count + // but all examples use indice count. There are out of bounds crashes when using vertice count. + // To be on the safe side use bigger of the two. + std::vector<unsigned int> remap(llmax(mNumIndices, mNumVertices)); S32 remap_vertices_count = static_cast<S32>(LLMeshOptimizer::generateRemapMultiU16(&remap[0], mIndices, mNumIndices, |