Skip to content

Fix LLViewerTexture::getSystemMemoryBudgetFactor result trunction when low on memory - #6138

Closed
Hecklezz wants to merge 1 commit into
secondlife:developfrom
Hecklezz:fix/getSystemMemoryBudgetFactor_truncation
Closed

Fix LLViewerTexture::getSystemMemoryBudgetFactor result trunction when low on memory#6138
Hecklezz wants to merge 1 commit into
secondlife:developfrom
Hecklezz:fix/getSystemMemoryBudgetFactor_truncation

Conversation

@Hecklezz

@Hecklezz Hecklezz commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Edit: Nevermind, I just noticed that the 26.3 branch has some additional changes not currently in develop that makes this issue not a problem anymore. Closing

Issue Fixed: #6137

Simply casts free_budget to a float so integer division trunction doesn't occur on the result, preventing returning 1.f when a value 1.f < x < 2.f should be returned, or a value of 2.f being returned when a value of 2.f < x < 3.f should be returned, etc.

Before this PR, if the system is low on memory, LLViewerTexture::getSystemMemoryBudgetFactor may have been returning 1.f as if the free_budget is >= 0 even when it isn't.

@Hecklezz
Hecklezz force-pushed the fix/getSystemMemoryBudgetFactor_truncation branch from 1803225 to cb45162 Compare August 14, 2026 14:04
@Hecklezz Hecklezz closed this Aug 14, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 14, 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.

Truncated result in LLViewerTexture::getSystemMemoryBudgetFactor when low on memory

1 participant