summaryrefslogtreecommitdiff
path: root/indra/llcommon
AgeCommit message (Collapse)Author
2024-10-03fix GameControl save settings, fix linux buildAndrew Meadows
2024-10-03remove crashy LLSD ctor used by GameControlleviathan
2024-10-03Add GameControl UI for per device settingsAlexander Gavriliuk
2024-10-03avatar_motion-->GameControl translation and flycamLeviathan Linden
2024-10-03add GameControl feature and SDL2 dependencyLeviathan Linden
2024-10-02Add a lot of more constexpr; use constants for accessing vector indices in ↵Ansariel Hiller
vector math classes (#2766)
2024-09-30Fix or workaround test build failures on linuxRye Cogtail
2024-09-30Fix -Wpessimizing-move warning in makeClassicCallbackRye Cogtail
2024-09-30Fix GCC warning about unused _out parameter in LL_DEBUGSRye Cogtail
2024-09-29Zap trailing spaces.Nat Goodspeed
2024-09-29Try to eliminate the runtime cost of `ll_convert_to<T>(const T&)`.Nat Goodspeed
2024-09-26get rid of extra LL in help textMnikolenko Productengine
2024-09-24Merge pull request #2534 from secondlife/release/luau-scriptingnat-goodspeed
Add Lua scripting to develop, behind feature flag
2024-09-24Reduce memory allocations pinging the mainloop timeoutAnsariel
2024-09-23Merge remote 'release/luau-scripting' into release/luau-scriptingNat Goodspeed
2024-09-23include <utility> for Linux: std::forward is not predefinedNat Goodspeed
2024-09-23Merge remote branch 'develop' into release/luau-scripting for Maint BNat Goodspeed
2024-09-23Merge branch 'develop' into marchcat/b-developAndrey Lihatskiy
# Conflicts: # indra/newview/llfeaturemanager.cpp # indra/newview/llviewertexturelist.cpp # indra/newview/llvoicewebrtc.cpp
2024-09-23Merge remote branch 'develop'into release/luau-scriptingNat Goodspeed
2024-09-20Update test for changed message in error case.Nat Goodspeed
2024-09-20Merge branch 'release/luau-scripting' into lua-script-argsNat Goodspeed
2024-09-20Add ability to pass command-line arguments to a Lua script.Nat Goodspeed
Introduce `ScriptCommand` class that parses a command line into a script name and optional args, using bash-like quoting and escaping. `ScriptCommand` searches for a file with that script name on a passed list of directories; the directories may be specified relative to a particular base directory. `ScriptCommand` supports the special case of a script name containing unescaped spaces. It guarantees that either the returned script file exists, or its `error()` string is non-empty. Replace `LLLeap::create()` logic, from which `ScriptCommand` was partly derived, with a `ScriptCommand` instance. Make `LLLUAmanager::runScriptFile()` use a `ScriptCommand` instance to parse the passed command line. Subsume `LLAppViewer::init()` script-path-searching logic for `--luafile` into `ScriptCommand`. In fact that lambda now simply calls `LLLUAmanager::runScriptFile()`. Make `lluau::dostring()` accept an optional vector of script argument strings. Following PUC-Rio Lua convention, pass these arguments into a Lua script as the predefined global `arg`, and also as the script's `...` argument. `LuaState::expr()` also accepts and passes through script argument strings. Change the log tag for the Lua script interruption message: if we want it, we can still enable it, but we don't necessarily want it along with all other "Lua" DEBUG messages. Remove `LuaState::script_finished_fn`, which isn't used any more. Also remove the corresponding `LLLUAmanager::script_finished_fn`. This allows us to simplify `~LuaState()` slightly, as well as the parameter signatures for `LLLUAmanager::runScriptFile()` and `runScriptLine()`.
2024-09-19Merge pull request #2610 from secondlife/frame-profile-jsonnat-goodspeed
Make Develop->Render Tests->Frame Profile dump JSON to a file too.
2024-09-19viewer#2608 Crash at LLSnapshotLivePreview::getFormattedImageAndrey Kleshchev
2024-09-19trailing spaces from other branchesNat Goodspeed
2024-09-19Merge branch 'develop' into frame-profile-jsonNat Goodspeed
2024-09-18Turn off sLogInSignal to avoid crashing. (#2607)Brad Linden
fixes secondlife/viewer#2566
2024-09-18Add hexdump.h with iostream manipulators to dump a byte range as hexNat Goodspeed
or to produce readable text from a mix of printing and nonprinting ASCII characters. (cherry picked from commit 01a59bab1a4b7c4645271a21cfaadc3735b6029c)
2024-09-18Ditch trailing space.Nat Goodspeed
2024-09-18Give our fsyspath an operator std::string() conversion method.Nat Goodspeed
This is redundant (but harmless) on a Posix system, but it fills a missing puzzle piece on Windows. The point of fsyspath is to be able to interchange freely between fsyspath and std::string. Existing fsyspath could be constructed and assigned from std::string, and we could explicitly call its string() method to get a std::string, but an implicit fsyspath-to-string conversion that worked on Posix would trip us up on Windows. Fix that. (cherry picked from commit fbeff6d8052d4b614a0a2c8ebaf35b45379ab578)
2024-09-18Introduce fsyspath subclass of std::filesystem::path.Nat Goodspeed
Our std::strings are UTF-8 encoded, so conversion from std::string to std::filesystem::path must use UTF-8 decoding. The native Windows std::filesystem::path constructor and assignment operator accepting std::string use "native narrow encoding," which mangles path strings containing UTF-8 encoded non-ASCII characters. fsyspath's std::string constructor and assignment operator explicitly engage std::filesystem::u8path() to handle encoding. u8path() is deprecated in C++20, but once we adapt fsyspath's conversion to C++20 conventions, consuming code need not be modified. (cherry picked from commit e399b02e3306a249cb161f07cac578d3f2617bab)
2024-09-18Add LLFloaterAbout info (esp. GPU info) to Frame Profile stats dumpNat Goodspeed
With the About info added, `getProfileStatsContext()` need not redundantly add `"channel"`, `"version"` or `"region"`. Slightly improve the efficiency of `LlsdToJson()` and `LlsdFromJson()` by preallocating the known size of the source array or map. (Unfortunately the C++ `LLSD` class offers us no way to preallocate a map.) In `LLAppViewer::getViewerInfo()`, avoid immediate successive calls to `gAgent.getRegion()`. (cherry picked from commit f4b65638879c10c832b3bb8448f82001106ffd11)
2024-09-16Add LLFloaterAbout info (esp. GPU info) to Frame Profile stats dumpNat Goodspeed
With the About info added, `getProfileStatsContext()` need not redundantly add `"channel"`, `"version"` or `"region"`. Slightly improve the efficiency of `LlsdToJson()` and `LlsdFromJson()` by preallocating the known size of the source array or map. (Unfortunately the C++ `LLSD` class offers us no way to preallocate a map.) In `LLAppViewer::getViewerInfo()`, avoid immediate successive calls to `gAgent.getRegion()`.
2024-09-16WIP: edits in support of Lua script argsNat Goodspeed
2024-09-13Clean up Windows build (#2562)Ansariel Hiller
* APR_DECLARE_STATIC and APU_DECLARE_STATIC gets already defined in APR.cmake * Move both _CRT_SECURE_NO_WARNINGS and _WINSOCK_DEPRECATED_NO_WARNINGS definitions to 00-Common.cmake * Always define WIN32_LEAN_AND_MEAN and include subset of Windows API by default * Remove llwin32headerslean.h and remove unnecessary WIN32_LEAN_AND_MEAN definition handling in llwin32headers.h * Clean up includes of Windows API headers * Get rid of workaround to link against IPHLPAPI.lib in lluuid.cpp - this seems to have been an issue in the past that has been fixed
2024-09-13Merge pull request #2548 from secondlife/lua-frame-profilenat-goodspeed
Make Develop->Render Tests->Frame Profile dump JSON to a file too (#2412)
2024-09-12Merge branch 'develop' into release/luau-scriptingNat Goodspeed
2024-09-12Merge pull request #2561 from secondlife/brad/2553-about-sl-crash-locale-initBrad Linden
secondlife/viewer#2553 about sl crash locale init
2024-09-12Attempted fix for mac crash when showing About Second Life.Brad Linden
secondlife/viewer#2553
2024-09-12Fix for mac build with tracy enabled.Brad Linden
2024-09-12Fix for tracy not working on macDave Parks
2024-09-12Disable happy-path destructor semantics when unwinding C++ stack.Nat Goodspeed
If the C++ runtime is already handling an exception, don't try to launch more Lua operations.
2024-09-12Work around broken MS `std::basic_ostream`.Nat Goodspeed
MSVC's `std::basic_ostream<CHAR>` template is not implemented in a general way: it can only be instantiated for certain specific `CHAR` types. Declaring a `std::basic_ostringstream<llwchar>` fails on MSVC with C2941. Fortunately both llstring.cpp functions that build a `LLWString` incrementally have the same characteristics: (a) they each build it one character at a time, and (b) the length of the result `LLWString` won't exceed the known length of the input string. So it works to declare a `std::vector<llwchar>`, `reserve()` the input length and `push_back()` individual characters. Then we can use `LLWString`'s range constructor to immediately allocate the right size.
2024-09-12Specialize `std::numpunct<llwchar>` to fix broken MS `basic_ostream`.Nat Goodspeed
MSVC's `std::basic_ostream<CHAR>` template is not implemented in a general way: it can only be instantiated for certain specific `CHAR` types. Declaring a `std::basic_ostringstream<llwchar>` fails on MSVC with C2941. The ugly workaround from Stack Overflow is to clone-and-edit Microsoft's `std::numpunct` template, locally specializing it for the desired `CHAR` type.
2024-09-10Profile guided optimizationsRunitaiLinden
2024-09-10In llstring.cpp, build result strings using basic_ostringstream<T>.Nat Goodspeed
Many of the string conversion functions in llstring.cpp would build their result strings using successive concatenation operations, piece by piece. This can be expensive in allocations. Instead, use a std::basic_ostringstream of char type appropriate to the return string type to aggregate piecewise string building.
2024-09-10Fix risky signature of `wchar_to_utf8chars()`. Add `ll_convert()` alias.Nat Goodspeed
`wchar_to_utf8chars()` used to require a `char*` output buffer with no length, assuming that its caller knew enough to provide a buffer of sufficient length. In fact a `char[8]` buffer suffices, but nothing in the header indicated that. Eliminate the output parameter and return `std::string`. Fix the few existing callers. Also set an `ll_convert_alias` so that `ll_convert_to<std::string>(llwchar)` directly calls `wchar_to_utf8chars()`. Replace instances of the workaround `wstring_to_utf8str(LLWString(1, llwchar))`.
2024-09-10llinstancetracker.h was missing an #include from last merge.Nat Goodspeed
2024-09-10Pass std::string_view by value, not by const reference.Nat Goodspeed
Consensus seems to be that (a) string_view is, in effect, already a reference, (b) it's small enough to make pass-by-value reasonable and (c) the optimizer can reason about values way better than it can about references.
2024-09-09Merge branch 'develop' into release/luau-scriptingNat Goodspeed