summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerregion.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerregion.cpp')
-rwxr-xr-xindra/newview/llviewerregion.cpp52
1 files changed, 35 insertions, 17 deletions
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 052c222d9a..d315183ad0 100755
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -81,7 +81,6 @@
#include "llcoros.h"
#include "lleventcoro.h"
#include "llcorehttputil.h"
-#include "llcallstack.h"
#include "llsettingsdaycycle.h"
#include <boost/regex.hpp>
@@ -1269,8 +1268,12 @@ U32 LLViewerRegion::getNumOfVisibleGroups() const
return mImpl ? static_cast<U32>(mImpl->mVisibleGroups.size()) : 0;
}
-void LLViewerRegion::updateReflectionProbes()
+void LLViewerRegion::updateReflectionProbes(bool full_update)
{
+ if (!full_update && mReflectionMaps.empty())
+ {
+ return;
+ }
LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY;
const F32 probe_spacing = 32.f;
const F32 probe_radius = sqrtf((probe_spacing * 0.5f) * (probe_spacing * 0.5f) * 3.f);
@@ -1278,7 +1281,7 @@ void LLViewerRegion::updateReflectionProbes()
F32 start = probe_spacing * 0.5f;
- U32 grid_width = REGION_WIDTH_METERS / probe_spacing;
+ U32 grid_width = (U32)(REGION_WIDTH_METERS / probe_spacing);
mReflectionMaps.resize(grid_width * grid_width);
@@ -2485,7 +2488,16 @@ void LLViewerRegion::setSimulatorFeatures(const LLSD& sim_features)
if (features.has("GLTFEnabled"))
{
bool enabled = features["GLTFEnabled"];
- gSavedSettings.setBOOL("GLTFEnabled", enabled);
+
+ // call setShaders the first time GLTFEnabled is received as true (causes GLTF specific shaders to be loaded)
+ if (enabled != gSavedSettings.getBOOL("GLTFEnabled"))
+ {
+ gSavedSettings.setBOOL("GLTFEnabled", enabled);
+ if (enabled)
+ {
+ LLViewerShaderMgr::instance()->setShaders();
+ }
+ }
}
else
{
@@ -2712,7 +2724,6 @@ LLViewerRegion::eCacheUpdateResult LLViewerRegion::cacheFullUpdate(LLDataPackerB
if (entry->getCRC() == crc)
{
LL_DEBUGS("AnimatedObjects") << " got dupe for local_id " << local_id << LL_ENDL;
- dumpStack("AnimatedObjectsStack");
// Record a hit
entry->recordDupe();
@@ -2721,7 +2732,6 @@ LLViewerRegion::eCacheUpdateResult LLViewerRegion::cacheFullUpdate(LLDataPackerB
else //CRC changed
{
LL_DEBUGS("AnimatedObjects") << " got update for local_id " << local_id << LL_ENDL;
- dumpStack("AnimatedObjectsStack");
// Update the cache entry
entry->updateEntry(crc, dp);
@@ -2734,7 +2744,6 @@ LLViewerRegion::eCacheUpdateResult LLViewerRegion::cacheFullUpdate(LLDataPackerB
else
{
LL_DEBUGS("AnimatedObjects") << " got first notification for local_id " << local_id << LL_ENDL;
- dumpStack("AnimatedObjectsStack");
// we haven't seen this object before
// Create new entry and add to map
@@ -3143,16 +3152,24 @@ void LLViewerRegion::unpackRegionHandshake()
compp->setParamsReady();
}
- LLPBRTerrainFeatures::queueQuery(*this, [](LLUUID region_id, bool success, const LLModifyRegion& composition_changes)
+ std::string cap = getCapability("ModifyRegion"); // needed for queueQuery
+ if (cap.empty())
+ {
+ LLFloaterRegionInfo::sRefreshFromRegion(this);
+ }
+ else
{
- if (!success) { return; }
- LLViewerRegion* region = LLWorld::getInstance()->getRegionFromID(region_id);
- if (!region) { return; }
- LLVLComposition* compp = region->getComposition();
- if (!compp) { return; }
- compp->apply(composition_changes);
- LLFloaterRegionInfo::sRefreshFromRegion(region);
- });
+ LLPBRTerrainFeatures::queueQuery(*this, [](LLUUID region_id, bool success, const LLModifyRegion& composition_changes)
+ {
+ if (!success) { return; }
+ LLViewerRegion* region = LLWorld::getInstance()->getRegionFromID(region_id);
+ if (!region) { return; }
+ LLVLComposition* compp = region->getComposition();
+ if (!compp) { return; }
+ compp->apply(composition_changes);
+ LLFloaterRegionInfo::sRefreshFromRegion(region);
+ });
+ }
}
@@ -3265,6 +3282,7 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames)
capabilityNames.append("VoiceSignalingRequest");
capabilityNames.append("ReadOfflineMsgs"); // Requires to respond reliably: AcceptFriendship, AcceptGroupInvite, DeclineFriendship, DeclineGroupInvite
capabilityNames.append("RegionObjects");
+ capabilityNames.append("RegionSchedule");
capabilityNames.append("RemoteParcelRequest");
capabilityNames.append("RenderMaterials");
capabilityNames.append("RequestTextureDownload");
@@ -3736,7 +3754,7 @@ void LLViewerRegion::resetMaterialsCapThrottle()
if ( mSimulatorFeatures.has("RenderMaterialsCapability")
&& mSimulatorFeatures["RenderMaterialsCapability"].isReal() )
{
- requests_per_sec = mSimulatorFeatures["RenderMaterialsCapability"].asReal();
+ requests_per_sec = (F32)mSimulatorFeatures["RenderMaterialsCapability"].asReal();
if ( requests_per_sec == 0.0f )
{
requests_per_sec = 1.0f;