Commit Graph

1090 Commits (f669e46308dd256367fea5da6946ae7b4dacd7b7)

Author SHA1 Message Date
Ansariel f669e46308 Merge branch 'master' of https://vcs.firestormviewer.org/phoenix-firestorm 2022-02-02 09:39:17 +01:00
Nicky ba31ac8efe Remove old dbus code and replace it with a glib/gio implementation. 2022-01-27 22:00:35 +01:00
Nicky 0c738bc9d7 Static link to libfreetype.a/libfontconfig.a 2022-01-24 17:45:23 +01:00
Ansariel 08fe29a658 Merge branch 'master' of https://vcs.firestormviewer.org/phoenix-firestorm 2022-01-22 11:46:16 +01:00
Nicky 4f4a11e054 Port X11 clipboard handling from Cool VL. Many thanks Henri 2022-01-22 02:03:35 +01:00
Ansariel 0a0e2fe93e Merge branch 'DRTVWR-546' of https://bitbucket.org/lindenlab/viewer 2022-01-15 02:39:07 +01:00
Ptolemy 8c823b75c0 SL-16606: Add profiler category WIN32 2022-01-14 11:50:22 -08:00
Ansariel 265bca5d63 Merge branch 'DRTVWR-546' of https://bitbucket.org/lindenlab/viewer 2022-01-13 21:18:22 +01:00
Nicky 0953b6b646 Merge branch 'master' into linux_fltk 2021-12-21 00:39:10 +01:00
Mnikolenko Productengine 3ac21ebbf6 SL-16454 FIXED Performance viewer login screen is black 2021-12-17 13:07:23 +02:00
Ansariel d06070241a Merge branch 'DRTVWR-546' of https://bitbucket.org/lindenlab/viewer
# Conflicts:
#	autobuild.xml
#	indra/cmake/00-Common.cmake
#	indra/newview/app_settings/settings.xml
#	indra/newview/llappviewer.cpp
#	indra/newview/lldrawpoolavatar.cpp
#	indra/newview/llvovolume.cpp
2021-12-16 10:09:12 +01:00
Ansariel 6663bc6f85 Merge branch 'master' of https://vcs.firestormviewer.org/phoenix-firestorm
# Conflicts:
#	autobuild.xml
#	indra/llfilesystem/llfilesystem.cpp
#	indra/newview/CMakeLists.txt
#	indra/newview/llappviewer.cpp
#	indra/newview/lldrawpoolavatar.cpp
#	indra/newview/llviewercontrol.cpp
2021-12-16 09:49:35 +01:00
Ansariel 47e2173239 Merge branch 'DRTVWR-546' of https://bitbucket.org/lindenlab/viewer
# Conflicts:
#	indra/llrender/llgl.cpp
#	indra/llwindow/llwindowwin32.cpp
#	indra/newview/app_settings/settings.xml
#	indra/newview/featuretable.txt
#	indra/newview/featuretable_mac.txt
#	indra/newview/lldrawpoolalpha.cpp
#	indra/newview/lldynamictexture.cpp
#	indra/newview/llviewerdisplay.cpp
#	indra/newview/pipeline.cpp
#	indra/newview/pipeline.h
2021-12-16 08:42:54 +01:00
Dave Houlton cf35d27dfb DRTVWR-546 merge up to 6.5.2 2021-12-15 14:37:18 -07:00
Zi Ree 3ecdc24bfb FIRE-11512 - Fix accelerator keys sometimes typing things into text entry fields on Linux 2021-12-15 20:45:49 +01:00
Mnikolenko Productengine c21dad8207 SL-16467 FIXED "Keyboard layout" is not switched 2021-12-13 12:14:14 +02:00
Runitai Linden 7683477547 SL-16480 Followup -- fix for unintialized mRect/mClientRect and bad getClientRectInScreenSpace 2021-12-09 16:44:44 -06:00
Runitai Linden 9689e606f4 SL-16480 Fix for window not saving its position on exit. 2021-12-09 14:01:41 -06: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 4a1ef323ae Merge branch 'DRTVWR-546' of https://bitbucket.org/lindenlab/viewer 2021-11-29 19:40:28 +01:00
Nat Goodspeed 0b066539fe DRTVWR-546, SL-16220, SL-16094: Undo previous glthread branch revert.
Reverting a merge is sticky: it tells git you never want to see that branch
again. Merging the DRTVWR-546 branch, which contained the revert, into the
glthread branch undid much of the development work on that branch. To restore
it we must revert the revert.

This reverts commit 029b41c041.
2021-11-24 10:47:54 -05:00
Nat Goodspeed d71e0a6d47 SL-16094, SL-16400: Merge branch 'DRTVWR-546' into glthread 2021-11-23 21:23:45 -05:00
Nat Goodspeed 67ace0df99 SL-16400: Address a couple shutdown crashes.
It can happen that we try to post() work for LLWindowWin32's window thread
after the thread's WorkQueue has been closed.

Also, instead of giving the "General" ThreadPool static lifespan, put it on
the heap, anchored with a static unique_ptr.
2021-11-23 20:48:44 -05:00
Nat Goodspeed 2b96f89c2a SL-16400: Add ThreadPool::start() method, and call it.
It's sometimes important to finish other initialization before launching the
threads in the ThreadPool, so make that an explicit step. In particular, we
were launching the LLImageGL texture thread before initializing the GL
context, resulting in all gray textures.
2021-11-23 20:39:32 -05:00
Nat Goodspeed 6d36038e40 Merge branch 'glthread' of ssh://bitbucket.org/lindenlab/viewer into glthreadx 2021-11-23 15:41:46 -05:00
Nat Goodspeed 37900e593d SL-16094: Fix second startup hang.
Add LLWindowWin32Thread::Post(), like post() except it uses PostMessage() to
send the work item to the window thread. Support this in mainWindowProc().

Move LLWindowWin32::recreateWindow()'s destroy_window_handler() call onto the
window thread. Delaying destruction of the old HWND ensures that we can use
PostMessage() and GetMessage() with that HWND to pass the lambda work item.
Moreover, it's likely to be less buggy to call DestroyWindow() on the same
thread that created the window.

Make recreateWindow()'s window thread lambda bind the window class parameters
by value, rather than binding 'this' and back-referencing LLWindowWin32
members.

Make recreateWindow() construct the window thread lambda and then decide
whether to pass it to the window thread using post() or Post(), depending on
whether we have a current HWND -- therefore whether the window thread is
blocked on GetMessage(). That means we can eliminate the kickWindowThread()
call.

Make destroy_window_handler() accept HWND by value rather than by non-const
reference. Since it doesn't attempt to modify the caller's value, this is a
better match for the function's semantics anyway -- but importantly, it lets
us pass a const HWND.
2021-11-23 15:40:36 -05:00
Runitai Linden 9b0d8c7e62 SL-16094 More profile hooks for threading code, remove redundant wglCreateContextAttribs call 2021-11-22 18:42:56 -06:00
Ansariel d881fa40d3 Merge branch 'DRTVWR-546' of https://bitbucket.org/lindenlab/viewer 2021-11-20 22:35:31 +01:00
Dave Parks 28f9fb06a9 SL-16289 Rigged mesh rendering overhaul 2021-11-20 18:49:19 +00:00
Andrey Kleshchev 7f2e740591 SL-15333 Crash in glh_init_extensions 2021-11-19 14:43:19 -05:00
Mnikolenko ProductEngine fdeeb0190e SL-16330 Allow vsync update without restart on mac 2021-11-17 17:51:50 +02:00
Ansariel c2f8517118 Merge branch 'master' of https://vcs.firestormviewer.org/phoenix-firestorm 2021-11-16 21:01:05 +01:00
Dave Houlton 353329c2c2 DRTVWR-546 merge in master v6.5.1 2021-11-16 11:44:55 -07:00
Andrey Lihatskiy 0bffd3d365 Merge branch 'master' into DRTVWR-519
# Conflicts:
#	README.md
2021-11-16 01:21:05 +02:00
Nat Goodspeed a633efdc0b SL-16094: In LLWindowWin32::recreateWindow(), kick window thread
before blocking on the pending future. Otherwise the window thread can remain
blocked in a GetMessage() call and deadlock the app.
2021-11-15 14:34:30 -05:00
Ansariel 4a59f6650f Merge branch 'DRTVWR-546' of https://bitbucket.org/lindenlab/viewer 2021-11-15 18:10:02 +01:00
Ansariel 74055d022f Fix null pointer guard for wglSwapIntervalEXT 2021-11-15 17:58:45 +01:00
Dave Houlton 029b41c041 Revert "SL-16220: Merge branch 'origin/DRTVWR-546' into glthread"
This reverts commit 5188a26a85, reversing
changes made to 819088563e.
2021-11-15 09:25:35 -07:00
Ansariel 5dcac17109 Start probing with OGL version 4.6 again 2021-11-13 00:16:37 +01:00
Nat Goodspeed 5188a26a85 SL-16220: Merge branch 'origin/DRTVWR-546' into glthread 2021-11-12 12:10:44 -05:00
Ansariel 790ead2ef2 Merge branch 'master' of https://vcs.firestormviewer.org/viewer-merges/phoenix-firestorm-541
# Conflicts:
#	doc/contributions.txt
#	indra/llcommon/llmemory.h
#	indra/llcommon/llprofiler.h
#	indra/llcommon/lltracerecording.h
#	indra/newview/llappviewer.cpp
#	indra/newview/lldrawpool.cpp
#	indra/newview/lldrawpoolalpha.cpp
#	indra/newview/lldrawpoolavatar.cpp
#	indra/newview/lldrawpoolbump.cpp
#	indra/newview/llvoavatar.cpp
#	indra/newview/llvovolume.cpp
#	indra/newview/pipeline.cpp
2021-11-12 17:43:32 +01: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
Andrey Kleshchev 5534781acf SL-15333 Crash in glh_init_extensions 2021-11-12 17:21:50 +02:00
Ansariel 7427b46ea5 Merge branch 'DRTVWR-546' of https://bitbucket.org/lindenlab/viewer
# Conflicts:
#	.gitignore
#	indra/cmake/Copy3rdPartyLibs.cmake
#	indra/llcommon/llcommon.cpp
#	indra/llcommon/llerror.cpp
#	indra/llcommon/llprofiler.h
#	indra/llcommon/llthread.cpp
#	indra/llimage/llimageworker.cpp
#	indra/llprimitive/llmodel.h
#	indra/llrender/llfontgl.cpp
#	indra/llrender/llfontgl.h
#	indra/llrender/llgl.cpp
#	indra/llrender/llvertexbuffer.cpp
#	indra/llrender/llvertexbuffer.h
#	indra/llwindow/llwindowmacosx.h
#	indra/llwindow/llwindowwin32.cpp
#	indra/llwindow/llwindowwin32.h
#	indra/newview/app_settings/settings.xml
#	indra/newview/llappviewer.cpp
#	indra/newview/llappviewer.h
#	indra/newview/lldrawpoolavatar.cpp
#	indra/newview/lldrawpoolavatar.h
#	indra/newview/lldynamictexture.cpp
#	indra/newview/llfloatermodelpreview.cpp
#	indra/newview/llimview.cpp
#	indra/newview/llmeshrepository.h
#	indra/newview/llmodelpreview.cpp
#	indra/newview/llnetmap.cpp
#	indra/newview/llskinningutil.cpp
#	indra/newview/llskinningutil.h
#	indra/newview/llspatialpartition.cpp
#	indra/newview/llteleporthistory.cpp
#	indra/newview/llviewerdisplay.cpp
#	indra/newview/llviewerobject.cpp
#	indra/newview/llviewerobjectlist.cpp
#	indra/newview/llviewertexture.cpp
#	indra/newview/llviewertexturelist.cpp
#	indra/newview/llviewerwindow.cpp
#	indra/newview/llvoicevivox.cpp
#	indra/newview/llvosky.cpp
#	indra/newview/llvovolume.cpp
2021-11-12 15:21:52 +01:00
Nat Goodspeed 1a39a8f7d9 Merge branch 'DRTVWR-546' into glthread 2021-11-10 10:28:58 -05:00
Nat Goodspeed 214d8d40c1 SL-16094: Statically link to Windows IMM32.LIB.
llwindowwin32.cpp's LLWinImm class used to dynamically load IMM32.DLL and
populate its methods using GetProcAddress(). That was to support Windows XP.
Since we've dropped Windows XP, use static linking instead, with dramatically
fewer lines of code (and less of a thread safety alarm trigger).

We retain the LLWinImm wrapper class only as a hook for Tracy instrumentation.
2021-11-10 10:17:12 -05:00
Mnikolenko Productengine 768b7a4d33 SL-16330 Clean up vertical sync handling, add to UI 2021-11-09 17:17:49 +02:00
Nat Goodspeed 08336bb469 SL-16094: Zap thread safety land mine; thin PostMessage() calls.
LLWindowWin32::mWndProc was a public WNDPROC member. If set non-NULL,
mainWindowProc() would call that before falling into its own handler code. But
now, mWndProc would be called on the window thread instead of on the main
thread. Running arbitrary callback code on the window thread could cause all
sorts of problems.

It could be made safe by posting the callback call to the "mainloop" WorkQueue
for execution on the main thread. But as no code actually references it,
delete it instead.

Per DaveP, the recent change to LLWindowsWin32Thread::post() could end up
calling PostMessage() many times per frame, with nontrivial overhead.
Reinstate the more selective code that calls PostMessage() with the dummy
message (to bust us out of GetMessage() to check pending window-thread work
requests) at most once per frame.
2021-11-08 15:15:56 -05:00
Nat Goodspeed c7af4921db SL-16094: Use ThreadPool for LLWindowWin32Thread.
Move the whole LLWindowWin32Thread class inside LLWindowWin32, and make it a
struct. Migrate the struct declaration to llwindowwin32.cpp.

Derive it from ThreadPool, which provides the WorkQueue. Use runPending()
instead of manually popping and running individual queue items.

Make its post() operation always PostMessage(bogus) whenever we put an entry
in the WorkQueue, so we won't remain blocked in GetMessage().

Instead of storing a back pointer to the LLWindowWin32 instance, store the
relevant HWND and HDC in LLWindowWin32Thread itself to avoid cross-thread
timing problems.

Extract both instances of a large duplicated block of LLWindowWin32 code to a
new recreateWindow() method, and call it in those places. Per the TODO, use a
std::future to pass the new HWND and HDC back to LLWindowWin32 -- but also
store them locally on the LLWindowWin32Thread instance.
2021-11-05 17:20:11 -04:00