summaryrefslogtreecommitdiff
path: root/indra
AgeCommit message (Collapse)Author
2024-08-31Give certain LLInventory queries an API based on result sets.Nat Goodspeed
Introduce abstract base class InvResultSet, derived from LLIntTracker so each instance has a unique int key. InvResultSet supports virtual getLength() and getSlice() operations. getSlice() returns an LLSD array limited to MAX_ITEM_LIMIT result set entries. It permits retrieving a "slice" of the contained result set starting at an arbitrary index. A sequence of getSlice() calls can eventually retrieve a whole result set. InvResultSet has subclasses CatResultSet containing cat_array_t, and ItemResultSet containing item_array_t. Each implements a virtual method that produces an LLSD map from a single array item. Make LLInventoryListener::getItemsInfo(), getDirectDescendants() and collectDescendantsIf() instantiate heap CatResultSet and ItemResultSet objects containing the resultant LLPointer arrays, and return their int keys for categories and items. Add LLInventoryListener::getSlice() and closeResult() methods that accept the int keys of result sets. getSlice() returns the requested LLSD array to its caller, while closeResult() is fire-and-forget. Because bulk data transfer is now performed by getSlice() rather than by collectDescendantsIf(), change the latter's "limit" default to unlimited. Allow the C++ code to collect an arbitrary number of LLPointer array entries, as long as getSlice() limits retrieval overhead. Spell "descendants" correctly, unlike the "descendents" spelling embedded in the rest of the viewer... sigh. Make the Lua module provide both spellings. Make MAX_ITEM_LIMIT a U32 instead of F32. In LLInventory.lua, store int result set keys from 'getItemsInfo', 'getDirectDescendants' and 'collectDescendantsIf' in a table with a close() function. The close() function invokes 'closeResult' with the bound int keys. Give that table an __index() metamethod that recognizes only 'categories' and 'items' keys: anything else returns nil. For either of the recognized keys, call 'getSlice' with the corresponding result set key to retrieve (the initial slice of) the actual result set. Cache that result. Lazy retrieval means that if the caller only cares about categories, or only about items, the other result set need never be retrieved at all. This is a first step: like the previous code, it still retrieves only up to the first 100 result set entries. But the C++ code now supports retrieval of additional slices, so extending result set retrieval is mostly Lua work. Finally, wrap the table-with-metamethod in an LL.setdtor() proxy whose destructor calls its close() method to tell LLInventoryListener to destroy the CatResultSet and ItemResultSet with the bound keys.
2024-08-30Add LLIntTracker<T>, an LLInstanceTracker<T, int> with generated keys.Nat Goodspeed
The point of LLIntTracker is to generate its keys implicitly, so that its int getKey() can be treated more or less like an instance pointer, with the added bonus that the key can be passed around via LLSD. LLIntTracker generates random int keys to try to make it a little harder for one script to mess with an LLIntTracker instance belonging to another.
2024-08-30Change LLInstanceTracker::destruct() to erase().Nat Goodspeed
One could argue that LLInstanceTracker is a container of sorts, and erase() is more conventional. This affects no other code, as destruct() is not currently referenced.
2024-08-30Introduce Khronos Neutral tonemapper as new default along with debug options ↵Rye Mutt
to control tonemap mix (#2464) (#2468)
2024-08-30Merge pull request #2472 from secondlife/v-2448cosmic-linden
secondlife/viewer#2448: Fix crash rendering rigged PBR prims
2024-08-30secondlife/viewer#2448: Fix crash rendering rigged PBR primsCosmic Linden
2024-08-30Fix background folder fetch pushing requests to wrong queue (#2436)Ansariel Hiller
2024-08-30#2454 Scrolling by the mouse wheel does not scroll up on the unopened ↵Alexander Gavriliuk
Destination field
2024-08-30Add throttle for playing an animation; add demo scriptMnikolenko Productengine
2024-08-30Add Lua api to start/stop playing animationMnikolenko Productengine
2024-08-29Support next(), pairs(), ipairs() for LL.setdtor() table proxies.Nat Goodspeed
Replace the global next(), pairs() and ipairs() functions with a C++ function that drills down through layers of setdtor() proxy objects and then forwards the updated arguments to the original global function. Add a Luau __iter() metamethod to setdtor() proxy objects that, like other proxy metamethods, drills down to the underlying _target object. __iter() recognizes the case of a _target table which itself has a __iter() metamethod. Also add __idiv() metamethod to support integer division. Add tests for proxy // division, next(proxy), next(proxy, key), pairs(proxy), ipairs(proxy) and 'for k, v in proxy'. Also test the case where the table wrapped in the proxy has an __iter() metamethod of its own.
2024-08-29Merge pull request #2466 from RyeMutt/smaaRye Mutt
Introduce SMAA and rework post process chain for better visual quality
2024-08-30#2360 Incorrect Day Cycle name in Edit Day Cycle floater (remove unused key ↵Alexander Gavriliuk
CANMOD)
2024-08-29Fix startup crash from removed settingRye Mutt
2024-08-29Integrate SMAA and rework post process chain for better visual qualityRye Mutt
Add SMAA buffer generation passes Add quality levels for both FXAA and SMAA Separate gamma correction and tonemapping for effects that require linear-but-tonemapped inputs Move application of noise to final render pass to screen to avoid damaging other post process effects
2024-08-29Merge remote-tracking branch 'origin/release/2024.08-DeltaFPS' into developBrad Linden
2024-08-29Remove dead texunit colorspace conversion codeRye Mutt
2024-08-29Fix SSR clamping hdr brightness rangesRye Mutt
2024-08-29#2428 Fix for crash when applying PBR material to a single face (take 2) (#2463)Dave Parks
Also fix for some objects randomly disappearing until they're selected again.
2024-08-29Add error handling for intel crashes from GLTF Scene shader (#2456)Brad Linden
fix secondlife/viewer#1856
2024-08-29Make LLPipeline::renderDebug() a bit cheaperAndrey Kleshchev
Each frame renderDebug() was pointlesly going over a large list of partitions and bridges.
2024-08-29Add simple metrics of Lua usageMaxim Nikolenko
2024-08-29Merge pull request #2449 from secondlife/v-2421cosmic-linden
secondlife/viewer#2421: Do not calculate and store silhouette edges for nearly every geometric prim with a corner
2024-08-29#2360 Incorrect Day Cycle name in Edit Day Cycle floater after clicking the ↵Alexander Gavriliuk
"Customize" button
2024-08-29Add Lua script name to log messages.Nat Goodspeed
2024-08-28Ditch trailing spaces.Nat Goodspeed
2024-08-28Add script control to "Inventory.DoCreate" registered menu action.Nat Goodspeed
2024-08-28Merge branch 'main' into release/luau-scripting.Nat Goodspeed
2024-08-28Prevent erroneous assignment to LL.setdtor() proxy._target field.Nat Goodspeed
Trim redundant output from test_setdtor.lua.
2024-08-28Attempt to get better file/line info for LL_ERRS crahses in bugsplat. (#2447)Brad Linden
secondlife/viewer#2445
2024-08-28secondlife/viewer#2421: Do not calculate and store silhouette edges for ↵Cosmic Linden
nearly every geometric prim with a corner
2024-08-29Merge pull request #2440 from secondlife/develop-clear-metricsMaxim Nikolenko
Clear unused metrics
2024-08-28Add `LL.setdtor()` function to add a "destructor" to any Lua object.Nat Goodspeed
`setdtor('description', object, function)` returns a proxy userdata object referencing object and function. When the proxy is garbage-collected, or at the end of the script, its destructor calls `function(object)`. The original object may be retrieved as `proxy._target`, e.g. to pass it to the `table` library. The proxy also has a metatable with metamethods supporting arithmetic operations, string concatenation, length and table indexing. For other operations, retrieve `proxy._target`. (But don't assign to `proxy._target`. It will appear to work, in that subsequent references to `proxy._target` will retrieve the replacement object -- however, the destructor will still call `function(original object)`.) Fix bugs in `lua_setfieldv()`, `lua_rawgetfield()` and `lua_rawsetfield()`. Add C++ functions `lua_destroyuserdata()` to explicitly destroy a `lua_emplace<T>()` userdata object, plus `lua_destroybounduserdata()`. The latter can bind such a userdata object as an upvalue to pass to `LL.atexit()`. Make `LL.help()` and `LL.leaphelp()` help text include the `LL.` prefix.
2024-08-28#2432 Restore default nametag behavior. (#2444)Dave Parks
After instrumenting nametags some more, really UI rendering performance improvements should just focus on LLFontGL::render
2024-08-28Remove obsolete, unreferenced DESTRINGIZE(), DEWSTRINGIZE() macros.Nat Goodspeed
2024-08-28#2438 Address frame stalls in updateImageDecodePriorityRunitaiLinden
2024-08-28Clear unused metricsMnikolenko Productengine
2024-08-28Merge pull request #2416 from secondlife/lua-lazymodnat-goodspeed
Allow UI to have lazily-loaded submodules.
2024-08-27#2432 Make nametags default to "show briefly"RunitaiLinden
2024-08-27#2431 Fix for redundant searching for pixeismall.j2c causing frame stallsRunitaiLinden
2024-08-27#2428 Fix for crash when applying PBR material (#2430)Dave Parks
Also attempt to fix some occasional bad texture memory tracking.
2024-08-27viewer#2413 Remove obsolete alert about expiring voice morphsAndrey Kleshchev
2024-08-27code clean upMnikolenko Productengine
2024-08-27Merge branch 'release/luau-scripting' into lua-inventoryMaxim Nikolenko
2024-08-26Merge remote-tracking branch 'origin/release/2024.08-DeltaFPS' into developBrad Linden
2024-08-26Improve safety of macOS available RAM calcuations at suggestion of Ansariel ↵Brad Linden
and Beq (#2423)
2024-08-26secondlife/viewer#2391: Remove avatar rigging "callstack" loggingCosmic Linden
2024-08-26Remove or suppress left over debug messages in hot paths (#2392)Rye Mutt
2024-08-26defensively capture coroutine args by valueBrad Linden
2024-08-26secondlife/viewer#2395 fix start location coordinates getting double escapedBrad Linden