summaryrefslogtreecommitdiff
path: root/indra/newview/llmeshrepository.h
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2025-07-18 13:59:39 +0800
committerErik Kundiman <erik@megapahit.org>2025-07-18 13:59:39 +0800
commit50755dcf5f6d4c70c6b6815b2467dda61dc4dc5a (patch)
tree4db99c2b48408390dfffe6b39261311002c5e3ec /indra/newview/llmeshrepository.h
parent6daacd94d1f53e53417ac24f05b983a2600a964f (diff)
parentf5d350fb7bd51735ab2624262e841d614c6eadd8 (diff)
Merge tag 'Second_Life_Release#f5d350fb-2025.05-gltf-mesh-import' into 2025.05
Diffstat (limited to 'indra/newview/llmeshrepository.h')
-rw-r--r--indra/newview/llmeshrepository.h17
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;