Skip to content

Commit

Permalink
#3364 Decrement bias only if there is 10prcnt free space
Browse files Browse the repository at this point in the history
Instead of when there is any space.
  • Loading branch information
akleshchev committed Jan 9, 2025
1 parent b321484 commit fd071ce
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions indra/newview/llviewertexture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -556,12 +556,13 @@ void LLViewerTexture::updateClass()
// don't execute above until the slam to 1.5 has a chance to take effect
sEvaluationTimer.reset();

// lower discard bias over time when free memory is available
if (sDesiredDiscardBias > 1.f && over_pct < 0.f)
// lower discard bias over time when at least 10% of budget is free
const F32 FREE_PERCENTAGE_TRESHOLD = -0.1f;
if (sDesiredDiscardBias > 1.f && over_pct < FREE_PERCENTAGE_TRESHOLD)
{
static LLCachedControl<F32> high_mem_discard_decrement(gSavedSettings, "RenderHighMemMinDiscardDecrement", .1f);

F32 decrement = high_mem_discard_decrement - llmin(over_pct, 0.f);
F32 decrement = high_mem_discard_decrement - llmin(over_pct - FREE_PERCENTAGE_TRESHOLD, 0.f);
sDesiredDiscardBias -= decrement * gFrameIntervalSeconds;
}
}
Expand Down

0 comments on commit fd071ce

Please sign in to comment.