summaryrefslogtreecommitdiff
path: root/indra
AgeCommit message (Collapse)Author
2024-05-07Copy xml files to scripts/lua; make Lua debug floater resizableMnikolenko Productengine
2024-05-03Log a stack trace on LL_ERRS().Nat Goodspeed
2024-05-03Prevent LLLater from thrashing on LLCallbackList.Nat Goodspeed
If there is exactly one doPeriodically() entry on LLLater, the mQueue entry is deleted before Periodic::operator()() is called. If Periodic's callable returns false, it reinstates itself on mQueue for a future time. That's okay, because the test for mQueue.empty(), and the consequent disconnect from LLCallbackList, happens only after that Periodic call returns. But at the moment Periodic reinstates itself on mQueue, mQueue happens to be empty. That alerts doAtTime2() to register itself on LLCallbackList -- even though at that moment it's already registered. Semantically that's okay because assigning to the LLLater's LLCallbackList::temp_handle_t should implicitly disconnect the previous connection. But it's pointless to create a new connection and disconnect the old one every time we call that lone Periodic. Add a test for mLive.connected(); that way if we already have an LLCallbackList connection, we retain it instead of replacing it with a new one.
2024-05-03Not every LLAvatarListUpdater subclass overrides tick().Nat Goodspeed
LLAvatarListUpdater is an LLEventTimer subclass meant to be a base class of still other subclasses. One would presume that every one of them should override tick(), since LLAvatarListUpdater::tick() is a no-op that simply asks to be called again. But making it abstract (=0) produces errors since at least one subclass does not define its own tick() method. This seems less than useful, since the specific tick() method is the whole point of deriving from LLEventTimer, but oh well.
2024-05-03Make LLLater store target time in mHandles; ditch 2nd unordered_map.Nat Goodspeed
Instead of maintaining a whole separate unordered_map to look up target times, make room in the HandleMap entry for the target time. There's still circularity, but the split into doAtTime1() and doAtTime2() resolves it: since doAtTime2() accepts the mHandles iterator created by doAtTime1(), doAtTime2() can simply store the new mQueue handle_type into the appropriate slot. Also sprinkle in a few more override keywords for consistency.
2024-05-02Introduce LLLater::getRemaining(handle).Nat Goodspeed
Some timer use cases need to know not only whether the timer is active, but how much time remains before it (next) fires. Introduce LLLater::mDoneTimes to track, for each handle, the timestamp at which it's expected to fire. We can't just look up the target timestamp in mQueue's func_at entry because there's no documented way to navigate from a handle_type to a node iterator or pointer. Nor can we store it in mHandles because of order dependency: we need the mDoneTimes iterator so we can bind it into the Periodic functor for doPeriodically(), but we need the mQueue handle to store in mHandles. If we could find the mQueue node from the new handle, we could update the func_at entry after emplace() -- but if we could find the mQueue node from a handle, we wouldn't need to store the target timestamp separately anyway. Split LLLater::doAtTime() into internal doAtTime1() and doAtTime2(): the first creates an mDoneTimes entry and returns an iterator, the second finishes creating new mQueue and mHandles entries based on that mDoneTimes entry. This lets doPeriodically()'s Periodic bind the mDoneTimes iterator. Then instead of continually incrementing an internal data member, it increments the mDoneTimes entry to set the next upcoming timestamp. That lets getRemaining() report the next upcoming timestamp rather than only the original one. Add LLEventTimer::isRunning() and getRemaining(), forwarding to its LLLater handle. Fix various LLEventTimer subclass references to mEventTimer.stop(), etc. Fix non-inline LLEventTimer subclass tick() overrides for bool, not BOOL. Remove LLAppViewer::idle() call to LLEventTimer::updateClass(). Since LLApp::stepFrame() already calls LLCallbackList::callFunctions(), assume we've already handled that every tick.
2024-05-02WIP: In llcallbacklist.h, add singleton LLLater for time delays.Nat Goodspeed
The big idea is to reduce the number of per-tick callbacks asking, "Is it time yet? Is it time yet?" We do that for LLEventTimer and LLEventTimeout. LLLater presents doAtTime(LLDate), with doAfterInterval() and doPeriodically() methods implemented using doAtTime(). All return handles. The free functions doAfterInterval() and doPeriodically() now forward to the corresponding LLLater methods. LLLater also presents isRunning(handle) and cancel(handle). LLLater borrows the tactic of LLEventTimer: while there's at least one running timer, it registers an LLCallbackList tick() callback to service ready timers. But instead of looping over all of them asking, "Are you ready?" it keeps them in a priority queue ordered by desired timestamp, and only touches those whose timestamp has been reached. Also, it honors a maximum time slice: once the ready timers have run for longer than the limit, it defers processing other ready timers to the next tick() call. The intent is to consume fewer cycles per tick() call, both by the management machinery and the timers themselves. Revamp LLCallbackList to accept C++ callables in addition to (classic C function pointer, void*) pairs. Make addFunction() return a handle (different than LLLater handles) that can be passed to a new deleteFunction() overload, since std::function instances can't be compared for equality. In fact, implement LLCallbackList using boost::signals2::signal, which provides almost exactly what we want. LLCallbackList continues to accept (function pointer, void*) pairs, but now we store a lambda that calls the function pointer with that void*. It takes less horsing around to create a C++ callable from a (function pointer, void*) pair than the other way around. For containsFunction() and deleteFunction(), such pairs are the keys for a lookup table whose values are handles. Instead of having a static global LLCallbackList gIdleCallbacks, make LLCallbackList an LLSingleton to guarantee initialization. For backwards compatibility, gIdleCallbacks is now a macro for LLCallbackList::instance(). Move doOnIdleOneTime() and doOnIdleRepeating() functions to LLCallbackList methods, but for backwards compatibility continue providing free functions. Reimplement LLEventTimer using LLLater::doPeriodically(). One implication is that LLEventTimer need no longer be derived from LLInstanceTracker, which we used to iterate over all instances every tick. Give it start() and stop() methods, since some subclasses (e.g. LLFlashTimer) used to call its member LLTimer's start() and stop(). Remove updateClass(): LLCallbackList::callFunctions() now takes care of that. Remove LLToastLifeTimer::start() and stop(), since LLEventTimer now provides those. Remove getRemainingTimeF32(), since LLLater does not (yet) provide that feature. While at it, make LLEventTimer::tick() return bool instead of BOOL, and change existing overrides. Make LLApp::stepFrame() call LLCallbackList::callFunctions() instead of LLEventTimer::updateClass(). We could have refactored LLEventTimer to use the mechanism now built into LLLater, but frankly the LLEventTimer API is rather clumsy. You MUST derive a subclass and override tick(), and you must instantiate your subclass on the heap because, when your tick() override returns false, LLEventTimer deletes its subclass instance. The LLLater API is simpler to use, and LLEventTimer is much simplified by using it. Merge lleventfilter.h's LLEventTimeoutBase into LLEventTimeout, and likewise merge LLEventThrottleBase into LLEventThrottle. The separation was for testability, but now that they're no longer based on LLTimer, it becomes harder to use dummy time for testing. Temporarily skip tests based on LLEventTimeoutBase and LLEventThrottleBase. Instead of listening for LLEventPump("mainloop") ticks and using LLTimer, LLEventTimeout now uses LLLater::doAfterInterval(). Instead of LLTimer and LLEventTimeout, LLEventThrottle likewise now uses LLLater::doAfterInterval(). Recast a couple local LLEventTimeout pre-lambda callable classes with lambdas. Dignify F64 with a new typedef LLDate::timestamp. LLDate heavily depends on that as its base time representation, but there are those who question use of floating-point for time. This is a step towards insulating us from any future change.
2024-05-02Update LLGLTFMaterial tests for changes introduced in SL-20523Brad Linden
also correct member packing to match server side
2024-05-02Raise Lua error if LLViewerControlListener response contains oneMnikolenko Productengine
2024-05-01#1382 Fix for scrubbing occlusion channel of ORM map (#1383)RunitaiLinden
2024-05-01Use LLViewerControlListener to access debug settingsMnikolenko Productengine
2024-05-01Merge branch 'marchcat/w-whitespace' into marchcat/x-ws-mergeAndrey Lihatskiy
2024-04-30Fix for SL-20652 shadows on mac breaking alpha blended objects. (#1264)Brad Linden
* Fix for SL-20652 shadows on mac breaking alpha blended objects. fix secondlife/jira-archive-internal#71030 * clean up surrounding indentation * Skip unnecessary casting * Clean up LLGLSLShader::sIndexedTextureChannels usage and improve fix for SL-20652
2024-04-30Fix for black moon. (#1369)RunitaiLinden
2024-04-29Adapt llimageworker_test for updated virtual method API.Nat Goodspeed
This was a broken test that got all the way to viewer release and the main branch. (cherry picked from commit a33a9d29380e6c1a0a9cc539be309d47adef4acf)
2024-04-29#886 Fix for crash in LLBumpImageList when connecting to a simulator with ↵RunitaiLinden
different feature flags (#1345)
2024-04-29Allow getting the value of debug settings via Lua scriptMnikolenko Productengine
2024-04-29Allow changing debug settings via Lua scriptMnikolenko Productengine
2024-04-29#824 Process source files in bulk: replace tabs with spaces, convert CRLF to ↵Andrey Lihatskiy
LF, and trim trailing whitespaces as needed
2024-04-26#1325 Fix for GLTF overrides sometimes not showing up. (#1340)RunitaiLinden
2024-04-26Merge pull request #1337 from secondlife/v-1184cosmic-linden
Cached minimap textures still using extra memory/loading still not reliable
2024-04-26secondlife/viewer#1184: Remove logspamCosmic Linden
2024-04-26Remove unused newview/llcallbacklist.cpp: real one is in llcommon.Nat Goodspeed
newview/llcallbacklist.cpp has no corresponding .h file, it isn't referenced by newview/CMakeLists.txt, and its removal doesn't affect the build. See llcommon/llcallbacklist.{h,cpp} for the real functionality. (cherry picked from commit 8e53d6ff4c6594f014f456b0ba9ebf86ac91f6bc)
2024-04-25secondlife/viewer#1184: Fix mac buildCosmic Linden
2024-04-25secondlife/viewer#1184: Discourage use of forceToRefetchTextureCosmic Linden
2024-04-25secondlife/viewer#1184: Use more robust/memory-friendly setLoadedCallback ↵Cosmic Linden
for minimap gen. Fix some emissive maps.
2024-04-26viewer#1308 LLFloaterView::restoreAll CrashAndrey Kleshchev
2024-04-25Adapt llimageworker_test for updated virtual method API.Nat Goodspeed
This was a broken test that got all the way to viewer release and the main branch. (cherry picked from commit a33a9d29380e6c1a0a9cc539be309d47adef4acf)
2024-04-25Resolve WorkQueue::waitForResult() merge glitch.Nat Goodspeed
2024-04-25Add missing #include "stringize.h"Nat Goodspeed
Also change from boost::hof::is_invocable() to std::is_invocable().
2024-04-25Adapt llimageworker_test for updated virtual method API.Nat Goodspeed
This was a broken test that got all the way to viewer release and the main branch.
2024-04-25Merge Maint YZ branch 'main' into DRTVWR-588-cleanup-timersNat Goodspeed
2024-04-24Merge 'main' into release/luau-scripting on promotion of Maint YZNat Goodspeed
2024-04-24viewer#1309 Handle deprecated avatar properties messagesAndrey Kleshchev
since server still sends those in some cases
2024-04-24Merge remote-tracking branch 'origin/main' into release/materials_featuretteBrad Linden
2024-04-24Merge branch 'main' into marchcat/x-mergeAndrey Lihatskiy
2024-04-241285 GLTF Animation PrototypeRunitaiLinden
2024-04-24Increment viewer version to 7.1.7Nat Goodspeed
following promotion of secondlife/viewer #736
2024-04-22Add demo script with idle and notification interactionsMnikolenko Productengine
2024-04-21Fix sampling normals from gbuffer and cleanup redundant gbuffer samples (#1294)Rye Mutt
* Fix sampling normals from gbuffer and cleanup redundant gbuffer samples * Allow negative normals in gbuffer to fix broken material rendering
2024-04-20viewer#1290 Fix missing variable reinitializationsAndrey Kleshchev
2024-04-19viewer#1290 Fix snapToMessageHeight crashAndrey Kleshchev
2024-04-19Port from OpenEXR to TinyEXR for reduced installer and library size (#1287)Rye Mutt
2024-04-19Merge pull request #1288 from secondlife/1284-incorporate-mikktspace-changesRunitaiLinden
1284 incorporate mikktspace changes
2024-04-19Revert "SL-20140 Setting shape hand size to 36 won't save"Andrey Lihatskiy
This reverts commit 810a3d24c2e3671f926091c062b101bdec6a1517. (secondlife/jira-archive-internal#70482)
2024-04-19#1139 Fix for world going black/white in some scenes (NaNs) (#1273)RunitaiLinden
* #1139 Fix for world going black/white in some scenes (NaNs) NaNs were coming from normal encode/decode. Take advantage of available gbuffer space to send full normal instead of encoding. * #1139 Cleanup remove now unused encodeNormF.glsl * #1139 Remove final reference to encodeNormF * #1139 Fix for getNormalEnvIntensityFlags referencing wrong sampler for env intensity * Mac build fix
2024-04-19Update to use newer mikktspace generation lib changes from Blender for ↵Rye Mutt
bug/crash fixes
2024-04-19secondlife/viewer#1249 Erratic Emoji Picker BehaviorAlexander Gavriliuk
2024-04-19viewer#1081 removed a 'not finalized' part of 2K benefitsAndrey Kleshchev
This part isn't planned at the moment, at least not this way, remove to not cause issues once server side changes behavior
2024-04-19Revert "SL-20140 Setting shape hand size to 36 won't save"Andrey Lihatskiy
This reverts commit 810a3d24c2e3671f926091c062b101bdec6a1517. (secondlife/jira-archive-internal#70482)