Skip to content

Commit 78174fc

Browse files
committed
Merge remote-tracking branch 'origin/main' into DRTVWR-588-maint-W
# Conflicts: # .github/workflows/build.yaml
2 parents 689ef94 + 9567393 commit 78174fc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+684
-601
lines changed

.github/workflows/build.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
ref: ${{ github.event.pull_request.head.sha || github.sha }}
6666

6767
- name: Setup python
68-
uses: actions/setup-python@v4
68+
uses: actions/setup-python@v5
6969
with:
7070
python-version: ${{ matrix.python-version }}
7171

@@ -86,7 +86,7 @@ jobs:
8686
run: pip3 install autobuild llsd
8787

8888
- name: Cache autobuild packages
89-
uses: actions/cache@v3
89+
uses: actions/cache@v4
9090
id: cache-installables
9191
with:
9292
path: .autobuild-installables
@@ -101,7 +101,7 @@ jobs:
101101

102102
- name: Determine source branch
103103
id: which-branch
104-
uses: secondlife/viewer-build-util/which-branch@relnotes
104+
uses: secondlife/viewer-build-util/which-branch@v1
105105
with:
106106
token: ${{ github.token }}
107107

autobuild.xml

Lines changed: 84 additions & 150 deletions
Large diffs are not rendered by default.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Textures imported via Build->Upload->Material that have an all opaque (255) alpha channel should have their alpha channel removed before upload.
2+
3+
1. Make 4 images that have different colors but all 255 alpha channels
4+
2. Upload them all using Build->Upload->Material, with one in each of the material texture slots
5+
3. Verify that using the textures as a blinn-phong diffuse map does not make the corresponding face render in the alpha pass (face should stay visible after disabling alpha pass by unchecking Advanced->Render Types->Alpha).

indra/llcommon/indra_constants.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ const LLUUID IMG_FIRE ("aca40aa8-44cf-44ca-a0fa-93e1a2986f82"); // dataserver
5050
const LLUUID IMG_FACE_SELECT ("a85ac674-cb75-4af6-9499-df7c5aaf7a28"); // face selector
5151
const LLUUID IMG_DEFAULT_AVATAR ("c228d1cf-4b5d-4ba8-84f4-899a0796aa97"); // dataserver
5252
const LLUUID IMG_INVISIBLE ("3a367d1c-bef1-6d43-7595-e88c1e3aadb3"); // dataserver
53+
const LLUUID IMG_WHITE ("5748decc-f629-461c-9a36-a35a221fe21f"); // dataserver
5354

5455
const LLUUID IMG_EXPLOSION ("68edcf47-ccd7-45b8-9f90-1649d7f12806"); // On dataserver
5556
const LLUUID IMG_EXPLOSION_2 ("21ce046c-83fe-430a-b629-c7660ac78d7c"); // On dataserver
@@ -71,6 +72,11 @@ const LLUUID TERRAIN_ROCK_DETAIL ("53a2f406-4895-1d13-d541-d2e3b86bc19c"); // V
7172

7273
const LLUUID DEFAULT_WATER_NORMAL ("822ded49-9a6c-f61c-cb89-6df54f42cdf4"); // VIEWER
7374

75+
const LLUUID DEFAULT_OBJECT_TEXTURE ("89556747-24cb-43ed-920b-47caed15465f"); // On dataserver
76+
const LLUUID DEFAULT_OBJECT_SPECULAR ("87e0e8f7-8729-1ea8-cfc9-8915773009db"); // On dataserver
77+
const LLUUID DEFAULT_OBJECT_NORMAL ("85f28839-7a1c-b4e3-d71d-967792970a7b"); // On dataserver
78+
const LLUUID BLANK_OBJECT_NORMAL ("5b53359e-59dd-d8a2-04c3-9e65134da47a"); // VIEWER (has a verion on dataserver, but with compression artifacts)
79+
7480
const LLUUID IMG_USE_BAKED_HEAD ("5a9f4a74-30f2-821c-b88d-70499d3e7183");
7581
const LLUUID IMG_USE_BAKED_UPPER ("ae2de45c-d252-50b8-5c6e-19f39ce79317");
7682
const LLUUID IMG_USE_BAKED_LOWER ("24daea5f-0539-cfcf-047f-fbc40b2786ba");

indra/llcommon/indra_constants.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ LL_COMMON_API extern const LLUUID IMG_FIRE;
197197
LL_COMMON_API extern const LLUUID IMG_FACE_SELECT;
198198
LL_COMMON_API extern const LLUUID IMG_DEFAULT_AVATAR;
199199
LL_COMMON_API extern const LLUUID IMG_INVISIBLE;
200+
LL_COMMON_API extern const LLUUID IMG_WHITE;
200201

201202
LL_COMMON_API extern const LLUUID IMG_EXPLOSION;
202203
LL_COMMON_API extern const LLUUID IMG_EXPLOSION_2;
@@ -230,6 +231,10 @@ LL_COMMON_API extern const LLUUID IMG_USE_BAKED_AUX3;
230231

231232
LL_COMMON_API extern const LLUUID DEFAULT_WATER_NORMAL;
232233

234+
LL_COMMON_API extern const LLUUID DEFAULT_OBJECT_TEXTURE;
235+
LL_COMMON_API extern const LLUUID DEFAULT_OBJECT_SPECULAR;
236+
LL_COMMON_API extern const LLUUID DEFAULT_OBJECT_NORMAL;
237+
LL_COMMON_API extern const LLUUID BLANK_OBJECT_NORMAL;
233238

234239
// radius within which a chat message is fully audible
235240
const F32 CHAT_NORMAL_RADIUS = 20.f;

indra/llcommon/llcoros.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@ std::string LLCoros::launch(const std::string& prefix, const callable_t& callabl
278278
catch (std::bad_alloc&)
279279
{
280280
// Out of memory on stack allocation?
281+
LLError::LLUserWarningMsg::showOutOfMemory();
281282
printActiveCoroutines();
282283
LL_ERRS("LLCoros") << "Bad memory allocation in LLCoros::launch(" << prefix << ")!" << LL_ENDL;
283284
}

indra/llcommon/llerror.cpp

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1601,6 +1601,48 @@ namespace LLError
16011601
{
16021602
return out << boost::stacktrace::stacktrace();
16031603
}
1604+
1605+
// LLOutOfMemoryWarning
1606+
std::string LLUserWarningMsg::sLocalizedOutOfMemoryTitle;
1607+
std::string LLUserWarningMsg::sLocalizedOutOfMemoryWarning;
1608+
LLUserWarningMsg::Handler LLUserWarningMsg::sHandler;
1609+
1610+
void LLUserWarningMsg::show(const std::string& message)
1611+
{
1612+
if (sHandler)
1613+
{
1614+
sHandler(std::string(), message);
1615+
}
1616+
}
1617+
1618+
void LLUserWarningMsg::showOutOfMemory()
1619+
{
1620+
if (sHandler && !sLocalizedOutOfMemoryTitle.empty())
1621+
{
1622+
sHandler(sLocalizedOutOfMemoryTitle, sLocalizedOutOfMemoryWarning);
1623+
}
1624+
}
1625+
1626+
void LLUserWarningMsg::showMissingFiles()
1627+
{
1628+
// Files Are missing, likely can't localize.
1629+
const std::string error_string =
1630+
"Second Life viewer couldn't access some of the files it needs and will be closed."
1631+
"\n\nPlease reinstall viewer from https://secondlife.com/support/downloads/ and "
1632+
"contact https://support.secondlife.com if issue persists after reinstall.";
1633+
sHandler("Missing Files", error_string);
1634+
}
1635+
1636+
void LLUserWarningMsg::setHandler(const LLUserWarningMsg::Handler &handler)
1637+
{
1638+
sHandler = handler;
1639+
}
1640+
1641+
void LLUserWarningMsg::setOutOfMemoryStrings(const std::string& title, const std::string& message)
1642+
{
1643+
sLocalizedOutOfMemoryTitle = title;
1644+
sLocalizedOutOfMemoryWarning = message;
1645+
}
16041646
}
16051647

16061648
void crashdriver(void (*callback)(int*))

indra/llcommon/llerror.h

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
#include "llpreprocessor.h"
4040

4141
#include <boost/static_assert.hpp>
42+
#include <functional> // std::function
4243

4344
const int LL_ERR_NOERR = 0;
4445

@@ -301,6 +302,28 @@ namespace LLError
301302
{
302303
friend std::ostream& operator<<(std::ostream& out, const LLStacktrace&);
303304
};
305+
306+
// Provides access to OS notification popup on error, since
307+
// not everything has access to OS's messages
308+
class LLUserWarningMsg
309+
{
310+
public:
311+
typedef std::function<void(const std::string&, const std::string&)> Handler;
312+
static void setHandler(const Handler&);
313+
static void setOutOfMemoryStrings(const std::string& title, const std::string& message);
314+
315+
// When viewer encounters bad alloc or can't access files try warning user about reasons
316+
static void showOutOfMemory();
317+
static void showMissingFiles();
318+
// Genering error
319+
static void show(const std::string&);
320+
321+
private:
322+
// needs to be preallocated before viewer runs out of memory
323+
static std::string sLocalizedOutOfMemoryTitle;
324+
static std::string sLocalizedOutOfMemoryWarning;
325+
static Handler sHandler;
326+
};
304327
}
305328

306329
//this is cheaper than llcallstacks if no need to output other variables to call stacks.

indra/llcommon/llexception.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
#include "llerror.h"
3838
#include "llerrorcontrol.h"
3939

40+
4041
// used to attach and extract stacktrace information to/from boost::exception,
4142
// see https://www.boost.org/doc/libs/release/doc/html/stacktrace/getting_started.html#stacktrace.getting_started.exceptions_with_stacktrace
4243
// apparently the struct passed as the first template param needs no definition?

indra/llcommon/llsingleton.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ class LLSingleton : public LLSingletonBase
455455

456456
static DERIVED_TYPE* getInstance()
457457
{
458-
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
458+
//LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD; // TODO -- reenable this when we have a fix for using Tracy with coroutines
459459
// We know the viewer has LLSingleton dependency circularities. If you
460460
// feel strongly motivated to eliminate them, cheers and good luck.
461461
// (At that point we could consider a much simpler locking mechanism.)

0 commit comments

Comments
 (0)