Commit Graph

44499 Commits (1cd1d3fbe2a5aae2e5736bb62c1b4aa413eba7fb)

Author SHA1 Message Date
Andrey Kleshchev 1cd1d3fbe2 SL-16420 Upload's physics LODs are broken in preview #2 2021-12-02 02:28:29 +02:00
Andrey Kleshchev 7929230c04 mac build fix
remove unused variable
2021-12-02 01:19:40 +02:00
Andrey Kleshchev 06c94c83fe SL-16420 Upload's physics LODs are broken in preview 2021-12-01 22:13:17 +02:00
Euclid Linden 3f82f7ce3d Merged in euclid-pre-16386 (pull request #793)
Purge LLGLSLShader::sNoFixedFunction, and all that flows from it. No functional changes.

Approved-by: Michael Pohoreski
Approved-by: Dave Parks
2021-12-01 15:59:02 +00:00
Dave Houlton abd7d80048 SL-16386 skip void return 2021-12-01 08:57:17 -07:00
Dave Houlton 7a5ef999d0 SL-16386 consolidate all VertexShader capability checks to a single LLPipeline::shadersLoaded() 2021-11-30 17:04:35 -07:00
Dave Houlton 08f0f6d833 SL-16386 remove references to (const true) LLPipeline::mVertexShadersEnabled 2021-11-30 17:04:35 -07:00
Dave Houlton 8b92652806 SL-16386 replace gutted LLRender::setAlphaRejectSettings() with explicit flush() 2021-11-30 17:04:35 -07:00
Dave Houlton 4d6963bd81 SL-16386 purge write-only state member LLCubeMap::mTextureCoordStage 2021-11-30 17:04:35 -07:00
Dave Houlton fab60f242e SL-16386 purge no-op fxn LLTexUnit::setTextureAlphaBlend() 2021-11-30 17:04:35 -07:00
Dave Houlton 3d1901dd4c SL-16386 purge no-op fxn LLTexUnit::setTextureColorBlend() 2021-11-30 17:04:35 -07:00
Dave Houlton 5fcea00c4f SL-16386 purge no-op fxn LLTexUnit::setTextureBlendType() 2021-11-30 17:04:35 -07:00
Dave Houlton 68e09edad0 SL-16386 remove references to (const true) LLGLSLShader::sNoFixedFunction 2021-11-30 17:04:35 -07:00
Nat Goodspeed 01317a2fad SL-16421: Destroy the "General" ThreadPool as soon as cleanup starts.
Introduce LLAppViewer::onCleanup(), a method that accepts a nullary callable
to execute once viewer shutdown begins. Fire the collected callables in
LLAppViewer::cleanup().

In llstartup.cpp, instead of declaring a static unique_ptr and relying on
static object destruction to clean up the "General" ThreadPool, bind the
pointer to the new ThreadPool into an onCleanup() lambda that will delete it
when called. ~ThreadPool() takes care of orderly shutdown.
2021-11-30 17:00:09 -05:00
Nat Goodspeed 9be88050e6 SL-16421: Unify LLAppViewer::cleanup() indentation.
Use hard tabs because most of the existing function uses those.
2021-11-30 17:00:09 -05:00
Nat Goodspeed cb85a4aaee SL-16421: Unify LLAppViewer class declaration alignment.
Use hard tabs as most of the class declaration already uses those.
2021-11-30 17:00:08 -05:00
Mnikolenko Productengine bc95529003 SL-16369 Remove Hardware Skinning setting 2021-11-30 19:01:33 +02:00
Dave Houlton 39733ba1cd DRTVWR-542 merge, purge GLOD copyrights from xml 2021-11-29 15:18:53 -07:00
Andrey Kleshchev 27e4e245d9 Merge branch 'DRTVWR-542-meshopt' into DRTVWR-546 2021-11-29 20:33:13 +02:00
Nat Goodspeed 7a0ca277f8 SL-16094: Merge branch 'DRTVWR-546' into glthread 2021-11-29 13:09:59 -05:00
Mnikolenko Productengine 5641f9612c SL-16408 fixed regression - crash on exit 2021-11-29 17:52:11 +02:00
Mnikolenko Productengine f7258b49b2 SL-16408 Fix for crashing on disconnect 2021-11-25 17:33:13 +02:00
Nat Goodspeed bd653fb693 SL-16094: Clean up a bit more merge cruft. 2021-11-24 15:20:47 -05:00
Nat Goodspeed 04ebc11a2d SL-16094: Fix WorkQueue test for correct behavior of runFor().
Turns out that one of our WorkQueue integration tests was relying on the
incorrect runFor() behavior that we just fixed, so the test broke. Now that
runFor() doesn't wait around for work to be posted, use an explicit wait loop
instead.

To support this, add LLCond::get(functor), where functor must accept a const
reference to the stored data. This new get() returns whatever the functor
returns, allowing a caller to peek at the stored data.

Also use universal references for all remaining LLCond functor arguments.
2021-11-24 12:56:48 -05: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 78d837789a SL-16400: Make WorkQueue::runFor() and runUntil() stop when done.
runFor(interval) and runUntil(timestamp) are intended, and documented, to run
*no longer than* the specified time. Instead, the initial implementation
always waited the full specified time, hoping for work to arrive. Fix that:
once we clear work that's already pending, return right away.
2021-11-24 09:43:37 -05:00
Nat Goodspeed 877a02dba1 SL-16094: Fix merge glitches from previous revert. 2021-11-24 09:38:56 -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
Dave Parks 8852cb9cbd SL-9436 Fix for glow disappearing when 100% transparent. 2021-11-23 21:33:21 +00:00
Mnikolenko Productengine fecbe73fca SL-16368 Fix for crashing on right-clicking mesh avatar on 32bit viewer 2021-11-23 22:52:58 +02:00
Dave Parks 724193e5b0 SL-16239 Fix for slowdown on AMD GPUs (disable core profile and remove volatile members from LLVertexBuffer) 2021-11-23 20:46:27 +00: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
Nat Goodspeed 30cf50e6af SL-16094: Support ll_convert<std::string>(const char*)
and correspondingly, ll_convert<std::wstring>(const wchar_t*).

Now that we're using ll_convert() for single-argument stringize(arg), make
sure it can efficiently handle the simple case of constructing a string from a
const char pointer.
2021-11-23 14:25:16 -05:00
Dave Parks 408ac8f18c SL-16401 Fix for rendering above water things into the water refraction render target. 2021-11-23 16:35:14 +00:00
Nat Goodspeed adc2666dbb SL-16094: Tweak llstring merge 2021-11-23 10:11:16 -05:00
Nat Goodspeed 3b8fc6b9b1 SL-16094: Merge llstring work from SL-16207 2021-11-23 10:09:26 -05:00
Nat Goodspeed a32a45163d SL-16094: Extend stringize() to support variadic arguments.
It's useful to be able to say STRINGIZE(item0 << item1 << item2), and we use
that a lot in our code base. But weird syntax aside, there are a couple
advantages to being able to write stringize(item0, item1, item2).

First, it allows stringize() to be used from within some other variadic
function, without having to make that function a macro that accepts an
arbitrary insertion-operator expression. There's no such thing as a member
macro.

Second, particularly for variadic functions, it allows us to optimize the
single-argument case stringize(item0). A macro can't do that. When item0 is
already a string of the desired char type, instead of streaming it into a
std::ostringstream and retrieving it again, we can simply return the input
string. When it's a pointer to the desired char type, we can directly
construct the result string without the help of std::ostringstream. When it's
a string of some other char type, we can engage ll_convert() to perform needed
conversions.

We generalize and optimize the generic gstringize() function, retaining the
role of stringize() and wstringize() as thin wrappers that merely provide the
desired char type.

Optimizing the single-argument case requires separately defining gstringize()
with two or more arguments: the general case. Then gstringize(arg) is
delegated to a gstringize_impl class template so we can partially specialize
to recognize a std::basic_string<desired_char_type> argument, as well as
desired_char_type*. Both these specializations engage ll_convert(), which
already handles the trivial case when no conversion is required.

Use of ll_convert() in this role supercedes and generalizes the previous
wstring_to_utf8str() and utf8str_to_wstring() overloads.

Also introduce stream_to(std::ostream&, ...) to support variadic streaming to
other destinations, e.g. a file, std::cout, ...
2021-11-23 09:58:54 -05:00
Runitai Linden 744646eb71 SL-16400 Fix for grey textures (hack). 2021-11-22 19:12:39 -06:00
Runitai Linden 9b0d8c7e62 SL-16094 More profile hooks for threading code, remove redundant wglCreateContextAttribs call 2021-11-22 18:42:56 -06:00
Euclid Linden c2f96c7826 Merged in euclid-13565-2 (pull request #782)
Condition reflection pass on non-void water occlusion queries directly, when occlusion is enabled

Approved-by: Dave Parks
Approved-by: Michael Pohoreski
2021-11-22 23:10:33 +00:00
Dave Houlton 8425c64292 SL-13565 restore the trampled tracy zones 2021-11-22 15:22:29 -07:00
Dave Houlton 100f53dd5a SL-13565 refactor (consolidate getters) water drawing 2021-11-22 15:22:29 -07:00
Dave Houlton bb379cb8cc SL-13565 disable reflection render pass when all non-void water is occluded 2021-11-22 15:22:28 -07:00
Runitai Linden cc34e26ef7 SL-16094 Add WorkQueue profile hooks 2021-11-22 11:51:03 -06:00
Mnikolenko ProductEngine 40f2e70875 mac build fix 2021-11-22 16:01:19 +02:00
Dave Parks 28f9fb06a9 SL-16289 Rigged mesh rendering overhaul 2021-11-20 18:49:19 +00:00
Nat Goodspeed 3171aaad9b SL-16094: fix merge glitch 2021-11-19 14:57:36 -05:00