Commit Graph

142 Commits (4349cb6165e983ff6bdd45ad1b82bb98bfc0436f)

Author SHA1 Message Date
Nat Goodspeed 4349cb6165 DRTVWR-575: Address review comments on Xcode 14.1 type tweaks.
Introduce LLSD template constructors and assignment operators to disambiguate
construction or assignment from any integer type to Integer, likewise any
floating point type to Real. Use new narrow() function to validate
conversions.

For LLSD method parameters converted from LLSD::Integer to size_t, where the
method previously checked for a negative argument, make it now check for
size_t converted from negative: in other words, more than S32_MAX. The risk of
having a parameter forced from negative to unsigned exceeds the risk of a
valid length or index over that max.

In lltracerecording.cpp's PeriodicRecording, now that mCurPeriod and
mNumRecordedPeriods are size_t instead of S32, defend against subtracting 1
from 0.

Use narrow() to validate newly-introduced narrowing conversions.

Make llclamp() return the type of the raw input value, even if the types of
the boundary values differ.

std::ostream::tellp() no longer returns a value we can directly report as a
number. Cast to U64.
2022-11-12 18:59:21 -10:00
Nat Goodspeed 9522a0b7c1 DRTVWR-575: Fix llcommon assumptions that size_t fits in 4 bytes.
It's a little distressing how often we have historically coded S32 or U32 to
pass a length or index.

There are more such assumptions in other viewer subdirectories, but this is a
start.
2022-11-03 14:58:32 -04: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
Andrey Lihatskiy 2e837e5389 Merge branch 'master' into DRTVWR-548-maint-N
# Conflicts:
#	doc/contributions.txt
#	indra/newview/llviewercontrol.cpp
2022-06-29 20:51:08 +03:00
Andrey Lihatskiy 77ce594dec Merge branch 'master' into DRTVWR-544-maint 2022-06-29 20:31:17 +03:00
Maxim Nikolenko 1167ea994c SL-17634 Replace deprecated carbon Gestalt calls 2022-06-22 18:00:49 +03:00
Andrey Lihatskiy 9b0569840f Merge branch 'master' into DRTVWR-544-maint
# Conflicts:
#	indra/llprimitive/llmodel.cpp
#	indra/llprimitive/llmodel.h
#	indra/newview/llappviewer.cpp
#	indra/newview/llappviewer.h
2022-05-31 01:58:09 +03:00
Andrey Lihatskiy 3da7a50b71 Merge branch 'master' into DRTVWR-543-maint
# Conflicts:
#	autobuild.xml
#	indra/cmake/LLCommon.cmake
#	indra/llcommon/CMakeLists.txt
#	indra/llrender/llgl.cpp
#	indra/newview/llappviewer.cpp
#	indra/newview/llface.cpp
#	indra/newview/llflexibleobject.cpp
#	indra/newview/llvovolume.cpp
2022-05-27 02:51:33 +03:00
Andrey Kleshchev ed74d15246 SL-17388 Add SSE version info to ViewerStats 2022-05-18 01:27:25 +03:00
Andrey Kleshchev ce4c694b66 Merge branch master (D540) into DRTVWR-546
# Conflicts:
#	indra/llcommon/llsdutil.cpp
#	indra/newview/VIEWER_VERSION.txt
#	indra/newview/lldrawpoolalpha.cpp
#	indra/newview/lldrawpoolwater.cpp
2022-04-18 23:42:39 +03:00
Andrey Lihatskiy dbb044e9bb Merge branch 'master' into DRTVWR-543-maint 2022-04-18 20:38:06 +03:00
Andrey Kleshchev 97a103255e Merge branch 'master' (DRTVWR-557) into DRTVWR-546
# Conflicts:
#	autobuild.xml
#	doc/contributions.txt
#	indra/cmake/GLOD.cmake
#	indra/llcommon/tests/llprocess_test.cpp
#	indra/newview/VIEWER_VERSION.txt
#	indra/newview/lldrawpoolavatar.cpp
#	indra/newview/llfloatermodelpreview.cpp
#	indra/newview/llmodelpreview.cpp
#	indra/newview/llviewertexturelist.cpp
#	indra/newview/llvovolume.cpp
#	indra/newview/viewer_manifest.py
2022-03-01 13:41:42 +02:00
Andrey Lihatskiy 201f83472c Merge branch 'master' into DRTVWR-543-maint 2022-02-28 21:55:28 +02:00
Andrey Lihatskiy 73eec89131 Merge branch 'master' into DRTVWR-540-maint
# Conflicts:
#	autobuild.xml
#	indra/llcommon/llsys.cpp
#	indra/newview/app_settings/key_bindings.xml
#	indra/newview/llfloatereditextdaycycle.cpp
2022-02-28 21:54:21 +02:00
Andrey Kleshchev 093395b489 SL-15997 Windows 11 detection #2 2022-01-12 21:31:24 +02:00
Andrey Kleshchev a3d14e89a3 SL-15997 Windows 11 detection 2022-01-12 21:30:43 +02:00
Andrey Lihatskiy 9a1af101cd Merge branch 'master' into DRTVWR-543-maint
# Conflicts:
#	indra/newview/llagentwearables.cpp
#	indra/newview/llvoicevivox.cpp
2021-11-19 04:38:19 +02:00
Dave Houlton 353329c2c2 DRTVWR-546 merge in master v6.5.1 2021-11-16 11:44:55 -07:00
Andrey Lihatskiy f9373a9b4e Merge branch 'master' into DRTVWR-527-maint
# Conflicts:
#	autobuild.xml
#	indra/newview/installers/windows/lang_pl.nsi
#	indra/newview/llfloaterpreference.cpp
#	indra/newview/llinventorymodel.cpp
2021-11-16 00:54:53 +02:00
Dave Parks 8d20480c5f SL-16148 SL-16244 SL-16270 SL-16253 Remove most BlockTimers, remove LLMemTracked, introduce alignas, hook most/all reamining allocs, disable synchronous occlusion, and convert frequently accessed LLSingletons to LLSimpleton 2021-10-28 18:06:21 +00:00
Andrey Kleshchev 1b5d151c15 SL-15997 Windows 11 detection 2021-10-21 03:44:40 +03:00
Andrey Kleshchev 4be6981c6d SL-15964 Fix gzip failing to compress files into unicode paths 2021-10-19 00:41:19 +03:00
Dave Parks 675514bdb3 SL-16093 Don't force the console window to be open on developer builds because it causes frame stalls while logging. 2021-09-27 23:56:06 +00:00
Andrey Kleshchev ab3261f901 SL-15997 Windows 11 version detection 2021-09-14 18:31:14 +03:00
Andrey Kleshchev 5af8f15a05 SL-14541 Replace zlib with zlib-ng 2021-09-08 23:18:07 +03:00
Mnikolenko Productengine c82995f3e6 SL-15832 Add OS bitness to ViewerStats 2021-09-07 18:46:40 +03:00
Andrey Lihatskiy 88ac2812b4 Merge branch 'master' into DRTVWR-522-maint 2021-06-07 21:04:46 +03:00
Andrey Lihatskiy e00edbeb4a Merge branch 'master' into DRTVWR-522-maint
# Conflicts:
#	doc/contributions.txt
2021-04-30 03:04:06 +03:00
Dave Houlton 2386125ae0 Merge master into DV525-merge-6.4.19 2021-04-29 11:40:22 -06:00
Brad Payne (Vir Linden) 54c2608d45 SL-12122 - removed frametime spikes in windows build caused by unnecessary call to GetPerformanceInfo() 2021-03-02 22:27:45 +02:00
Mnikolenko Productengine 03921adb12 SL-2202 Add exception handling around boost::regex_match() calls in the viewer 2021-01-11 17:07:03 +02:00
Dave Houlton 7cd076c796 DRTVWR-510 remove all LL_SOLARIS conditionals 2020-10-08 17:16:22 -06:00
AndreyL ProductEngine 2d22230950 SL-9935 Include full win10 build number in Help > About Second Life and logs 2018-11-12 15:31:19 +02:00
Oz Linden b0d8f3a1ab MAINT-4532: properly detect Windows 10 in the 64bit build (only - 32bit runs in Windows 8 compatibility mode) 2017-07-10 16:30:28 -04:00
Nat Goodspeed 9fa131b088 DRTVWR-418, MAINT-6996: Update Mac mem queries (per Drake Arconis)
Drake points out that the OS X 64-bit-capable memory-query APIs recommended in
comments by some long-ago maintainer are by now themselves obsolete. He
offered this patch to update us to current macOS memory APIs.
2017-05-10 14:19:44 -04:00
Nat Goodspeed 52899ed62a DRTVWR-418, MAINT-6996: Rationalize LLMemory wrt 64-bit support.
There were two distinct LLMemory methods getCurrentRSS() and
getWorkingSetSize(). It was pointless to have both: on Windows they were
completely redundant; on other platforms getWorkingSetSize() always returned
0. (Amusingly, though the Windows implementations both made exactly the same
GetProcessMemoryInfo() call and used exactly the same logic, the code was
different in the two -- as though the second was implemented without awareness
of the first, even though they were adjacent in the source file.)

One of the actual MAINT-6996 problems was due to the fact that
getWorkingSetSize() returned U32, where getCurrentRSS() returns U64. In other
words, getWorkingSetSize() was both useless *and* wrong. Remove it, and change
its one call to getCurrentRSS() instead.

The other culprit was that in several places, the 64-bit WorkingSetSize
returned by the Windows GetProcessMemoryInfo() call (and by getCurrentRSS())
was explicitly cast to a 32-bit data type. That works only when explicitly or
implicitly (using LLUnits type conversion) scaling the value to kilobytes or
megabytes. When the size in bytes is desired, use 64-bit types instead.

In addition to the symptoms, LLMemory was overdue for a bit of cleanup.

There was a 16K block of memory called reserveMem, the comment on which read:
"reserve 16K for out of memory error handling." Yet *nothing* was ever done
with that block! If it were going to be useful, one would think someone would
at some point explicitly free the block. In fact there was a method
freeReserve(), apparently for just that purpose -- which was never called. As
things stood, reserveMem served only to *prevent* the viewer from ever using
that chunk of memory. Remove reserveMem and the unused freeReserve().

The only function of initClass() and cleanupClass() was to allocate and free
reserveMem. Remove initClass(), cleanupClass() and the LLCommon calls to them.

In a similar vein, there was an LLMemoryInfo::getPhysicalMemoryClamped()
method that returned U32Bytes. Its job was simply to return a size in bytes
that could fit into a U32 data type, returning U32_MAX if the 64-bit value
exceeded 4GB. Eliminate that; change all its calls to getPhysicalMemoryKB()
(which getPhysicalMemoryClamped() used internally anyway). We no longer care
about any platform that cannot handle 64-bit data types.
2017-05-02 10:51:18 -04:00
Oz Linden c8726aba30 remove execute permission from many files that should not have it 2015-11-10 09:48:56 -05:00
Oz Linden 111900150d work arounds to compile on linux 2014-12-22 16:42:55 -05:00
callum_linden 8db1250b73 Update to build on Xcode 6.0: collection of similar const var not used warnings/errors [-Wunused-const-variable] 2014-10-17 14:08:58 -07:00
Oz Linden a98b4b6bee merge changes for 3.7.7-release 2014-05-07 11:09:04 -04:00
Oz Linden 776aadf4ef OPEN-199: replace the confusing STANDALONE switch with USESYSTEMLIBS 2014-03-19 17:30:07 -04:00
Richard Linden f7dc3937cd SH-4641 FIX Interesting: Incorrect amount of system memory detected on Mac 2013-12-03 20:27:41 -08:00
Richard Linden 34ff2fc46b merge with release 2013-12-02 14:57:29 -08:00
Richard Linden 17e9c872ad Automated merge with http://bitbucket.org/lindenlab/viewer-release 2013-11-11 19:17:49 -08:00
Graham Linden 10705b4360 Merge 3.6.11 for RC-ability 2013-11-11 15:50:01 -08:00
Graham Linden 970ee73e9a Fix release merge issues (included upstream changes not yet in release from bear) 2013-10-25 11:48:43 -07:00
Richard Linden 420a1af0c8 SH-4774 FIX: textures are blurry on Mac 2013-09-11 16:26:03 -07:00
Richard Linden ddd9d1396c merge 2013-09-09 20:19:36 -07:00
Richard Linden 21ab67416d SH-4774 FIX: textures are blurry on Mac 2013-09-09 20:18:12 -07:00
Richard Linden 52da9f5f49 merge with viewer-release 2013-09-09 18:58:41 -07:00