summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerdisplay.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2026-07-25 13:15:43 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2026-07-25 13:15:43 +0300
commit398bf4f76a275ac08524f6218a707251b171271e (patch)
tree31ed47010ec5db0afac932b1c1d87b4a3fd75c75 /indra/newview/llviewerdisplay.cpp
parent34b74530d216a1edc5dfffe327baa615e3654460 (diff)
parent92154ed36ffddac349ac2336a3cc5a1eb6eebb72 (diff)
Merge branch 'release/26.3' into marchcat/slua-26.3
# Conflicts: # indra/llrender/llimagegl.cpp # indra/llrender/llimagegl.h # indra/newview/featuretable.txt # indra/newview/featuretable_linux.txt # indra/newview/featuretable_mac.txt
Diffstat (limited to 'indra/newview/llviewerdisplay.cpp')
-rw-r--r--indra/newview/llviewerdisplay.cpp31
1 files changed, 4 insertions, 27 deletions
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index d462ba8c5c..3f06fe3320 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -139,27 +139,6 @@ void render_disconnected_background();
void getProfileStatsContext(boost::json::object& stats);
std::string getProfileStatsFilename();
-// Adaptive texture-pipeline budget: spend the frame-time headroom between the
-// frame we're rendering and TextureLoadTargetFPS, clamped [2ms, max]. Headroom
-// is measured (smoothed frame interval minus the pipeline's own last spend),
-// so fast machines get big budgets and machines already at target hold the
-// floor. Only consumed while queues have work - drain loops exit when empty.
-static F32 sTexturePipelineSpent = 0.f;
-static F32 texture_pipeline_budget()
-{
- static LLCachedControl<F32> target_fps(gSavedSettings, "TextureLoadTargetFPS", 60.f);
- static LLCachedControl<F32> max_ms(gSavedSettings, "TextureLoadBudgetMaxMS", 10.f);
- static F32 smoothed_other = 0.008f;
- F32 other = llmax(gFrameIntervalSeconds.value() - sTexturePipelineSpent, 0.f);
- // A single multi-second hitch must not crater the budget for the following
- // frames, so cap the sample before it enters the EMA.
- other = llmin(other, 0.1f);
- smoothed_other = smoothed_other * 0.9f + other * 0.1f;
- F32 target_interval = 1.f / llclamp((F32)target_fps, 15.f, 240.f);
- F32 headroom = target_interval - smoothed_other;
- return llclamp(headroom, 0.002f, llclamp((F32)max_ms, 2.f, 50.f) * 0.001f);
-}
-
void display_startup()
{
if ( !gViewerWindow
@@ -520,10 +499,9 @@ void display(bool rebuild, F32 zoom_factor, int subfield, bool for_snapshot)
{
LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("List");
- F32 max_image_decode_time = texture_pipeline_budget();
- LLTimer tex_timer;
+ F32 max_image_decode_time = 0.050f * gFrameIntervalSeconds.value(); // 50 ms/second decode time
+ max_image_decode_time = llclamp(max_image_decode_time, 0.002f, 0.005f); // min 2ms/frame, max 5ms/frame)
gTextureList.updateImages(max_image_decode_time);
- sTexturePipelineSpent = tex_timer.getElapsedTimeF32();
}
{
@@ -883,10 +861,9 @@ void display(bool rebuild, F32 zoom_factor, int subfield, bool for_snapshot)
{
LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("List");
- F32 max_image_decode_time = texture_pipeline_budget();
- LLTimer tex_timer;
+ F32 max_image_decode_time = 0.050f*gFrameIntervalSeconds.value(); // 50 ms/second decode time
+ max_image_decode_time = llclamp(max_image_decode_time, 0.002f, 0.005f ); // min 2ms/frame, max 5ms/frame)
gTextureList.updateImages(max_image_decode_time);
- sTexturePipelineSpent = tex_timer.getElapsedTimeF32();
}
{