We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 16afa19 commit 5d64e64Copy full SHA for 5d64e64
indra/llmath/llvolume.cpp
@@ -5159,7 +5159,10 @@ bool LLVolumeFace::VertexMapData::ComparePosition::operator()(const LLVector3& a
5159
void LLVolumeFace::remap()
5160
{
5161
// Generate a remap buffer
5162
- std::vector<unsigned int> remap(mNumVertices);
+ // Documentation for meshopt_generateVertexRemapMulti claims that remap should use vertice count
5163
+ // but all examples use indice count. There are out of bounds crashes when using vertice count.
5164
+ // To be on the safe side use bigger of the two.
5165
+ std::vector<unsigned int> remap(llmax(mNumIndices, mNumVertices));
5166
S32 remap_vertices_count = static_cast<S32>(LLMeshOptimizer::generateRemapMultiU16(&remap[0],
5167
mIndices,
5168
mNumIndices,
0 commit comments