diff options
author | Erik Kundiman <erik@megapahit.org> | 2025-08-08 07:24:42 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2025-08-08 07:24:42 +0800 |
commit | 73fdef6693017f1160875d1f7a79875945df3929 (patch) | |
tree | 4d68801d232b579d03fef2306c53637f7498df45 /indra/newview/llmeshrepository.h | |
parent | 3b776461127f193298018cbe1bbeb92478cca485 (diff) | |
parent | bfefc01a7baefa6377216ff236be6113c46fa879 (diff) |
Merge branch '2025.05' into 2025.06
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 0c3a3559c2..2b772f7803 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; |