From 351b7763a8aaa7d8dcd09d21b00fa9b290bd91cf Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> Date: Wed, 24 Sep 2025 21:02:57 +0300 Subject: #4515 Improve ordering of sub-meshes upon upload --- indra/newview/llmeshrepository.h | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) (limited to 'indra/newview/llmeshrepository.h') diff --git a/indra/newview/llmeshrepository.h b/indra/newview/llmeshrepository.h index ab17b921d6..450afd5d5a 100644 --- a/indra/newview/llmeshrepository.h +++ b/indra/newview/llmeshrepository.h @@ -668,11 +668,11 @@ public: LLPointer mFinalDecomp; volatile bool mPhysicsComplete; - typedef std::map, std::vector > hull_map; - hull_map mHullMap; + typedef std::map, std::vector > hull_map_t; + hull_map_t mHullMap; - typedef std::vector instance_list; - instance_list mInstanceList; + typedef std::vector instance_list_t; + instance_list_t mInstanceList; // Upload should happen in deterministic order, so sort instances by model name. struct LLUploadModelInstanceLess @@ -686,11 +686,11 @@ public: } // Note: probably can sort by mBaseModel->mSubmodelID here as well to avoid // running over the list twice in wholeModelToLLSD. - return a->mLabel < b->mLabel; + return a->mLabel > b->mLabel; } }; - typedef std::map, instance_list, LLUploadModelInstanceLess> instance_map; - instance_map mInstance; + typedef std::map, instance_list_t, LLUploadModelInstanceLess> instance_map_t; + instance_map_t mInstance; typedef std::map lod_sources_map_t; lod_sources_map_t mLodSources; @@ -709,7 +709,7 @@ public: std::string mWholeModelUploadURL; LLUUID mDestinationFolderId; - LLMeshUploadThread(instance_list& data, const lod_sources_map_t& sources_list, + LLMeshUploadThread(instance_list_t& data, const lod_sources_map_t& sources_list, LLVector3& scale, bool upload_textures, bool upload_skin, bool upload_joints, bool lock_scale_if_joint_position, const std::string & upload_url, @@ -745,6 +745,22 @@ public: static LLViewerFetchedTexture* FindViewerTexture(const LLImportMaterial& material); +protected: + void packModelIntance( + LLModel* model, + LLMeshUploadThread::instance_list_t& instance_list, + std::string& model_name, + LLSD& res, + S32& mesh_num, + S32& texture_num, + S32& instance_num, + std::unordered_set &textures, + std::unordered_map texture_index, + std::unordered_map& mesh_index, + std::vector& texture_list_dest, + bool include_textures + ); + private: LLHandle mFeeObserverHandle; LLHandle mUploadObserverHandle; -- cgit v1.2.3 From 9a413357ad5bc5f5492ece90b2c9cc9dbe6087c8 Mon Sep 17 00:00:00 2001 From: Rye Date: Thu, 2 Oct 2025 06:18:22 -0400 Subject: Fix infinite growth of mLoadingPhysicsShapes in mesh repository --- indra/newview/llmeshrepository.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/newview/llmeshrepository.h') diff --git a/indra/newview/llmeshrepository.h b/indra/newview/llmeshrepository.h index ab17b921d6..cf05807164 100644 --- a/indra/newview/llmeshrepository.h +++ b/indra/newview/llmeshrepository.h @@ -521,6 +521,9 @@ public: // list of completed Decomposition info requests std::list mDecompositionQ; + // list of completed Physics Mesh info requests + std::list mPhysicsQ; + //queue of requested headers std::queue mHeaderReqQ; @@ -855,7 +858,7 @@ public: void notifyMeshUnavailable(const LLVolumeParams& mesh_params, S32 request_lod, S32 volume_lod); void notifySkinInfoReceived(LLMeshSkinInfo* info); void notifySkinInfoUnavailable(const LLUUID& info); - void notifyDecompositionReceived(LLModel::Decomposition* info); + void notifyDecompositionReceived(LLModel::Decomposition* info, bool physics_mesh); S32 getActualMeshLOD(const LLVolumeParams& mesh_params, S32 lod); static S32 getActualMeshLOD(LLMeshHeader& header, S32 lod); -- cgit v1.2.3