Skip to content

p#604 Fix draw range fluctuations - #5923

Merged
akleshchev merged 1 commit into
release/26.3from
andreyk/viewer_604
Jun 12, 2026
Merged

p#604 Fix draw range fluctuations#5923
akleshchev merged 1 commit into
release/26.3from
andreyk/viewer_604

Conversation

@akleshchev

@akleshchev akleshchev commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Instead of using memory directly, use a 'factor' that has a 150MB wide 'rest' state to avoid draw range fluctuations from memory fluctuations.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reduces draw-distance “thrashing” caused by short-term system-memory fluctuations by introducing a smoothed/hysteresis-based system-memory “budget factor” and using that factor (instead of instantaneous critical-memory checks) when clamping draw distance in multiple subsystems.

Changes:

  • Add and maintain a persistent sSysMemoryFactor (clamped 1.0–2.0) in LLViewerTexture::updateClass() to smooth system-memory pressure over time.
  • Switch draw-distance limiting logic in VO cache debug tuning and send_agent_update() from isSystemMemoryCritical() to getSystemMemoryBudgetFactor() > 1.f.
  • Slightly widen the texture debug UI elements to accommodate updated display/layout needs.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
indra/newview/llvocache.cpp Uses the smoothed system-memory budget factor to clamp draw radius in VO cache debug settings.
indra/newview/llviewertexture.h Declares the system-memory budget factor API and new static state used to smooth memory pressure.
indra/newview/llviewertexture.cpp Implements the hysteresis/ramp logic that updates sSysMemoryFactor and returns it via getSystemMemoryBudgetFactor().
indra/newview/llviewermessage.cpp Uses the budget factor (instead of instantaneous “critical” memory) to limit requested draw distance in agent updates.
indra/newview/lltextureview.cpp Widens the texture progress bar in the debug texture view.
indra/newview/lldebugview.cpp Widens the texture debug view rect to match the updated texture view layout.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread indra/newview/llviewertexture.h Outdated
Comment thread indra/newview/llviewertexture.cpp Outdated
Comment thread indra/newview/llviewertexture.cpp Outdated
Comment thread indra/newview/llviewermessage.cpp Outdated
@akleshchev
akleshchev force-pushed the andreyk/viewer_604 branch from db544f0 to aaa3880 Compare June 11, 2026 21:18
@akleshchev
akleshchev merged commit 1d45676 into release/26.3 Jun 12, 2026
12 checks passed
@akleshchev
akleshchev deleted the andreyk/viewer_604 branch June 12, 2026 13:47
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants