Skip to content

Commit 0cb91ee

Browse files
authored
Merge pull request #3177 from secondlife/brad/develop-merge
ExtraFPS -> develop merge
2 parents 77b715c + 3a4a112 commit 0cb91ee

File tree

76 files changed

+1159
-441
lines changed

Some content is hidden

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

76 files changed

+1159
-441
lines changed

indra/lib/python/indra/util/llmanifest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ def unpacked_finish(self):
637637
'vers':'_'.join(self.args['version'])}
638638
print("Creating unpacked file:", unpacked_file_name)
639639
# could add a gz here but that doubles the time it takes to do this step
640-
tf = tarfile.open(self.src_path_of(unpacked_file_name), 'w:')
640+
tf = tarfile.open(self.build_path_of(unpacked_file_name), 'w:')
641641
# add the entire installation package, at the very top level
642642
tf.add(self.get_dst_prefix(), "")
643643
tf.close()

indra/llcommon/tests/llprocess_test.cpp

Lines changed: 93 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,7 +1086,27 @@ namespace tut
10861086
return false;
10871087
}
10881088

1089-
std::list<LLSD> mHistory;
1089+
template <typename CALLABLE>
1090+
void checkHistory(CALLABLE&& code)
1091+
{
1092+
try
1093+
{
1094+
// we expect this lambda to contain tut::ensure() calls
1095+
std::forward<CALLABLE>(code)(mHistory);
1096+
}
1097+
catch (const failure&)
1098+
{
1099+
LL_INFOS() << "event history:" << LL_ENDL;
1100+
for (const LLSD& item : mHistory)
1101+
{
1102+
LL_INFOS() << item << LL_ENDL;
1103+
}
1104+
throw;
1105+
}
1106+
}
1107+
1108+
using Listory = std::list<LLSD>;
1109+
Listory mHistory;
10901110
LLTempBoundListener mConnection;
10911111
};
10921112

@@ -1137,23 +1157,26 @@ namespace tut
11371157
// finish out the run
11381158
waitfor(*py.mPy);
11391159
// now verify history
1140-
std::list<LLSD>::const_iterator li(listener.mHistory.begin()),
1141-
lend(listener.mHistory.end());
1142-
ensure("no events", li != lend);
1143-
ensure_equals("history[0]", (*li)["data"].asString(), "abc");
1144-
ensure_equals("history[0] len", (*li)["len"].asInteger(), 3);
1145-
++li;
1146-
ensure("only 1 event", li != lend);
1147-
ensure_equals("history[1]", (*li)["data"].asString(), "abcdef");
1148-
ensure_equals("history[0] len", (*li)["len"].asInteger(), 6);
1149-
++li;
1150-
ensure("only 2 events", li != lend);
1151-
ensure_equals("history[2]", (*li)["data"].asString(), "abcdefghi" EOL);
1152-
ensure_equals("history[0] len", (*li)["len"].asInteger(), 9 + sizeof(EOL) - 1);
1153-
++li;
1154-
// We DO NOT expect a whole new event for the second line because we
1155-
// disconnected.
1156-
ensure("more than 3 events", li == lend);
1160+
listener.checkHistory(
1161+
[](const EventListener::Listory& history)
1162+
{
1163+
auto li(history.begin()), lend(history.end());
1164+
ensure("no events", li != lend);
1165+
ensure_equals("history[0]", (*li)["data"].asString(), "abc");
1166+
ensure_equals("history[0] len", (*li)["len"].asInteger(), 3);
1167+
++li;
1168+
ensure("only 1 event", li != lend);
1169+
ensure_equals("history[1]", (*li)["data"].asString(), "abcdef");
1170+
ensure_equals("history[0] len", (*li)["len"].asInteger(), 6);
1171+
++li;
1172+
ensure("only 2 events", li != lend);
1173+
ensure_equals("history[2]", (*li)["data"].asString(), "abcdefghi" EOL);
1174+
ensure_equals("history[0] len", (*li)["len"].asInteger(), 9 + sizeof(EOL) - 1);
1175+
++li;
1176+
// We DO NOT expect a whole new event for the second line because we
1177+
// disconnected.
1178+
ensure("more than 3 events", li == lend);
1179+
});
11571180
}
11581181

11591182
template<> template<>
@@ -1173,14 +1196,17 @@ namespace tut
11731196
// (or any other intervening layer) does crazy buffering. What we want
11741197
// to ensure is that there was exactly ONE event with "eof" true, and
11751198
// that it was the LAST event.
1176-
std::list<LLSD>::const_reverse_iterator rli(listener.mHistory.rbegin()),
1177-
rlend(listener.mHistory.rend());
1178-
ensure("no events", rli != rlend);
1179-
ensure("last event not \"eof\"", (*rli)["eof"].asBoolean());
1180-
while (++rli != rlend)
1181-
{
1182-
ensure("\"eof\" event not last", ! (*rli)["eof"].asBoolean());
1183-
}
1199+
listener.checkHistory(
1200+
[](const EventListener::Listory& history)
1201+
{
1202+
auto rli(history.rbegin()), rlend(history.rend());
1203+
ensure("no events", rli != rlend);
1204+
ensure("last event not \"eof\"", (*rli)["eof"].asBoolean());
1205+
while (++rli != rlend)
1206+
{
1207+
ensure("\"eof\" event not last", ! (*rli)["eof"].asBoolean());
1208+
}
1209+
});
11841210
}
11851211

11861212
template<> template<>
@@ -1203,13 +1229,17 @@ namespace tut
12031229
ensure_equals("getLimit() after setlimit(10)", childout.getLimit(), 10);
12041230
// okay, pump I/O to pick up output from child
12051231
waitfor(*py.mPy);
1206-
ensure("no events", ! listener.mHistory.empty());
1207-
// For all we know, that data could have arrived in several different
1208-
// bursts... probably not, but anyway, only check the last one.
1209-
ensure_equals("event[\"len\"]",
1210-
listener.mHistory.back()["len"].asInteger(), abc.length());
1211-
ensure_equals("length of setLimit(10) data",
1212-
listener.mHistory.back()["data"].asString().length(), 10);
1232+
listener.checkHistory(
1233+
[abc](const EventListener::Listory& history)
1234+
{
1235+
ensure("no events", ! history.empty());
1236+
// For all we know, that data could have arrived in several different
1237+
// bursts... probably not, but anyway, only check the last one.
1238+
ensure_equals("event[\"len\"]",
1239+
history.back()["len"].asInteger(), abc.length());
1240+
ensure_equals("length of setLimit(10) data",
1241+
history.back()["data"].asString().length(), 10);
1242+
});
12131243
}
12141244

12151245
template<> template<>
@@ -1276,18 +1306,22 @@ namespace tut
12761306
params.postend = pumpname;
12771307
LLProcessPtr child = LLProcess::create(params);
12781308
ensure("shouldn't have launched", ! child);
1279-
ensure_equals("number of postend events", listener.mHistory.size(), 1);
1280-
LLSD postend(listener.mHistory.front());
1281-
ensure("has id", ! postend.has("id"));
1282-
ensure_equals("desc", postend["desc"].asString(), std::string(params.desc));
1283-
ensure_equals("state", postend["state"].asInteger(), LLProcess::UNSTARTED);
1284-
ensure("has data", ! postend.has("data"));
1285-
std::string error(postend["string"]);
1286-
// All we get from canned parameter validation is a bool, so the
1287-
// "validation failed" message we ourselves generate can't mention
1288-
// "executable" by name. Just check that it's nonempty.
1289-
//ensure_contains("error", error, "executable");
1290-
ensure("string", ! error.empty());
1309+
listener.checkHistory(
1310+
[&params](const EventListener::Listory& history)
1311+
{
1312+
ensure_equals("number of postend events", history.size(), 1);
1313+
LLSD postend(history.front());
1314+
ensure("has id", ! postend.has("id"));
1315+
ensure_equals("desc", postend["desc"].asString(), std::string(params.desc));
1316+
ensure_equals("state", postend["state"].asInteger(), LLProcess::UNSTARTED);
1317+
ensure("has data", ! postend.has("data"));
1318+
std::string error(postend["string"]);
1319+
// All we get from canned parameter validation is a bool, so the
1320+
// "validation failed" message we ourselves generate can't mention
1321+
// "executable" by name. Just check that it's nonempty.
1322+
//ensure_contains("error", error, "executable");
1323+
ensure("string", ! error.empty());
1324+
});
12911325
}
12921326

12931327
template<> template<>
@@ -1309,16 +1343,20 @@ namespace tut
13091343
{
13101344
yield();
13111345
}
1312-
ensure("no postend event", i < timeout);
1313-
ensure_equals("number of postend events", listener.mHistory.size(), 1);
1314-
LLSD postend(listener.mHistory.front());
1315-
ensure_equals("id", postend["id"].asInteger(), childid);
1316-
ensure("desc empty", ! postend["desc"].asString().empty());
1317-
ensure_equals("state", postend["state"].asInteger(), LLProcess::EXITED);
1318-
ensure_equals("data", postend["data"].asInteger(), 35);
1319-
std::string str(postend["string"]);
1320-
ensure_contains("string", str, "exited");
1321-
ensure_contains("string", str, "35");
1346+
listener.checkHistory(
1347+
[i, timeout, childid](const EventListener::Listory& history)
1348+
{
1349+
ensure("no postend event", i < timeout);
1350+
ensure_equals("number of postend events", history.size(), 1);
1351+
LLSD postend(history.front());
1352+
ensure_equals("id", postend["id"].asInteger(), childid);
1353+
ensure("desc empty", ! postend["desc"].asString().empty());
1354+
ensure_equals("state", postend["state"].asInteger(), LLProcess::EXITED);
1355+
ensure_equals("data", postend["data"].asInteger(), 35);
1356+
std::string str(postend["string"]);
1357+
ensure_contains("string", str, "exited");
1358+
ensure_contains("string", str, "35");
1359+
});
13221360
}
13231361

13241362
struct PostendListener

indra/llinventory/llsettingssky.cpp

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ void LLSettingsSky::blend(LLSettingsBase::ptr_t &end, F64 blendf)
601601

602602
mSettingFlags |= other->mSettingFlags;
603603

604-
mCanAutoAdjust = false; // no point?
604+
mCanAutoAdjust = other->mCanAutoAdjust;
605605

606606
mSunRotation = slerp((F32)blendf, mSunRotation, other->mSunRotation);
607607
mMoonRotation = slerp((F32)blendf, mMoonRotation, other->mMoonRotation);
@@ -1177,6 +1177,11 @@ void LLSettingsSky::loadValuesFromLLSD()
11771177
mReflectionProbeAmbiance = (F32)settings[SETTING_REFLECTION_PROBE_AMBIANCE].asReal();
11781178
}
11791179

1180+
mHDRMax = 2.0f;
1181+
mHDRMin = 0.5f;
1182+
mHDROffset = 1.0f;
1183+
mTonemapMix = 1.0f;
1184+
11801185
mSunTextureId = settings[SETTING_SUN_TEXTUREID].asUUID();
11811186
mMoonTextureId = settings[SETTING_MOON_TEXTUREID].asUUID();
11821187
mCloudTextureId = settings[SETTING_CLOUD_TEXTUREID].asUUID();
@@ -2027,6 +2032,38 @@ F32 LLSettingsSky::getGamma() const
20272032
return mGamma;
20282033
}
20292034

2035+
F32 LLSettingsSky::getHDRMin() const
2036+
{
2037+
if (mCanAutoAdjust)
2038+
return 0.f;
2039+
2040+
return mHDRMin;
2041+
}
2042+
2043+
F32 LLSettingsSky::getHDRMax() const
2044+
{
2045+
if (mCanAutoAdjust)
2046+
return 0.f;
2047+
2048+
return mHDRMax;
2049+
}
2050+
2051+
F32 LLSettingsSky::getHDROffset() const
2052+
{
2053+
if (mCanAutoAdjust)
2054+
return 1.0f;
2055+
2056+
return mHDROffset;
2057+
}
2058+
2059+
F32 LLSettingsSky::getTonemapMix() const
2060+
{
2061+
if (mCanAutoAdjust)
2062+
return 0.0f;
2063+
2064+
return mTonemapMix;
2065+
}
2066+
20302067
void LLSettingsSky::setGamma(F32 val)
20312068
{
20322069
mGamma = val;

indra/llinventory/llsettingssky.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,11 @@ class LLSettingsSky: public LLSettingsBase
209209

210210
F32 getGamma() const;
211211

212+
F32 getHDRMin() const;
213+
F32 getHDRMax() const;
214+
F32 getHDROffset() const;
215+
F32 getTonemapMix() const;
216+
212217
void setGamma(F32 val);
213218

214219
LLColor3 getGlow() const;
@@ -380,6 +385,10 @@ class LLSettingsSky: public LLSettingsBase
380385
F32 mCloudVariance;
381386
F32 mCloudShadow;
382387
F32 mCloudScale;
388+
F32 mTonemapMix;
389+
F32 mHDROffset;
390+
F32 mHDRMax;
391+
F32 mHDRMin;
383392
LLVector2 mScrollRate;
384393
LLColor3 mCloudPosDensity1;
385394
LLColor3 mCloudPosDensity2;

0 commit comments

Comments
 (0)