#5962 Optimize writeWearablesToAvatar#5965
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Optimizes how wearable visual parameters are applied to an avatar by iterating wearable-owned parameters (typically far fewer than avatar parameters) and adding a type-filtered setVisualParamWeight overload to avoid unnecessary checks across the full avatar param set. The PR also introduces Apple/platform-guard changes in LLVertexBuffer that affect VBO pooling and buffer region tracking behavior.
Changes:
- Add a new
setVisualParamWeight(index, type, weight)overload onLLCharacterandLLVOAvatarSelfto apply weights only when the visual param’s wearable type matches. - Update
LLWearable::writeToAvatarto iterate the wearable’s ownmVisualParamIndexMapinstead of scanning all avatar params. - Gate Apple-specific VBO pooling / region tracking paths in
LLVertexBufferbehind#if LL_DARWIN || LL_ARM64.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| indra/newview/llvoavatarself.h | Declares a new type-filtered setVisualParamWeight overload on LLVOAvatarSelf. |
| indra/newview/llvoavatarself.cpp | Implements the new overload used when wearables write params back to the avatar. |
| indra/llcharacter/llvisualparam.h | Adds getWearableType() to the LLVisualParam interface to support type-filtering. |
| indra/llcharacter/llcharacter.h | Declares the new LLCharacter::setVisualParamWeight(index, type, weight) overload. |
| indra/llcharacter/llcharacter.cpp | Implements the new type-filtered setter using mVisualParamIndexMap. |
| indra/llappearance/llwearable.cpp | Switches wearable-to-avatar param application to iterate wearable params and call the new overload. |
| indra/llrender/llvertexbuffer.cpp | Adds compile-time guards around Apple-specific VBO pooling and buffer update/region-tracking logic. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
79499e9 to
03b6cbe
Compare
03b6cbe to
01fd02e
Compare
marchcat
approved these changes
Jun 29, 2026
maxim-productengine
approved these changes
Jun 29, 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.
Avatar has hundreds of params, werables usually have significantly less and is a subset of an avatar, don't do pointless checks over every param when we are only interested in ones matching current wearable.
Testing shows ~90mks instead of ~160mks for an outfit with 6 wearables in a 3ms frame. Result can warry greatly but the more wearables the bigger the win in mks.