Fix bandwidth estimation for texture fetch

This commit is contained in:
Siana Gearz
2012-10-10 15:37:43 +02:00
parent b7f5d7e415
commit 5445b4f97a
2 changed files with 3 additions and 3 deletions

View File

@@ -669,14 +669,15 @@ void update_statistics(U32 frame_count)
gObjectBits = 0;
// gDecodedBits = 0;
// Only update texture stats ones per second so that they are less noisy
//Update bandwidth stats often because texture fetch relies on them.
{
static const F32 texture_stats_freq = 10.f;
static const F32 texture_stats_freq = 0.1f;
static LLFrameTimer texture_stats_timer;
if (texture_stats_timer.getElapsedTimeF32() >= texture_stats_freq)
{
LLViewerStats::getInstance()->mTextureKBitStat.addValue(LLViewerTextureList::sTextureBits/1024.f);
LLViewerStats::getInstance()->mTexturePacketsStat.addValue(LLViewerTextureList::sTexturePackets);
LLAppViewer::getTextureFetch()->setTextureBandwidth(LLViewerTextureList::sTextureBits/1024.f/texture_stats_timer.getElapsedTimeF32());
gTotalTextureBytes += LLViewerTextureList::sTextureBits / 8;
LLViewerTextureList::sTextureBits = 0;
LLViewerTextureList::sTexturePackets = 0;

View File

@@ -628,7 +628,6 @@ void LLViewerTextureList::updateImages(F32 max_time)
clearFetchingRequests();
return;
}
LLAppViewer::getTextureFetch()->setTextureBandwidth(LLViewerStats::getInstance()->mTextureKBitStat.getMeanPerSec());
S32 global_raw_memory;
{