Commit Graph

84 Commits (e8554e70d3cd4a2e7db508aef86faea5ef815739)

Author SHA1 Message Date
Ansariel d6165b732b Merge branch 'DRTVWR-570-maint-Q' of https://github.com/secondlife/viewer 2022-12-02 15:41:59 +01:00
Andrey Kleshchev 87664fa35d SL-18219 Crash getting and sending render info on exit
There might be other causes for sendRenderInfoToRegion and getRenderInfoFromRegion, crashing, but in some cases viewer was shutting down
2022-11-22 23:08:47 +02:00
Ansariel 028941652b Merge branch 'DRTVWR-546' of https://bitbucket.org/lindenlab/viewer
# Conflicts:
#	indra/llrender/llvertexbuffer.cpp
#	indra/newview/app_settings/settings.xml
#	indra/newview/llappviewer.cpp
#	indra/newview/llappviewer.h
#	indra/newview/llfloaterpreference.cpp
#	indra/newview/llnetmap.cpp
#	indra/newview/llspatialpartition.cpp
#	indra/newview/llviewerdisplay.cpp
#	indra/newview/llviewershadermgr.cpp
#	indra/newview/pipeline.cpp
2021-12-01 22:29:25 +01:00
Dave Houlton 68e09edad0 SL-16386 remove references to (const true) LLGLSLShader::sNoFixedFunction 2021-11-30 17:04:35 -07:00
Ansariel 63cc972499 Merge branch 'DRTVWR-546' of https://bitbucket.org/lindenlab/viewer
# Conflicts:
#	indra/llappearance/lldriverparam.h
#	indra/llcommon/llmemory.h
#	indra/llcommon/llprofiler.h
#	indra/llrender/llvertexbuffer.cpp
#	indra/llwindow/llwindow.cpp
#	indra/llwindow/llwindowwin32.h
#	indra/newview/app_settings/settings.xml
#	indra/newview/lldrawable.cpp
#	indra/newview/lldrawable.h
#	indra/newview/lldrawpoolalpha.cpp
#	indra/newview/lldrawpoolavatar.cpp
#	indra/newview/lldrawpooltree.cpp
#	indra/newview/lldrawpoolwater.cpp
#	indra/newview/llface.cpp
#	indra/newview/llinventoryfilter.cpp
#	indra/newview/llselectmgr.h
#	indra/newview/llspatialpartition.cpp
#	indra/newview/llviewermenu.cpp
#	indra/newview/llviewerobject.cpp
#	indra/newview/llvieweroctree.cpp
#	indra/newview/llviewertexturelist.cpp
#	indra/newview/llvovolume.cpp
#	indra/newview/llvowlsky.cpp
#	indra/newview/pipeline.cpp
#	indra/newview/skins/default/xui/en/floater_stats.xml
2021-11-12 17:31:39 +01:00
Dave Parks 8d20480c5f SL-16148 SL-16244 SL-16270 SL-16253 Remove most BlockTimers, remove LLMemTracked, introduce alignas, hook most/all reamining allocs, disable synchronous occlusion, and convert frequently accessed LLSingletons to LLSimpleton 2021-10-28 18:06:21 +00:00
Ansariel 7ca874a6e3 Merge branch 'DRTVWR-515-maint' of https://bitbucket.org/lindenlab/viewer 2021-02-02 00:16:25 +01:00
Andrey Kleshchev 609a26b59a Merge branch 'master' of https://bitbucket.org/lindenlab/viewer/src/master into DRTVWR-515-maint
# Conflicts:
#	autobuild.xml (llca)
#	indra/llwindow/llwindow.h (SL-13507 vs SL-5894)
#	indra/newview/llscenemonitor.cpp (SL-14422)
#	indra/newview/llvovolume.cpp (SL-12069)
2021-02-01 22:28:15 +02:00
Mnikolenko Productengine 9fc3014435 SL-14422 Crash at LLSceneMonitor::dumpToFile 2021-01-27 18:32:41 +02:00
Ansariel 0ba281e843 Merge branch 'DRTVWR-513-maint' of https://bitbucket.org/lindenlab/viewer 2020-12-08 09:41:10 +01:00
Mnikolenko Productengine 6d84252619 SL-14422 Get rid of using namespace LLTrace 2020-12-02 16:28:45 +02:00
Nat Goodspeed 9d5b897600 DRTVWR-494: Defend LLInstanceTracker against multi-thread usage.
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.
2020-03-25 15:28:17 -04:00
Nicky Dasmijn a135b5b428 Merge remote-tracking branch 'origin/ll-vs2017' into fs-vs2017 2019-12-21 13:14:51 +01:00
Nat Goodspeed b2913b7cf1 DRTVWR-494: Defend LLInstanceTracker against multi-thread usage.
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-12-02 14:39:24 -05:00
Ansariel 615336a4d4 Merge viewer-neko 2017-09-07 21:49:12 +02:00
andreykproductengine f8254a9d78 MAINT-7758 Fixed freeze on loading lsl scripts from unicode named windows folder. 2017-08-30 19:57:02 +03:00
Ansariel a45d3d8421 Merge Viewer-Bear 2015-06-20 15:35:15 +02:00
Mnikolenko ProductEngine 593d6701d9 MAINT-4857 FIXED Reset scene monitor after completing teleport. 2015-02-05 11:07:44 +02:00
Ansariel 48fc17d6e1 Merge LL V3.7.16 2015-01-14 17:36:30 +01:00
andreykproductengine f69b11691d MAINT-4283 FIXED [BEAR] Viewer always crashes when opening "Scene Loading Monitor" if you closed it previously with the X 2014-07-23 18:29:18 +03:00
andreykproductengine 5ae64755f8 MAINT-4155 FIXED Scene Loading Monitor does not open from menu 2014-07-04 15:47:05 +03:00
Ansariel 3803f3e7cf FIRE-14144 / MAINT-4256 / BUG-6664: Crash when opening stats after closing via X 2014-07-17 20:27:32 +02:00
Xiaohong Bao dbfb429bd1 fix for SH-4628: Project Interesting Viewer reduces & fixes graphics to lowest settings on a MAC 2013-11-21 15:32:57 -07:00
Richard Linden 5be20dd024 moved SceneLoadingMonitor settings vars (and renamed SceneLoadingPixelDiffThreshold to SceneLoadingMonitorPixelDiffThreshold)
tweaked layout of floater_model_preview.xml
2013-11-13 16:18:59 -08:00
Richard Linden 6ddfc8031c BUILDFIX - miscellaneous stuff missed in the merge 2013-11-12 11:42:06 -08:00
Richard Linden 697d2e720b renamed TimeBlock to BlockTimerStatHandle 2013-10-15 20:24:42 -07:00
Richard Linden 80dfbbaacd merge from viewer-release 2013-10-08 11:59:24 -07:00
Richard Linden 17df8988fe renamed TraceType to StatType
added more MemTrackable types
optimized memory usage of LLTrace some more
2013-10-07 13:38:03 -07:00
Richard Linden 9bae912308 BUILDFIX: old style fast timer use, broken unit test 2013-10-01 17:18:35 -07:00
Richard Linden cbe397ad13 changed fast timer over to using macro
another attempt to move mem stat into base class
2013-09-05 14:04:13 -07:00
Richard Linden f0a642898d SH-4377 FIX: Interesting: Windows viewer crashes when SceneLoadingMonitorEnabled is enabled 2013-08-29 15:25:48 -07:00
Richard Linden bf99887cbb SH-4453 FIX: Interesting: SceneLoadingMonitorEnabled does not work until the camera turns
set enabled flag before calling freeze scene
2013-08-27 19:32:26 -07:00
Richard Linden 8535b87544 removed some unecessary template parameters from LLUnit member functions
forced unit conversion code to inline
unit conversion now no longer converts all the way to base and back, but tries
to find equivalent units as early as possible
fixed another llinfos instance
scene monitor now outputs n/a for invalid samples
2013-08-26 18:00:24 -07:00
Richard Linden 612892b45a SH-4433 WIP: Interesting: Statistics > Ping Sim is always 0 ms
continued conversion to units system
made units perform type promotion correctly and preserve type in arithmetic
e.g. can now do LLVector3 in units
added typedefs for remaining common unit types, including implicits
2013-08-18 22:30:27 -07:00
Richard Linden 9f7bfa1c37 moved unit types out of LLUnits namespace, since they are prefixed 2013-08-15 00:02:23 -07:00
Richard Linden 26581404e4 BUILDFIX: added header for numeric_limits support on gcc
added convenience types for units F32Seconds, etc.
2013-08-14 11:51:49 -07:00
Xiaohong Bao 3059b59b61 Automated merge with http://bitbucket.org/lindenlab/viewer-interesting 2013-07-31 21:43:42 -06:00
Xiaohong Bao d65243063c fix for SH-4290: Running viewer with SceneLoadingMonitorEnabled causes viewer to be unresponsive on login on low end machine 2013-07-31 21:21:58 -06:00
Richard Linden bd5808765f cleanup - renamed valueAs to valueInUnits and made it a symmetrical getter/setter 2013-07-31 19:32:50 -07:00
Richard Linden 4ff19b8f63 removed debug spam
fast timer data now resets on login
2013-07-20 09:41:55 -07:00
Richard Linden e40065f82c BUILDFIX: #include and dependency cleanup 2013-07-19 15:03:05 -07:00
Richard Linden 29930baf23 SH-4299 WIP: Interesting: High fps shown temporarily off scale in statistics console
made unit types work with ostreams
fixed timing of scene monitor recordings to better respect requested time diff
2013-07-17 10:56:47 -07:00
Richard Linden bd078122e3 SH-4299 FIX: Interesting: High fps shown temporarily off scale in statistics console
timing of scene load recording extension now guaranteed > requested time step
removed double add of recorded data
removed spam
2013-07-15 21:00:19 -07:00
Richard Linden 11e14cd3b0 SH-4299Interesting: High fps shown temporarily off scale in statistics console
various fixes to lltrace
start() on started recording no longer resets
fixed various instances of unit forgetfullness in lltrace
recording split now has gapless timing
scene monitor now guarantees min sample time
renamed a bunch of stats
added names to debug thread view on windows
2013-07-15 11:05:57 -07:00
Richard Linden ffa7123bb5 SH-4299 FIX Interesting: High fps shown temporarily off scale in statistics console
added ability to force uniqueness of LLCopyOnWritePointer
converted more variables to units
added convenience function for unit constants
2013-06-28 20:45:20 -07:00
Richard Linden 8bddaeec66 fixed scene load monitor resetting to eagerly due to spurious camer amotion
pulled swap() out of ui time block
cleaned up internal lltrace dependencies, factored out common accumulator definitions
2013-06-22 12:00:18 -07:00
Richard Linden 3fe19d883d SH-3931 WIP Interesting: Add graphs to visualize scene load metrics
scene monitor output is cleaned up, no duplicate first frame, less scientific notation
periodic recording extension now works more cleanly
2013-06-19 20:30:41 -07:00
Richard Linden 3f2de87340 SH-3931 WIP Interesting: Add graphs to visualize scene load metrics
added getAs and setAs to LLUnit to make it clearer how you specify units
removed accidental 0-based indexing of periodicRecording history...
should now be consistently 1-based, with 0 accessing current active recording
removed per frame timer updates of all historical timer bars in fast timer display
added missing assignment operator to recordings
2013-06-17 01:18:21 -07:00
Richard Linden 9fd3af3c38 SH-3931 WIP Interesting: Add graphs to visualize scene load metrics
changed Units macros and argument order to make it more clear
optimized units for integer types
fixed merging of periodicrecordings...should eliminate duplicate entries in sceneloadmonitor history
2013-06-13 15:29:15 -07:00
Richard Linden a74b5dfa92 SH-3931 WIP Interesting: Add graphs to visualize scene load metrics
fixed mem stat tracking...now properly tracks memory footprint with floating point
precision
cleaned up macros for unit declaration
renamed units to SI standard for 1024 multiples (kibibytes, etc)
fixed units output for scene monitor dump
2013-06-04 19:45:33 -07:00