Commit Graph

250 Commits (ee49b3b045e366aec466f46743214386d7fecb21)

Author SHA1 Message Date
Andrey Lihatskiy 1b68f71348 #824 Process source files in bulk: replace tabs with spaces, convert CRLF to LF, and trim trailing whitespaces as needed 2024-04-29 07:56:09 +03:00
Andrey Kleshchev 78ce375dda SL-17896 Don't crash silently if files are missing or out of memory
Under debug LL_ERRS will show a message as well, but release won't show
anything and will quit silently so show a notification when applicable.
2024-03-05 00:29:35 +02:00
Rye Mutt a4c2eab969
Fix integer overflow when framebuffers are extremely high resolution resulting in INT_MAX texture bias (#393) 2023-09-28 15:05:37 -05:00
Brad Linden f975cfd736 Merge remote-tracking branch 'origin/main' into DRTVWR-559 2023-07-17 13:37:03 -07:00
cosmic-linden d6d634d29f
SL-19331: Move media updates off-thread on select hardware (#153)
* SL-19331: Have media updates on the LLImageGL thread even when texture updates are on the main thread. Add config.

Off-thread media updates seem work best performance-wise when using glTexImage2D, not sub_image_lines. Otherwise, there are lots of main thread stalls.

* SL-19331: Bump featuretable

* SL-19331: Cleanup, annotate comment
2023-04-05 11:55:33 -05:00
Cosmic Linden a218eed9a6 SL-19434: Fix texture issues with minimap, but keep performance from SL-19331 2023-03-21 14:28:56 -07:00
Cosmic Linden 7d97008eba Revert "SL-19434 Temporary fix for minimap breakage."
This reverts commit 084ef5173f.
2023-03-21 14:27:37 -07:00
Alexander Gavriliuk 275ad3fdab SL-19266 Potential Use-After-Free in LLImageGL::setImage 2023-03-21 17:04:48 +01:00
Dave Parks 084ef5173f SL-19434 Temporary fix for minimap breakage. 2023-03-21 09:29:44 -05:00
Cosmic Linden 4319ba5edc SL-19331: Improve performance of setSubImage (ex: media updates) 2023-03-13 16:47:11 -07:00
Cosmic Linden c734602592 SL-19389: Fix textures not being optimally queued after the fix in SL-19338
In the future, some uses of glTexSubImage2D should be better vetted, ex: media prims
2023-03-10 17:32:35 -08:00
Cosmic Linden f3eaf390fe SL-19338: Don't use glTexSubImage2D on compressed textures 2023-03-08 16:57:38 -08:00
Cosmic Linden 3773bac6b4 Revert "SL-19338: (WIP) Test disabling new use of glTexSubImage2D and see if the bug still repros"
This reverts commit 6c486e4853.
2023-03-08 14:21:44 -08:00
Cosmic Linden 6c486e4853 SL-19338: (WIP) Test disabling new use of glTexSubImage2D and see if the bug still repros 2023-03-08 12:40:45 -08:00
Jonathan "Geenz" Goodman 46b2c0660a Hammering on more mac optimizations.
SL-18563
2023-02-25 22:24:46 -08:00
Brad Linden d8cdfaa645 Fix for SL-19010 mac crash in LLManipTranslartge::restoreGL().
Attempt to simplify and avoid use of GL_UNSIGNED_INT_8_8_8_8_REV where not needed
2023-01-19 14:25:14 -08:00
Dave Parks 8b39e0e1a6 SL-18869 Followup -- leverage "small commands" and time slicing to get rid of frame stalls on main thread without the need for multithreaded GL 2023-01-19 11:33:11 -06:00
Nat Goodspeed fc424a0db9 SL-18809: Add WorkSchedule; remove timestamps from WorkQueue.
For work queues that don't need timestamped tasks, eliminate the overhead of a
priority queue ordered by timestamp. Timestamped task support moves to
WorkSchedule. WorkQueue is a simpler queue that just waits for work.

Both WorkQueue and WorkSchedule can be accessed via new WorkQueueBase API. Of
course the WorkQueueBase API doesn't deal with timestamps, but a WorkSchedule
can be accessed directly to post timestamped tasks and then handled normally
(e.g. by ThreadPool) to run them.

Most ThreadPool functionality migrates to new ThreadPoolBase class, with
template subclass ThreadPoolUsing<WorkQueue> or ThreadPoolUsing<WorkSchedule>
depending on need. ThreadPool is now an alias for ThreadPoolUsing<WorkQueue>.
Importantly, ThreadPoolUsing::getQueue() delivers a reference to the specific
queue subclass type, so you can post timestamped tasks on a queue retrieved
from ThreadPoolUsing<WorkSchedule>::getQueue().

Since ThreadPool is no longer a simple class but an alias for a particular
template specialization, introduce threadpool_fwd.h to forward-declare it.

Recast workqueue_test.cpp to exercise WorkSchedule, since some of the tests
are time-based. A future todo would be to exercise each applicable test with
both WorkQueue and WorkSchedule.
2022-12-09 13:21:45 -05:00
Andrey Kleshchev 24fb2f8336 Merge branch 'master' (DRTVWR-548) into DRTVWR-559
# Conflicts:
#	indra/llrender/llgl.cpp
#	indra/llrender/llrendertarget.cpp
#	indra/newview/VIEWER_VERSION.txt
#	indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
#	indra/newview/llfloaterpreference.cpp
#	indra/newview/llviewercontrol.cpp
#	indra/newview/llviewermenu.cpp
#	indra/newview/llviewertexturelist.cpp
#	indra/newview/llvovolume.cpp
2022-10-21 18:19:27 +03:00
Dave Parks 09f3d6eaee Merge branch 'DRTVWR-559' of ssh://bitbucket.org/lindenlab/viewer into DRTVWR-559 2022-09-16 16:25:38 -05:00
Dave Parks 8dc59e5ef3 SL-18128 Clear out much OpenGL cruft and switch to core profile on AMD 2022-09-16 16:25:26 -05:00
Andrey Kleshchev 7649114588 Merge branch master (DRTVWR-571) into DRTVWR-559
# Conflicts:
#	indra/newview/llpanelface.cpp
#	indra/newview/llpanelface.h
2022-09-16 21:07:39 +03:00
Andrey Lihatskiy 329268c5f7 Merge branch 'master' into DRTVWR-548-maint-N
# Conflicts:
#	indra/newview/llmodelpreview.h
2022-09-15 20:44:04 +03:00
Howard Stearns 2082443220 SL-17967 - Git rid of ARB that is in core 2022-09-01 10:58:27 -07:00
Dave Parks 197ac7cc20 Merge remote-tracking branch 'remotes/origin/DRTVWR-563' into DRTVWR-559 2022-08-30 10:46:36 -05:00
Dave Parks 9bee2a92d2 SL-17997 Follow up from beta breakers results. 2022-08-26 10:51:42 -05:00
Andrey Kleshchev 9a8ab9592d SL-17732 std_bad_alloc at setManualImage 2022-07-06 22:22:36 +03:00
Nat Goodspeed 0bf91fc141 SL-17483: Merge branch 'track-threadpools' into sl-17483.
This picks up ThreadPoolSizes override logic embedded in ThreadPool's
constructor, plus the new static ThreadPool::getConfiguredWidth() and
getWidth() methods.
2022-06-09 11:22:01 -04:00
Nat Goodspeed 276647789a SL-17483: Simplify ThreadPool instantiations.
Now that LL::ThreadPool's constructor has subsumed the work of discovering a
runtime override width, LLAppViewer::initGeneralThread() can simply pass the
compile-time default width instead of redundantly checking ThreadPoolSizes.

Also the default ThreadPool capacity has been bumped up to what "General" and
"LLImageGL" were requesting, so they need not pass that explicitly or explain
in comments why they're doing it.

But until we start throwing work at the "General" ThreadPool, configure it
down to 1 thread in settings.xml.
2022-06-09 10:36:13 -04:00
Dave Parks 4261cbba78 SL-17485 Add texture memory accounting for OS X 2022-06-01 10:34:33 -05:00
Andrey Kleshchev 4cfa59d3f1 SL-17473 Viewer not clearing all Vertex Buffers in some cases
Image thread doesn't need mBuffer and buffer isn't thread safe so no point allocating it in an image thread.
2022-05-26 22:43:12 +03:00
Dave Parks 6eaf8521ab SL-17287 Instrument and optimize cubemap render. Fix for cubemap snapshots doing a full resolution render instead of a 512x512 render. 2022-05-20 19:05:28 -05:00
Dave Parks 3400e5fd30 SL-17284 Reflection probe tuning and optimization take 1 2022-05-16 17:21:08 +00:00
Dave Parks b6841d75c2 SL-17219 WIP - Texture pipeline overhaul 2022-04-15 19:02:07 -05:00
Dave Parks e60024f0af SL-17005 WIP - Use D3D/DXGI to query for available VRAM on Windows 2022-03-29 15:41:00 -05:00
Dave Parks 34e79c8f4e SL-17005 WIP Simplify what feeds texture loading bias to only pay attention to available memory according to OS and GL driver, not (broken) internal accounting (breaks intel GPUs, compatibility pass incoming). 2022-03-11 10:21:08 -06:00
Dave Parks 9dc8fee0f5 SL-16928 Fix for broken bumpmaps on Intel GPUs 2022-03-04 17:05:05 -06:00
Dave Parks 85e480616d Fix for mac build 2022-02-23 19:59:46 -06:00
Dave Parks 4f9fa5e817 Fix for some GPUs thinking they have 0 available vram. 2022-02-23 19:53:49 -06:00
Dave Parks fc0b238654 Fix for media textures failing to update (and eating lots of memory) on Mac/Intel 2022-02-23 17:55:44 -06:00
Dave Parks d9a68339d5 SL-16815 and SL-16906 Avoid redundant bumpmap generation, add some assertions around ref counting and (hack) fix crash on shutdown from dangling texture reference (reduced to 1 dangling texture from several hundred, can't find the remaining reference). 2022-02-23 16:51:33 -06:00
Dave Parks 74641a1213 SL-16815 Cleanup -- disable multithreaded bumpmap generation while tracking down loading issues, fix sync issue in single threaded mode in media textures, restore LL_IMAGEGL_THREAD_CHECK functionality 2022-02-22 19:48:01 -06:00
Dave Parks 1c5c45f273 SL-16815 Fix for broken media texture updates when multithreaded GL is disabled. 2022-02-22 14:58:50 -06:00
Dave Parks 0d6aa3c0fe SL-16815 Remove frame stalls from occlusion queries, bumpmap updates, and querying for available video memory. 2022-02-17 22:52:23 +00:00
Dave Parks f47730b92c SL-16418 Media texture update stall fix. Make media texture updates use LLImageGL thread to update, fix AMD sync issue on ImageGL thread and install debug callbacks on LLImageGL thread when debug gl enabled. 2022-02-14 18:07:24 +00:00
Dave Houlton fdc4a81b57 Revert "Merged in euclid-16418 (pull request #846)"
This reverts commit 40fe5277e1, reversing
changes made to af830e5fc5.
2022-02-01 15:49:32 -07:00
Dave Houlton 8d0efb54db SL-16418 rename media tex image per-update to avoid contention stall 2022-01-27 17:09:29 -07:00
Ptolemy bf0643e28a SL-16606: Add profiler category TEXTURE 2022-01-14 11:50:21 -08:00
Mnikolenko Productengine c614674ee6 SL-16282 FIXED Friend thumbnails are flickering 2021-12-06 19:20:49 +02:00
Dave Parks 5e5be92d79 SL-16202 Put Multi-threaded GL behind a feature flag and update featuretable (decruftify settings, compatibility pass). 2021-12-06 15:29:34 +00:00