diff options
| author | andreykproductengine <akleshchev@productengine.com> | 2016-08-01 18:00:54 +0300 |
|---|---|---|
| committer | andreykproductengine <akleshchev@productengine.com> | 2016-08-01 18:00:54 +0300 |
| commit | 9b07078b470d40c4b6454d21da2909c35517b248 (patch) | |
| tree | 0736cb49eb8f7ed20febbf3a1098ef94b552b8c6 /indra/newview/llmeshrepository.cpp | |
| parent | 13f19b1634a4d20c6daed965d52ea412ca4b0455 (diff) | |
MAINT-6460 Crash calculating mesh complexity
Diffstat (limited to 'indra/newview/llmeshrepository.cpp')
| -rw-r--r-- | indra/newview/llmeshrepository.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index d7665716b7..8bc75c8433 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -4031,6 +4031,20 @@ void LLMeshRepository::uploadError(LLSD& args) mUploadErrorQ.push(args); } +F32 LLMeshRepository::getStreamingCost(LLUUID mesh_id, F32 radius, S32* bytes, S32* bytes_visible, S32 lod, F32 *unscaled_value) +{ + if (mThread && mesh_id.notNull()) + { + LLMutexLock lock(mThread->mHeaderMutex); + LLMeshRepoThread::mesh_header_map::iterator iter = mThread->mMeshHeader.find(mesh_id); + if (iter != mThread->mMeshHeader.end() && mThread->mMeshHeaderSize[mesh_id] > 0) + { + return getStreamingCost(iter->second, radius, bytes, bytes_visible, lod, unscaled_value); + } + } + return 0.f; +} + //static F32 LLMeshRepository::getStreamingCost(LLSD& header, F32 radius, S32* bytes, S32* bytes_visible, S32 lod, F32 *unscaled_value) { |
