Commit Graph

42222 Commits (6e5242f0a4e8a2e9cd9f21e89fae4870d1acceca)

Author SHA1 Message Date
Nat Goodspeed 6e5242f0a4 DRTVWR-476: Fix LLError::Log::classname(T*) template function.
First, the signature classname(const T*) was wrong: that function could only
accept a pointer to const T. The expression classname(someptr) where someptr
was a pointer to non-const SomeType displayed "SomeType*" because it could
only match classname(const T&), where T was SomeType*.

classname(T* const) is what we should have written, meaning "const pointer to
T" rather than "pointer to const T."

Second, the previous implementation failed to handle the case in which the
pointer was nullptr.
2020-05-14 08:50:39 -04:00
Nat Goodspeed 066fb5dafc DRTVWR-476: Default LLSDNotationFormatter now OPTIONS_PRETTY_BINARY.
LLSDNotationFormatter (also LLSDNotationStreamer that uses it, plus
operator<<(std::ostream&, const LLSD&) that uses LLSDNotationStreamer) is most
useful for displaying LLSD to a human, e.g. for logging. Having the default
dump raw binary bytes into the log file is not only suboptimal, it can
truncate the output if one of those bytes is '\0'. (This is a problem with the
logging subsystem, but that's a story for another day.)

Use OPTIONS_PRETTY_BINARY wherever there is a default LLSDFormatter
::EFormatterOptions argument.

Also, allow setting LLSDFormatter subclass boolalpha(), realFormat() and
format(options) using optional constructor arguments. Naturally, each subclass
that supports this must accept and forward these constructor arguments to its
LLSDFormatter base class constructor.

Fix a couple bugs in LLSDNotationFormatter::format_impl() for an LLSD::Binary
value with OPTIONS_PRETTY_BINARY:
- The code unconditionally emitted a b(len) type prefix followed by either raw
  binary or hex, depending on the option flag. OPTIONS_PRETTY_BINARY caused it
  to emit "0x" before the hex representation of the data. This is wrong in
  that it can't be read back by either the C++ or the Python LLSD parser.
  Correct OPTIONS_PRETTY_BINARY formatting consists of b16"hex digits" rather
  than b(len)"raw bytes".
- Although the code did set hex mode, it didn't set either the field width or
  the fill character, so that a byte value less than 16 would emit a single
  digit rather than two.

Instead of having one LLSDFormatter::format() method with an optional options
argument, declare two overloads. The format() overload without options passes
the mOptions data member to the overload accepting options.

Refactor the LLSDFormatter family, hoisting the recursive format_impl() method
(accepting level) to a pure virtual method at LLSDFormatter base-class level.
Most subclasses therefore need not override either base-class format() method,
only format_impl(). In fact the short format() overload isn't even virtual.

Consistently use LLSDFormatter::EFormatterOptions enum as the options
parameter wherever such options are accepted.
2020-05-13 16:37:12 -04:00
Nat Goodspeed 2ccb6422ea DRTVWR-476: Remove /showIncludes from llwindow project. 2020-05-11 11:47:53 -04:00
Nat Goodspeed c74810ca3f DRTVWR-476: Use find_library(dxguid) rather than find_path(). 2020-05-11 11:44:51 -04:00
Nat Goodspeed 89452ceceb DRTVWR-476: Whack-A-Mole not working, put switch on ALL llwindow 2020-05-07 20:25:23 -04:00
Nat Goodspeed 7766689f21 DRTVWR-476: Add /showIncludes to additional source files.
Having it on just one source file was frustrating because the project build
failed before it reached the one source file with the switch.
2020-05-07 20:01:11 -04:00
Nat Goodspeed df8e30b670 DRTVWR-476: Diagnostically /showIncludes for Windows SDK errors 2020-05-07 19:26:52 -04:00
Nat Goodspeed 92c70ff637 DRTVWR-476: Help DirectX.cmake cope with multiple SDK versions.
First, get rid of ancient cruft in the find_path() calls: on a 64-bit system,
"$ENV{PROGRAMFILES}" expands to the 64-bit 'Program Files' directory rather
than the 32-bit 'Program Files (x86)' directory, and none of the ancient cruft
would be found there anyway.

Empirically, find_path(dxdiag.h) is able to find the file using environment
variables (INCLUDE from VS variables?), so it doesn't need the specific
pathnames coded into that call.

Once we find DIRECTX_INCLUDE_DIR, don't immediately insert it into
include_directories: we've had troubles with incompatible Windows SDK versions
(compile errors in Microsoft header files!) when DIRECTX_INCLUDE_DIR preceded
the Windows SDK directory in the include path.

The DIRECTX_FIND_QUIETLY logic seemed backwards: the message(STATUS) output was
emitted only when DIRECTX_FIND_QUIETLY was false. Reverse that.

The ancient cruft in find_path(dxguid.lib) was causing it to find the wrong
(very old) DirectX library. Remove ancient cruft. But empirically, without
that, even once we've found DIRECTX_INCLUDE_DIR, CMake could not implicitly
find dxguid.lib. If the DirectX directory hierarchy were structured as
.../version/Include and .../version/Lib, a relative pathname would have been
sufficient hint. Unfortunately it's structured as .../Include/version and
.../Lib/version, so a relative pathname would have to include the specific
version. Instead, replace "/Include/" with "/Lib/". But even then, we have to
drill down to the architecture-specific subdirectory based on ADDRESS_SIZE.
2020-05-07 16:59:19 -04:00
Nat Goodspeed 61ec84b1d8 DRTVWR-476: Add llsd::clone(), llsd::shallow() aliases
for new llsd_clone(), llsd_shallow() functions.
2020-05-06 16:16:06 -04:00
Nat Goodspeed ca6f092929 DRTVWR-476: Merge branch 'master' of lindenlab/viewer into DRTVWR-476-boost-1.72 2020-05-06 16:06:26 -04:00
Nat Goodspeed 4a7fd0117a Increment viewer version to 6.4.2
following promotion of DRTVWR-500
2020-05-04 12:15:30 -04:00
Nat Goodspeed 4768d092f6 DRTVWR-476: Update to llca build 541101 2020-04-28 10:19:24 -04:00
Andrey Lihatskiy f20b22e325 AMD CPUs list update 2020-04-21 00:35:19 +03:00
Andrey Kleshchev 231b51f40f Restored SL-12732 after merge conflict 2020-04-20 22:20:16 +03:00
Andrey Kleshchev d9783adba7 SL-13040 Fixed crash at EnvironmentPersistAcrossLogin 2020-04-20 22:03:06 +03:00
Andrey Lihatskiy c757c29c95 Merge branch 'master' into DRTVWR-500
# Conflicts:
#	indra/newview/pipeline.cpp
2020-04-20 21:23:34 +03:00
Nat Goodspeed d7f1c88c35 Increment viewer version to 6.4.1
following promotion of DRTVWR-440
2020-04-20 14:09:16 -04:00
Dave Houlton 693791f4ff Merged in euclid-13019 (pull request #70)
SL-13019, fix broken varying linkage on MacOS

Approved-by: Michael Pohoreski
2020-04-14 19:00:25 +00:00
Dave Houlton ff27f6c8f7 SL-13019, fix broken varying linkage on MacOS 2020-04-14 12:56:40 -06:00
Andrey Kleshchev ee88ebf9e9 SL-13029 Fixed load order 2020-04-13 17:16:10 +03:00
Andrey Kleshchev 483c459e2e SL-13029 Environment update was not applying properly 2020-04-12 12:02:38 +03:00
Dave Houlton 8b3071dd1f Merged in euclid-12975 (pull request #65)
SL-12975, unfix alpha and undo non-fix magic number of refracted portion of water Fresnel
2020-04-10 00:40:07 +00:00
Dave Houlton 3c6b666ccd SL-12975, unfix alpha and undo non-fix magic number of refracted portion of water Fresnel 2020-04-09 18:30:33 -06:00
Nat Goodspeed 56e4a676e9 DRTVWR-476: For Boost 1.72, must suffix lib names with -x{32,64} 2020-04-09 08:49:08 -04:00
Nat Goodspeed 91cca79c14 DRTVWR-476: #include "boost/noncopyable.hpp" in another consumer. 2020-04-09 08:06:46 -04:00
Nat Goodspeed c7cf322be5 DRTVWR-476: #include "boost/noncopyable.hpp" in httpcommon.h.
Apparently, in previous Boost versions, boost::noncopyable was sneaking into
the namespace via other headers. Now the compiler complains about its absence
without an explicit #include.
2020-04-09 06:49:49 -04:00
Nat Goodspeed 320787f405 DRTVWR-476: Update zlib, freetype, libpng, boost, openssl, libxml2, googlemock, google_breakpad, curl, colladadom
Update zlib to codeticket version 538988.
Update freetype to codeticket version 539865.
Update libpng to codeticket version 539868.
Update boost to codeticket version 539869.
Update openssl to codeticket version 539874.
Update libxml2 to codeticket version 539866.
Update googlemock to codeticket version 539876.
Update google_breakpad to codeticket version 539880.
Update curl to codeticket version 539883.
Update colladadom to codeticket version 539922.
2020-04-08 20:20:32 -04:00
Nat Goodspeed 9db2439240 DRTVWR-476: Update openssl, zlib, freetype, libxml2, libpng, boost, google_breakpad, curl, googlemock, colladadom
Update openssl to codeticket version 539835.
Update zlib to codeticket version 538988.
Update freetype to codeticket version 539828.
Update libxml2 to codeticket version 539829.
Update libpng to codeticket version 539830.
Update boost to codeticket version 539833.
Update google_breakpad to codeticket version 539846.
Update curl to codeticket version 539847.
Update googlemock to codeticket version 539769.
Update colladadom to codeticket version 539768.
2020-04-08 10:31:16 -04:00
Michael Pohoreski 538a6d737d Merged in SL-10449 (pull request #63)
SL-10449

Approved-by: Dave Houlton <euclid@lindenlab.com>
2020-04-07 23:30:48 +00:00
Ptolemy af7563968c SL-10449: Put first shader error on new line for readability 2020-04-07 16:22:25 -07:00
Ptolemy e4f72db20d SL-10449: Add dumping of shader to log file 2020-04-07 16:21:39 -07:00
Dave Houlton 9e8e623197 SL-10449, add missing linkage variable, fix OSX & Intel deferred shaders comp 2020-04-07 14:23:24 -07:00
Ptolemy 0b717e2d1a SL-10449 Cleanup dumping shader without LOG spam on every line when it fails to compile/link 2020-04-07 14:22:24 -07:00
Ptolemy 4051f5754a SL-10449 Fix off-by-one line numbers when dumping shader that failed to compile/link 2020-04-07 14:07:45 -07:00
Ptolemy 1016b9de18 SL-10449 Fix ALM on OSX 2020-04-07 14:02:48 -07:00
Nat Goodspeed 1bf3448fd4 DRTVWR-476: Update boost, colladadom, googlemock
Update boost to codeticket version 539746.
Update colladadom to codeticket version 539768.
Update googlemock to codeticket version 539769.
2020-04-07 14:50:24 -04:00
Andrey Lihatskiy 72aad48427 Merged in DRTVWR-500 (pull request #60)
SL-10993 Fixed Korean font on OSX Catalina

Approved-by: Andrey Kleshchev
2020-04-06 20:40:48 +00:00
Andrey Lihatskiy 7d992f2331 SL-10993 Fixed Korean font on OSX Catalina 2020-04-06 20:57:33 +03:00
Nat Goodspeed c4d1cc9e9c DRTVWR-476: Update to slvoice build 539691 2020-04-03 16:44:05 -04:00
Dave Houlton 81c4c76d6d Merged in euclid-11368 (pull request #58)
SL-11368, fix missing water uniforms for low shader settings

Approved-by: Michael Pohoreski
2020-04-03 18:06:51 +00:00
Dave Houlton 0524a1a86f SL-11368, fix missing water uniforms for low shader settings 2020-04-03 11:52:18 -06:00
Michael Pohoreski eb4ceb533d Merged in SL-12852 (pull request #57)
SL-12852 Cleanup for readability

Approved-by: Dave Houlton <euclid@lindenlab.com>
2020-04-03 16:11:22 +00:00
Ptolemy a3f0913b4b SL-12852 Cleanup for readability 2020-04-03 08:10:36 -07:00
Nat Goodspeed d979ba68ee DRTVWR-476: Use a longer default timeout for Sync class.
The timeout is meant to prevent a deadlocked test program from hanging a
build. It's not intended to ensure some sort of SLA for the operations under
test. Empirically, using a longer timeout helps some test programs. The only
downside of increasing the timeout is that if some test does hang, it takes
longer to notice. But changes on the order of a few seconds are negligible.
2020-04-03 10:54:37 -04:00
Nat Goodspeed fde7dad001 DRTVWR-476: Make LoginListener::waitFor() take arbitrary predicate.
This allows one of the tests to specifically waitFor() the completion status
update from LLLogin, rather than the next status update to come along: the
coroutine potentially emits a whole sequence of status updates before
completion.

Then the waitFor() overload that merely waits for the next status update is
implemented by passing that specific predicate to the other overload.
2020-04-03 10:49:16 -04:00
Nat Goodspeed 5ced20b1a9 DRTVWR-476: chained_callback.h depends on lltut.h. #include it. 2020-04-03 10:48:03 -04:00
Nat Goodspeed 962ccb4f01 DRTVWR-476: Facilitate debugging test programs with logging.
On Mac, even if you run a test program with --debug or set LOGTEST=DEBUG, it
won't log to stderr if you're filtering build output or running the build in
an emacs compile buffer. This is because, on Mac, a viewer launched by mouse
rather than from the command line is passed a stderr stream that ultimately
gets logged to the system Console. The shouldLogToStderr() function is
intended to avoid spamming the Console with the (voluminous) viewer log
output. It tests whether stderr isatty() and, if not, suppresses calling
LLError::logToStderr().

This makes debugging test programs using log output trickier than necessary.
Change shouldLogToStderr() to permit logging when either stderr isatty() or is
a pipe. The original intention is preserved in that empirically, a viewer
launched by mouse is passed a stderr stream identified as a character device
rather than as a pipe.

Also introduce SetEnv, a class that facilitates setting (e.g.) LOGTEST=DEBUG
for specific test programs without setting it for all test programs in the
build. Using the constructor for a static object means you can set environment
variables before main() is entered, which is important because it's the main()
function in test.cpp that acts on the LOGTEST and LOGFAIL environment
variables.

These changes make it unnecessary to retain the temporary change in test.cpp
to force LOGTEST to DEBUG.
2020-04-03 10:46:17 -04:00
Nat Goodspeed dc07509f29 DRTVWR-476: Cherry-pick debug aids from commit 77b0c53 (fiber-mutex) 2020-04-03 10:38:53 -04:00
Rye Mutt 6058c49bb4 Merged in eep-fix-falloff-edit (pull request #54)
Fix light falloff being corrupted when editing value via build floater spinner

Approved-by: Dave Houlton
2020-04-01 00:25:07 +00:00
Rye Mutt c77e4e7a57 Merged in eep-fix-light-color (pull request #53)
Fix editing light color corrupting intensity and color values

Approved-by: Dave Houlton
2020-04-01 00:23:57 +00:00