p#604 Fix draw range fluctuations - #5923
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
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) inLLViewerTexture::updateClass()to smooth system-memory pressure over time. - Switch draw-distance limiting logic in VO cache debug tuning and
send_agent_update()fromisSystemMemoryCritical()togetSystemMemoryBudgetFactor() > 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.
akleshchev
force-pushed
the
andreyk/viewer_604
branch
from
June 11, 2026 21:18
db544f0 to
aaa3880
Compare
maxim-productengine
approved these changes
Jun 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Instead of using memory directly, use a 'factor' that has a 150MB wide 'rest' state to avoid draw range fluctuations from memory fluctuations.