summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-09-03result_view() now reuses same metatable instance for every table.Nat Goodspeed
2024-09-03Break out llinventorylistener.cpp's InvResultSet as LL::ResultSet.Nat Goodspeed
We may well want to leverage that API for additional queries that could potentially return large datasets.
2024-09-03Add test_result_view.lua; fix minor bugs in result_view.lua.Nat Goodspeed
2024-09-03In lua_what() and lua_stack(), try to report a function's name.Nat Goodspeed
2024-09-03viewer#2311 Message about oversized snapshots wasn't shown in some casesAndrey Kleshchev
2024-09-03viewer#2310 Fix snapshot's size string dropping color during uploadAndrey Kleshchev
2024-09-03#2403 Reset Skeleton issuesAlexander Gavriliuk
2024-09-03#2471 The Destinations ComboBox on Login Screen changes the selected item to ↵Alexander Gavriliuk
the similar one
2024-09-02Introduce result_view.lua, and use it in LLInventory.lua.Nat Goodspeed
result_view(key_length, fetch) returns a virtual view of a potentially-large C++ result set. Given the result-set key, its total length and a function fetch(key, start) => (slice, adjusted start), the read-only table returned by result_view() manages indexed access and table iteration over the entire result set, fetching a slice at a time as required. Change LLInventory to use result_view() instead of only ever fetching the first slice of a result set. TODO: This depends on the viewer's "LLInventory" listener returning the total result set length as well as the result set key. It does not yet return the length.
2024-09-02More styling fixes and other minor inconsistency fixes in ↵TJ
inventorymodelbackgroundfetch code. (#2476)
2024-09-02Make `pairs()`, `ipairs()` forward to original funcs if no metamethods.Nat Goodspeed
That is, our replacement `pairs()` forwards the call to built-in `pairs()` when the passed object has no `__iter()` metamethod. Similarly, our replacement `ipairs()` forwards to built-in `ipairs()` when the passed object has no `__index()` metamethod. This allows for the possibility that the built-in `pairs()` and `ipairs()` functions engage more efficient implementations than the obvious ones.
2024-09-01Restore old error handling early out logic in LLAppViewer::init() (#2475)Brad Linden
fixes secondlife/viewer#2474
2024-08-31Make global pairs(), ipairs() honor metamethods.Nat Goodspeed
Specifically, make pairs(obj) honor obj's __iter() metamethod if any. Make ipairs(obj) honor obj's __index() metamethod, if any. Given the semantics of the __index() metamethod, though, this only works for a proxy table if the proxy has no array entries (int keys) of its own.
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 #2470 from secondlife/lua-play-animMaxim Nikolenko
Add Lua api to start/stop playing animation
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-30update OpenJPEG 2.5.2 (#2452)AiraYumi
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