Commit Graph

217 Commits (1a437cbedf94de90d749f426dde09f2466693de2)

Author SHA1 Message Date
Andrey Lihatskiy 94dc8f12f8 Merge branch 'master' into DRTVWR-507-maint 2020-04-27 15:16:21 +03:00
Andrey Lihatskiy c757c29c95 Merge branch 'master' into DRTVWR-500
# Conflicts:
#	indra/newview/pipeline.cpp
2020-04-20 21:23:34 +03:00
Andrey Kleshchev 29fec00f3c SL-12775 Run at high performance AMD gpu 2020-04-03 19:40:55 +03: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
andreykproductengine 94d4364084 SL-12103 More reliable memory detection 2019-10-16 22:36:10 +03:00
Graham Linden 230c9b68d8 Remove binding and use of glIsShader for now (only useful for avoiding warnings about deleting shader objects re-used across programs). 2019-07-22 16:24:49 -07:00
Graham Linden b346624307 SL-10761
Make vograss objects set their face vert/index counts to 0 when setting
the number of blades to 0 to disable rendering so we don't allocate space
and then skip setting it up with actual index data in getGeometry.
2019-07-22 15:44:35 -07:00
Graham Linden ddf703611d SL-10761
Add code to force a usage hint when VBOs are disabled and make useBVOs reflect that as well.
2019-07-15 10:33:16 -07:00
Graham Linden accd83cc7e Fix missing EOL on last line. 2019-04-02 14:42:06 -07:00
Graham Linden d78ed764b5 Merge 6.1.2 LoveMeRender new hotness 2019-04-02 12:27:34 -07:00
Geenz a158c87957 Hide sRGB decode behind a flag, and make sure that sRGB decodes is strictly opt-in. 2019-03-30 17:22:54 -07:00
ruslantproductengine 4f458882f4 - add static const 2019-01-14 18:58:30 +02:00
Graham Linden 898c9f4421 Mods to make merge with viewer-release have less whitespace-only change and fix diffs between EEP and VR. 2019-03-13 13:21:48 -07:00
Graham Linden 788a108384 SL-10501
Fix broken matrix management code causing modelview mats to be used as tex anim mats
(do not depend on default matrix mode already being set).

Give the deferred terrain shader a name.

Make LLRender use the eMatrixMode enum instead of ints.
2019-02-21 16:03:46 -08:00
Graham Linden 65927e0a76 SL-10181, SL-10546
Fix distortion map rendering in deferred mode not including underwater fog effects.

Fix distortion map rendering not including post-deferred content at all.

Fix distortion map rendering not including anything but sky when camera is underwater.

Update sun_up_factor/sunmoon_glow_factor uniforms even when sun disc isn't in use.
2019-02-13 13:09:14 -08:00
Graham Linden 536799d07e SL-9977
SL-9973
2018-10-29 23:02:20 +01:00
AndreyL ProductEngine c877eac422 Fixed line endings in llgl.cpp 2018-07-04 11:56:01 +03:00
Graham Linden 5e12beba70 MAINT-7548 MAINT-7560 use NvidiaOptimusEnablement globally exported var to signal desire to use high-performance graphics processor 2018-07-02 19:30:31 +01:00
Graham Linden graham@lindenlab.com 99b82d9449 Atmospherics WIP
libatmosphere integrated in indra/llrender/llatmosphere.cpp

Still working on runtime shaders to use libatmosphere precomputed atmospherics textures
2018-02-18 15:52:23 +00:00
Graham Linden graham@lindenlab.com 06bce2ddd0 Add debug setting and code to allow nVidia nSight graphics debugging to 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).
2018-02-15 21:55:24 +00:00
Nat Goodspeed 0c7bc67814 Automated merge with ssh://bitbucket.org/lindenlab/viewer-release 2017-10-11 14:35:49 -04:00
andreykproductengine f8254a9d78 MAINT-7758 Fixed freeze on loading lsl scripts from unicode named windows folder. 2017-08-30 19:57:02 +03:00
Brad Payne (Vir Linden) 5fb30e5ad3 MAINT-6913 - (Via Sovereign Engineer and Shyotl Kuhr) Pack the skinned matrix and translation into a single mat3x4 for optimal data transfer to reduce uniform slot usage. 2016-11-11 09:37:45 -05:00
Oz Linden c20e57c48f move debugging globals to the "lowest" library they are referenced in 2016-12-20 14:41:46 -05:00
Oz Linden c8726aba30 remove execute permission from many files that should not have it 2015-11-10 09:48:56 -05:00
Brad Payne (Vir Linden) 7b9708a2e3 sunshine-external merge WIP 2014-05-13 10:02:26 -04:00
Brad Payne (Vir Linden) 1f8b37e9ad merge 2013-10-16 11:52:43 -04:00
Richard Linden 80dfbbaacd merge from viewer-release 2013-10-08 11:59:24 -07:00
Richard Linden 59628d6f85 Automated merge with http://bitbucket.org/lindenlab/viewer-release 2013-10-01 14:28:39 -07:00
Graham Linden 95e34d86b9 The unbearable lightness of being norspec 2013-09-18 18:24:16 -07:00
Brad Payne (Vir Linden) a3b1a60ed7 merge 2013-08-22 16:12:40 -04:00
Xiaohong Bao d8c02bf062 Merge 2013-08-19 16:09:28 -06:00
Graham Linden 3f186aab77 Merge in viewer-release 2013-08-19 12:10:40 -07:00
Nyx Linden 5ae117aff6 merge with viewer-release 2013-08-16 19:31:16 -04:00
Richard Linden e340009fc5 second phase summer cleaning
replace llinfos, lldebugs, etc with new LL_INFOS(), LL_DEBUGS(), etc.
2013-08-09 17:11:19 -07:00
Graham Linden fa74313e7d NORSPEC-314 WIP make work-around easier to flip and add 9800M as an evil mac 2013-07-23 04:52:59 -07:00
Dave Parks 79029149a4 Automated merge with file:///F:%5Cviewer-bear 2013-06-21 12:51:29 -05:00
Dave Parks 9ea2d90a0d Automated merge with http://bitbucket.org/lindenlab/viewer-release 2013-06-20 12:10:26 -05:00
Brad Payne (Vir Linden) a04a706c1b merge 2013-05-21 16:18:48 -04:00
simon ee2fce8790 Merge downstream code and viewer-beta 2013-05-09 14:10:45 -07:00
simon c7f7c4bc4d Merge viewer-beta 2013-05-09 13:14:49 -07:00
Graham Madarasz (Graham) d328bfd96e NORSPEC-144 make code to nerf use of FBOs on old windows drivers not affect Mac too 2013-05-01 11:56:15 -07:00
Graham Madarasz fd447189c5 Merge 3.5.1 into Materials 2013-04-25 21:00:16 -07:00
Oz Linden ddd5659f81 merge changes for DRTVWR-294 2013-04-19 10:11:29 -04:00
Dave Parks 8025b8b2bc NORSPEC-49 Add shader profiler, add support for ARB_depth_clamp where available 2013-04-15 13:16:14 -05:00
simon 066f2acadf Forgot to commit @#! merge 2013-04-11 16:23:36 -07:00
simon b42b789723 Merge in downstream code (chui fixes, materials) 2013-04-11 16:18:34 -07:00
simon c7bab8ab8b Merge 2013-04-11 16:04:21 -07:00
Graham Madarasz 893bcf34f7 NORSPEC-59 work around nV driver crash when doing deferred rendering on NV 9400M/9600M 2013-04-09 12:37:57 -07:00
Oz Linden 2fde4a9ae5 merge changes for 3.5.0-beta7 2013-04-01 14:24:01 -04:00
Graham Madarasz bf6182daa8 Update Mac and Windows breakpad builds to latest 2013-03-29 07:50:08 -07:00
graham linden 14ddfcdf52 Merged lindenlab/viewer-development into default 2013-03-28 19:16:48 -07:00
simon 98a82c50d5 Pull in downstream CHUI code from viewer-development 2013-03-25 11:12:52 -07:00
simon 1d8e3997c8 Pull and merge latest viewer-beta 2013-03-22 14:17:26 -07:00
prep f345746161 Folded in changes from sunshine-stable 2013-03-21 11:21:45 -04:00
prep@lindenlab.com f2948cb1eb Merge with viewer-chui 2013-03-20 17:53:51 -05:00
merov c294c7c474 CHUI-863 : Clean up dead code that's creating failures on gcc-4.6 builds on Linux 2013-03-16 16:09:50 -07:00
Don Kjer 9150757c81 More fixes for gcc-4.6 breakage 2013-03-13 21:01:50 +00:00
Don Kjer 662d67e3b5 Merging LLCURL::Responder changes with CHUI changes. Fixed gcc 4.6 compile failures 2013-03-13 08:46:59 +00:00
Dave Parks 609ed855e1 MAINT-2371 More optimizations.
Reviewed by Graham
2013-03-04 18:01:42 -06:00
Dave Parks f5e5396c3a MAINT-2371 First set of profile guided optimizations.
Reviewed by Graham
2013-02-26 15:15:08 -06:00
Oz Linden 8bb3d0891d merge up to 3.4.5-release 2013-02-12 13:27:03 -05:00
Graham Madarasz 019c7566fb For MAINT-1291 Code Review: DaveP 2013-02-07 09:18:09 -08:00
Nyx Linden 11fe124ae9 merging in viewer-beta.
Most of the merge was clean, a couple conflicts.
Brought over a couple patches manually for llpolymesh.
2013-01-24 16:22:49 -05:00
Dave Parks 615af0c556 MAINT-2150 Fix for super-large ( > 4096 ) snapshots having black borders 2012-12-18 16:39:48 -06:00
Geenz 9e2e150064 Check to see if GL_EXT_texture_sRGB and GL_ARB_framebuffer_sRGB are available. 2012-12-07 11:07:41 -05:00
Don Kjer c06c35609c Updating linux build to gcc4.6 2012-10-11 00:09:04 +00:00
Don Kjer 003020763b Turning on mHasShaderObjects for mesa headless 2012-10-04 20:11:33 +00:00
Don Kjer c9ab9590aa Removing server-related cmake cruft. Fixing libGLU warnings on linux. 2012-10-04 03:12:48 +00:00
Don Kjer 3d698286fb Wrapping failing llgl assert in gDebugGL 2012-09-25 23:27:15 +00:00
Don Kjer d3924200b6 Removing unused gHeadlessClient code from viewer 2012-09-23 03:06:11 +00:00
Don Kjer 2d36f9b98a Fix for missing symbols on windows builds 2012-09-22 03:39:32 +00:00
Nyx Linden 49caededb4 BUILDFIX: enabling the building of the viewer/appearance backend with headless mesa 2012-09-19 17:05:56 +00:00
Dave Parks 4a5ad35793 MAINT-570 Remove unused memory tracking system LLMemType 2012-07-20 11:42:15 -05:00
Dave Parks e3a5125b41 MAINT-616 Potential fix for corrupted mip maps. 2012-05-25 17:58:12 -05:00
Dave Parks b7cfd8c7f0 MAINT-616 Factor out calls to glGenFoo where possible, add setting to control synchronizing strategy WRT occlusion queries, add experimental transform feedback driven LoD update 2012-05-21 23:33:25 -05:00
Dave Parks c946408519 MAINT-586 Starting logging OpenGL version and shader level to simulator 2012-05-11 14:42:29 -05:00
Dave Parks 3efa013ee4 MAINT-939 Potential fix for crash when editing objects. 2012-04-13 11:55:44 -05:00
Dave Parks a244cff781 MAINT-778, MAINT-793 Fix for crash when enabling Debug GL on Mobile Intel 4 Express. Don't pop up driver update notification if GPU class is < 1 2012-03-30 12:17:34 -05:00
Dave Parks 76634dc7af MAINT-793 Pop up notification when drivers are likely out of date. Allow Lighting and Shadows on Intel when drivers are up to date. 2012-03-28 00:49:42 -05:00
Dave Parks ce0f455b7c MAINT-806 Fix for some shaders failing to link on ATI x800. 2012-03-26 13:09:09 -05:00
Dave Parks 0af7b7038f MAINT-804, MAINT-810 Disable framebuffer object usage on intel chips (implicitly disables lighting and shadows) 2012-03-21 16:05:57 -05:00
Dave Parks 83e69659e2 MAINT-708 Add checkbox to hardware settings for controlling texture compression. Default texture compression to on for cards with 512MB of VRAM or less, off otherwise. 2012-03-08 15:22:56 -06:00
Dave Parks cd468364a7 MAINT-708 Don't compress UI textures. Use GL_NICEST as compression hint to avoid artifacts. 2012-03-07 17:26:43 -06:00
Dave Parks f53fa08c70 MAINT-708 Use texture compression to minimize memory bloat (experimental) 2012-03-02 13:35:10 -06:00
Dave Parks 64c89ee2c5 SH-2908 Fix for mac build 2012-02-13 15:41:21 -06:00
Dave Parks 80505ddf68 SH-2908 Fix for linux build. 2012-02-13 15:02:07 -06:00
Dave Parks 3710c6110d SH-2908 Rework indexed texture rendering to use a uvec4 instead of a float for texture indices in the data stream. Also rework gl_FragColor overrides to not collide with some odd driver implementations. 2012-02-10 20:04:19 -06:00
Leslie Linden 6343c769ce SH-1865 FIX -- removed some old non-deferred rendering code that was preventing anti-aliasing from working when GL_ARB_texture_multisample is unsupported 2011-11-16 10:00:41 -08:00
Dave Parks da1898d1cb SH-2625 Fix for window size reverting to non-maximized whenever shaders are loaded. 2011-10-26 11:19:04 -05:00
Dave Parks 7dafa1be79 SH-2622 Put back "Basic Shaders" toggle ability. 2011-10-25 15:07:57 -05:00
Dave Parks eb809e373d SH-2481 Potential fix for viewer detecting incorrect amount of vram available when using certain video cards. 2011-10-05 01:03:42 -05:00
Dave Parks c4aa8c50da SH-2447, SH-2525, SH-2276 Strip out defunct global illumination code, add accounting for how much memory is taken up by LLRenderTarget, fix crash on login in bindGLIndices (work around driver bug that doesn't respect VAO state WRT to index buffers), remove some unused render targets, remove some unused shaders, make it possible to run a fullscreen session 2011-10-04 02:31:54 -05:00
Dave Parks ac37656aa5 SH-2276 Fix for failed assertions reported from debug-enabled viewers. Also, remove "Basic Shaders" as a user settable option (shaders are always on if GL version >= 2.0, always off otherwise) 2011-10-02 02:12:21 -05:00
Dave Parks 54ba56dbe9 SH-2244 changes to run in a core context on AMD hardware without generating deprecation or performance warnings 2011-09-26 18:31:55 -05:00
Dave Parks 56191701bc SH-2244 Fix for crash when enabling core profile on AMD GPUs 2011-09-25 02:43:43 -05:00
Dave Parks 4821a22070 SH-2244 Fix for mac build? 2011-09-23 18:29:38 -05:00
Dave Parks 57620a9da9 SH-2244 Vertex buffer cleanup, fix for bad vertices in rigged attachments, added "RenderUseVAO" debug setting to control whether or not to use VAO's in non-core GL profiles. 2011-09-23 17:59:05 -05:00
Dave Parks a2d08a6d80 SH-2244 Fix "RenderGLCoreProfile" actually make a core profile context and modify viewer to run under said context without generating errors. 2011-09-22 00:10:57 -05:00
Dave Parks 66acb932ba SH-2244 Add "RenderGLCoreProfile" debug setting that allows the viewer to start with a non-compatibility-profile OpenGL context. 2011-09-20 03:34:09 -05:00