diff options
author | Dave Parks <davep@lindenlab.com> | 2011-06-27 10:40:02 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2011-06-27 10:40:02 -0500 |
commit | 1c4df782ecb097c2274b43c201e392ca59fb2b8b (patch) | |
tree | b101c295bc750f15d31fc196d92d068478757578 /indra/newview/llmeshrepository.cpp | |
parent | d46d74dbea0cbf4a680cd4611ff99c356fcbc030 (diff) | |
parent | d5c784be4ed949b49aeea427c01ba5867f235ae4 (diff) |
merge
Diffstat (limited to 'indra/newview/llmeshrepository.cpp')
-rwxr-xr-x | indra/newview/llmeshrepository.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 97c64f7761..00eba285ec 100755 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -3169,10 +3169,13 @@ F32 LLMeshRepository::getStreamingCost(LLSD& header, F32 radius, S32* bytes, S32 F32 dlow = llmin(radius/0.06f, 256.f); F32 dmid = llmin(radius/0.24f, 256.f); - F32 bytes_lowest = header["lowest_lod"]["size"].asReal()/1024.f; - F32 bytes_low = header["low_lod"]["size"].asReal()/1024.f; - F32 bytes_mid = header["medium_lod"]["size"].asReal()/1024.f; - F32 bytes_high = header["high_lod"]["size"].asReal()/1024.f; + F32 METADATA_DISCOUNT = 128.f; //discount 128 bytes to cover the cost of LLSD tags and compression domain overhead + F32 MINIMUM_SIZE = 32.f; //make sure nothing is "free" + + F32 bytes_lowest = llmax((F32) header["lowest_lod"]["size"].asReal()-METADATA_DISCOUNT, MINIMUM_SIZE)/1024.f; + F32 bytes_low = llmax((F32) header["low_lod"]["size"].asReal()/-METADATA_DISCOUNT, MINIMUM_SIZE)/1024.f; + F32 bytes_mid = llmax((F32) header["medium_lod"]["size"].asReal()-METADATA_DISCOUNT, MINIMUM_SIZE)/1024.f; + F32 bytes_high = llmax((F32) header["high_lod"]["size"].asReal()-METADATA_DISCOUNT, MINIMUM_SIZE)/1024.f; if (bytes) { |