diff options
| author | Dave Parks <davep@lindenlab.com> | 2011-06-27 10:39:41 -0500 | 
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2011-06-27 10:39:41 -0500 | 
| commit | d5c784be4ed949b49aeea427c01ba5867f235ae4 (patch) | |
| tree | ce918e1c0107b493c326968b8deb8e7a8c9891ec | |
| parent | e7c5913c0541c9c5ebcab93ec5fe4e8b1102eb23 (diff) | |
SH-680 Apply a 128-byte discount per LoD block to cover the cost of metadata.
| -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 2b340fc54d..04bda46edc 100755 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -3164,10 +3164,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)  	{ | 
