diff options
author | Jonathan "Geenz" Goodman <geenz@lindenlab.com> | 2025-08-08 18:32:24 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-08-08 18:32:24 -0400 |
commit | 28678996ceaea019aafaa26911a440769320c498 (patch) | |
tree | 1c5461d5b432b2b6114faee0ebfb1bb2d2f5095a /indra/newview/llmeshrepository.h | |
parent | a6feb3dc7f3b1985bcc6a16330b368917cff25f8 (diff) | |
parent | f338b91f7c9dbfe999b5ea9a1facb9eaeafb3407 (diff) |
Merge pull request #4382 from secondlife/release/2025.05
Release/2025.05
Diffstat (limited to 'indra/newview/llmeshrepository.h')
-rw-r--r-- | indra/newview/llmeshrepository.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/indra/newview/llmeshrepository.h b/indra/newview/llmeshrepository.h index 0847c29d0d..4c3901408f 100644 --- a/indra/newview/llmeshrepository.h +++ b/indra/newview/llmeshrepository.h @@ -674,7 +674,22 @@ public: typedef std::vector<LLModelInstance> instance_list; instance_list mInstanceList; - typedef std::map<LLPointer<LLModel>, instance_list> instance_map; + // Upload should happen in deterministic order, so sort instances by model name. + struct LLUploadModelInstanceLess + { + inline bool operator()(const LLPointer<LLModel>& a, const LLPointer<LLModel>& b) const + { + if (a.isNull() || b.isNull()) + { + llassert(false); // We are uploading these models, they shouldn't be null. + return true; + } + // Note: probably can sort by mBaseModel->mSubmodelID here as well to avoid + // running over the list twice in wholeModelToLLSD. + return a->mLabel < b->mLabel; + } + }; + typedef std::map<LLPointer<LLModel>, instance_list, LLUploadModelInstanceLess> instance_map; instance_map mInstance; LLMutex* mMutex; |