Age | Commit message (Collapse) | Author | |
---|---|---|---|
2020-03-25 | DRTVWR-494: Defend LLInstanceTracker against multi-thread usage. | Nat Goodspeed | |
The previous implementation went to some effort to crash if anyone attempted to create or destroy an LLInstanceTracker subclass instance during traversal. That restriction is manageable within a single thread, but becomes unworkable if it's possible that a given subclass might be used on more than one thread. Remove LLInstanceTracker::instance_iter, beginInstances(), endInstances(), also key_iter, beginKeys() and endKeys(). Instead, introduce key_snapshot() and instance_snapshot(), the only means of iterating over LLInstanceTracker instances. (These are intended to resemble functions, but in fact the current implementation simply presents the classes.) Iterating over a captured snapshot defends against container modifications during traversal. The term 'snapshot' reminds the coder that a new instance created during traversal will not be considered. To defend against instance deletion during traversal, a snapshot stores std::weak_ptrs which it lazily dereferences, skipping on the fly any that have expired. Dereferencing instance_snapshot::iterator gets you a reference rather than a pointer. Because some use cases want to delete all existing instances, add an instance_snapshot::deleteAll() method that extracts the pointer. Those cases used to require explicitly copying instance pointers into a separate container; instance_snapshot() now takes care of that. It remains the caller's responsibility to ensure that all instances of that LLInstanceTracker subclass were allocated on the heap. Replace unkeyed static LLInstanceTracker::getInstance(T*) -- which returned nullptr if that instance had been destroyed -- with new getWeak() method returning std::weak_ptr<T>. Caller must detect expiration of that weak_ptr. Adjust tests accordingly. Use of std::weak_ptr to detect expired instances requires engaging std::shared_ptr in the constructor. We now store shared_ptrs in the static containers (std::map for keyed, std::set for unkeyed). Make LLInstanceTrackerBase a template parameterized on the type of the static data it manages. For that reason, hoist static data class declarations out of the class definitions to an LLInstanceTrackerStuff namespace. Remove the static atomic sIterationNestDepth and its methods incrementDepth(), decrementDepth() and getDepth(), since they were used only to forbid creation and destruction during traversal. Add a std::mutex to static data. Introduce an internal LockStatic class that locks the mutex while providing a pointer to static data, making that the only way to access the static data. The LLINSTANCETRACKER_DTOR_NOEXCEPT macro goes away because we no longer expect ~LLInstanceTracker() to throw an exception in test programs. That affects LLTrace::StatBase as well as LLInstanceTracker itself. Adapt consumers to the new LLInstanceTracker API. | |||
2019-01-14 | - add static const | ruslantproductengine | |
2018-07-04 | Fixed line endings in llgl.cpp | AndreyL ProductEngine | |
2018-07-02 | MAINT-7548 MAINT-7560 use NvidiaOptimusEnablement globally exported var to ↵ | Graham Linden | |
signal desire to use high-performance graphics processor | |||
2018-02-15 | Add debug setting and code to allow nVidia nSight graphics debugging to ↵ | Graham Linden graham@lindenlab.com | |
capture SL frames. These changes are only enabled if RenderNsightDebugSupport is true and eliminate use of some OpenGL legacy functionality which is incompatible with nSight capture (mostly glReadPixels and other fixed-function pipe rendering calls). | |||
2017-10-11 | Automated merge with ssh://bitbucket.org/lindenlab/viewer-release | Nat Goodspeed | |
2017-08-30 | MAINT-7758 Fixed freeze on loading lsl scripts from unicode named windows ↵ | andreykproductengine | |
folder. | |||
2016-11-11 | MAINT-6913 - (Via Sovereign Engineer and Shyotl Kuhr) Pack the skinned ↵ | Brad Payne (Vir Linden) | |
matrix and translation into a single mat3x4 for optimal data transfer to reduce uniform slot usage. | |||
2016-12-20 | move debugging globals to the "lowest" library they are referenced in | Oz Linden | |
2015-11-10 | remove execute permission from many files that should not have it | Oz Linden | |
2014-05-13 | sunshine-external merge WIP | Brad Payne (Vir Linden) | |
2013-10-16 | merge | Brad Payne (Vir Linden) | |
2013-10-08 | merge from viewer-release | Richard Linden | |
2013-10-01 | Automated merge with http://bitbucket.org/lindenlab/viewer-release | Richard Linden | |
2013-09-18 | The unbearable lightness of being norspec | Graham Linden | |
2013-08-22 | merge | Brad Payne (Vir Linden) | |
2013-08-19 | Merge | Xiaohong Bao | |
2013-08-19 | Merge in viewer-release | Graham Linden | |
2013-08-16 | merge with viewer-release | Nyx Linden | |
2013-08-09 | second phase summer cleaning | Richard Linden | |
replace llinfos, lldebugs, etc with new LL_INFOS(), LL_DEBUGS(), etc. | |||
2013-07-23 | NORSPEC-314 WIP make work-around easier to flip and add 9800M as an evil mac | Graham Linden | |
2013-06-21 | Automated merge with file:///F:%5Cviewer-bear | Dave Parks | |
2013-06-20 | Automated merge with http://bitbucket.org/lindenlab/viewer-release | Dave Parks | |
2013-05-21 | merge | Brad Payne (Vir Linden) | |
2013-05-09 | Merge downstream code and viewer-beta | simon | |
2013-05-09 | Merge viewer-beta | simon | |
2013-05-01 | NORSPEC-144 make code to nerf use of FBOs on old windows drivers not affect ↵ | Graham Madarasz (Graham) | |
Mac too | |||
2013-04-25 | Merge 3.5.1 into Materials | Graham Madarasz | |
2013-04-19 | merge changes for DRTVWR-294 | Oz Linden | |
2013-04-15 | NORSPEC-49 Add shader profiler, add support for ARB_depth_clamp where available | Dave Parks | |
2013-04-11 | Forgot to commit @#! merge | simon | |
2013-04-11 | Merge in downstream code (chui fixes, materials) | simon | |
2013-04-11 | Merge | simon | |
2013-04-09 | NORSPEC-59 work around nV driver crash when doing deferred rendering on NV ↵ | Graham Madarasz | |
9400M/9600M | |||
2013-04-01 | merge changes for 3.5.0-beta7 | Oz Linden | |
2013-03-29 | Update Mac and Windows breakpad builds to latest | Graham Madarasz | |
2013-03-28 | Merged lindenlab/viewer-development into default | graham linden | |
2013-03-25 | Pull in downstream CHUI code from viewer-development | simon | |
2013-03-22 | Pull and merge latest viewer-beta | simon | |
2013-03-21 | Folded in changes from sunshine-stable | prep | |
2013-03-20 | Merge with viewer-chui | prep@lindenlab.com | |
2013-03-16 | CHUI-863 : Clean up dead code that's creating failures on gcc-4.6 builds on ↵ | merov | |
Linux | |||
2013-03-13 | More fixes for gcc-4.6 breakage | Don Kjer | |
2013-03-13 | Merging LLCURL::Responder changes with CHUI changes. Fixed gcc 4.6 compile ↵ | Don Kjer | |
failures | |||
2013-03-04 | MAINT-2371 More optimizations. | Dave Parks | |
Reviewed by Graham | |||
2013-02-26 | MAINT-2371 First set of profile guided optimizations. | Dave Parks | |
Reviewed by Graham | |||
2013-02-12 | merge up to 3.4.5-release | Oz Linden | |
2013-02-07 | For MAINT-1291 Code Review: DaveP | Graham Madarasz | |
2013-01-24 | merging in viewer-beta. | Nyx Linden | |
Most of the merge was clean, a couple conflicts. Brought over a couple patches manually for llpolymesh. | |||
2012-12-18 | MAINT-2150 Fix for super-large ( > 4096 ) snapshots having black borders | Dave Parks | |