summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/featuretable_mac.txt26
-rw-r--r--indra/newview/llappviewer.cpp7
-rw-r--r--indra/newview/llfloaterpreferencesgraphicsadvanced.cpp21
-rw-r--r--indra/newview/llfloaterregioninfo.cpp10
-rw-r--r--indra/newview/llfloaterregioninfo.h4
-rw-r--r--indra/newview/llpanelenvironment.cpp14
-rw-r--r--indra/newview/llreflectionmapmanager.cpp8
-rw-r--r--indra/newview/llselectmgr.cpp10
-rw-r--r--indra/newview/lltooldraganddrop.cpp5
-rw-r--r--indra/newview/llviewercontrol.cpp18
-rw-r--r--indra/newview/llviewershadermgr.cpp59
-rw-r--r--indra/newview/llviewerwindow.cpp13
-rw-r--r--indra/newview/pipeline.cpp9
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml32
14 files changed, 157 insertions, 79 deletions
diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt
index 9a3bdf5c5f..cfc1ea8f42 100644
--- a/indra/newview/featuretable_mac.txt
+++ b/indra/newview/featuretable_mac.txt
@@ -1,4 +1,4 @@
-version 68
+version 71
// The version number above should be incremented IF AND ONLY IF some
// change has been made that is sufficiently important to justify
// resetting the graphics preferences of all users to the recommended
@@ -67,9 +67,9 @@ RenderFSAAType 1 2
RenderFSAASamples 1 3
RenderMaxTextureIndex 1 16
RenderGLContextCoreProfile 1 1
-RenderGLMultiThreadedTextures 1 0
-RenderGLMultiThreadedMedia 1 0
-RenderAppleUseMultGL 1 0
+RenderGLMultiThreadedTextures 1 1
+RenderGLMultiThreadedMedia 1 1
+RenderAppleUseMultGL 1 1
RenderReflectionsEnabled 1 1
RenderReflectionProbeDetail 1 2
RenderScreenSpaceReflections 1 1
@@ -111,7 +111,7 @@ RenderShadowDetail 1 0
WLSkyDetail 1 96
RenderFSAAType 1 0
RenderFSAASamples 1 0
-RenderReflectionsEnabled 1 1
+RenderReflectionsEnabled 1 0
RenderReflectionProbeDetail 1 0
RenderScreenSpaceReflections 1 0
RenderReflectionProbeLevel 1 0
@@ -406,20 +406,30 @@ list TexUnit16orLess
RenderTerrainPBRDetail 1 -1
list AMD
-RenderDeferredSSAO 1 0
+UseOcclusion 1 0
+RenderGLMultiThreadedTextures 1 0
+
+list NVIDIA
+RenderGLMultiThreadedTextures 1 0
+RenderGLMultiThreadedMedia 1 0
+RenderAppleUseMultGL 1 0
list Intel
RenderAnisotropic 1 0
RenderFSAASamples 1 0
+RenderGLMultiThreadedTextures 1 0
+RenderGLMultiThreadedMedia 1 0
+RenderAppleUseMultGL 1 0
// AppleGPU and NonAppleGPU can be thought of as Apple silicon vs Intel Mac
list AppleGPU
RenderGLMultiThreadedMedia 1 0
RenderAppleUseMultGL 1 0
+RenderGLMultiThreadedTextures 1 0
+RenderGLMultiThreadedMedia 1 0
list NonAppleGPU
-RenderGLMultiThreadedMedia 1 0
-RenderAppleUseMultGL 1 0
+RenderDeferredSSAO 1 0
list GL3
RenderFSAASamples 0 0
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 4686f81b88..7c040a3ca1 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -2214,7 +2214,12 @@ bool LLAppViewer::initThreads()
// get the number of concurrent threads that can run
S32 cores = std::thread::hardware_concurrency();
-
+#if LL_DARWIN
+ if (!gGLManager.mIsApple)
+ {
+ cores /= 2;
+ }
+#endif
U32 max_cores = gSavedSettings.getU32("EmulateCoreCount");
if (max_cores != 0)
{
diff --git a/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp b/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp
index 51bb255f6e..5e53e00e0a 100644
--- a/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp
+++ b/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp
@@ -63,17 +63,24 @@ LLFloaterPreferenceGraphicsAdvanced::~LLFloaterPreferenceGraphicsAdvanced()
bool LLFloaterPreferenceGraphicsAdvanced::postBuild()
{
- // Don't do this on Mac as their braindead GL versioning
- // sets this when 8x and 16x are indeed available
+ // Disable FSAA combo when shaders are not loaded
//
-#if !LL_DARWIN
- if (gGLManager.mIsIntel || gGLManager.mGLVersion < 3.f)
- { //remove FSAA settings above "4x"
+ {
LLComboBox* combo = getChild<LLComboBox>("fsaa");
- combo->remove("8x");
- combo->remove("16x");
+ if (!gFXAAProgram[0].isComplete())
+ combo->remove("FXAA");
+
+ if (!gSMAAEdgeDetectProgram[0].isComplete())
+ combo->remove("SMAA");
+
+ if (!gFXAAProgram[0].isComplete() && !gSMAAEdgeDetectProgram[0].isComplete())
+ {
+ combo->setEnabled(false);
+ getChild<LLComboBox>("fsaa quality")->setEnabled(false);
+ }
}
+#if !LL_DARWIN
LLCheckBoxCtrl *use_HiDPI = getChild<LLCheckBoxCtrl>("use HiDPI");
use_HiDPI->setVisible(false);
#endif
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index 219a9ca520..6bbd27478c 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -2100,8 +2100,14 @@ LLPanelEstateInfo::LLPanelEstateInfo()
mEstateID(0) // invalid
{
LLEstateInfoModel& estate_info = LLEstateInfoModel::instance();
- estate_info.setCommitCallback(boost::bind(&LLPanelEstateInfo::refreshFromEstate, this));
- estate_info.setUpdateCallback(boost::bind(&LLPanelEstateInfo::refreshFromEstate, this));
+ mEstateInfoCommitConnection = estate_info.setCommitCallback(boost::bind(&LLPanelEstateInfo::refreshFromEstate, this));
+ mEstateInfoUpdateConnection = estate_info.setUpdateCallback(boost::bind(&LLPanelEstateInfo::refreshFromEstate, this));
+}
+
+LLPanelEstateInfo::~LLPanelEstateInfo()
+{
+ mEstateInfoCommitConnection.disconnect();
+ mEstateInfoUpdateConnection.disconnect();
}
// static
diff --git a/indra/newview/llfloaterregioninfo.h b/indra/newview/llfloaterregioninfo.h
index 65c1291728..201d8b0a68 100644
--- a/indra/newview/llfloaterregioninfo.h
+++ b/indra/newview/llfloaterregioninfo.h
@@ -320,7 +320,7 @@ public:
bool onMessageCommit(const LLSD& notification, const LLSD& response);
LLPanelEstateInfo();
- ~LLPanelEstateInfo() {}
+ ~LLPanelEstateInfo();
void updateControls(LLViewerRegion* region);
@@ -352,6 +352,8 @@ protected:
bool checkSunHourSlider(LLUICtrl* child_ctrl);
U32 mEstateID;
+ boost::signals2::connection mEstateInfoCommitConnection;
+ boost::signals2::connection mEstateInfoUpdateConnection;
};
/////////////////////////////////////////////////////////////////////////////
diff --git a/indra/newview/llpanelenvironment.cpp b/indra/newview/llpanelenvironment.cpp
index d3df88b65e..831ad7827a 100644
--- a/indra/newview/llpanelenvironment.cpp
+++ b/indra/newview/llpanelenvironment.cpp
@@ -359,12 +359,14 @@ void LLPanelEnvironmentInfo::refresh()
void LLPanelEnvironmentInfo::refreshFromEstate()
{
- LLViewerRegion *pRegion = gAgent.getRegion();
-
- bool oldAO = mAllowOverride;
- mAllowOverride = (isRegion() && LLEstateInfoModel::instance().getAllowEnvironmentOverride()) || pRegion->getAllowEnvironmentOverride();
- if (oldAO != mAllowOverride)
- refresh();
+ LLViewerRegion* pRegion = gAgent.getRegion();
+ if (pRegion)
+ {
+ bool oldAO = mAllowOverride;
+ mAllowOverride = (isRegion() && LLEstateInfoModel::instance().getAllowEnvironmentOverride()) || pRegion->getAllowEnvironmentOverride();
+ if (oldAO != mAllowOverride)
+ refresh();
+ }
}
std::string LLPanelEnvironmentInfo::getNameForTrackIndex(U32 index)
diff --git a/indra/newview/llreflectionmapmanager.cpp b/indra/newview/llreflectionmapmanager.cpp
index d66c131a09..69ade8d796 100644
--- a/indra/newview/llreflectionmapmanager.cpp
+++ b/indra/newview/llreflectionmapmanager.cpp
@@ -404,6 +404,13 @@ void LLReflectionMapManager::update()
{
closestDynamic = probe;
}
+
+ if (sLevel == 0)
+ {
+ // only update default probe when coverage is set to none
+ llassert(probe == mDefaultProbe);
+ break;
+ }
}
if (realtime && closestDynamic != nullptr)
@@ -713,6 +720,7 @@ void LLReflectionMapManager::updateProbeFace(LLReflectionMap* probe, U32 face)
}
else
{
+ llassert(gSavedSettings.getS32("RenderReflectionProbeLevel") > 0); // should never update a probe that's not the default probe if reflection coverage is none
probe->update(mRenderTarget.getWidth(), face);
}
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index 796cc8bb5e..03cf79c28c 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -2251,11 +2251,15 @@ void LLSelectMgr::selectionRevertGLTFMaterials()
// Update material locally
objectp->setRenderMaterialID(te, asset_id, false /*wait for LLGLTFMaterialList update*/);
- LLGLTFMaterial* material = new LLGLTFMaterial(*nodep->mSavedGLTFOverrideMaterials[te]);
- objectp->setTEGLTFMaterialOverride(te, material);
+ LLGLTFMaterial* material = nodep->mSavedGLTFOverrideMaterials[te];
+ if (material)
+ {
+ material = new LLGLTFMaterial(*material);
+ objectp->setTEGLTFMaterialOverride(te, material);
+ }
// Enqueue update to server
- if (asset_id.notNull())
+ if (asset_id.notNull() && material)
{
// Restore overrides and base material
LLGLTFMaterialList::queueApply(objectp, te, asset_id, material);
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index 6be7ec2262..4efa289141 100644
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -1447,9 +1447,10 @@ void LLToolDragAndDrop::dropTexture(LLViewerObject* hit_obj,
}
LLTextureEntry* te = hit_obj->getTE(hit_face);
- if (te && !remove_pbr)
+ LLGLTFMaterial * override_mat = nullptr;
+ if (te && !remove_pbr && (override_mat = te->getGLTFMaterialOverride()))
{
- LLGLTFMaterial* copy = new LLGLTFMaterial(*te->getGLTFMaterialOverride());
+ LLGLTFMaterial* copy = new LLGLTFMaterial(*override_mat);
nodep->mSavedGLTFOverrideMaterials[hit_face] = copy;
}
else
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index 172ffcb0d4..18746e76fc 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -77,6 +77,10 @@
#include "llstartup.h"
#include "llperfstats.h"
+#if LL_DARWIN
+#include "llwindowmacosx.h"
+#endif
+
// Third party library includes
#include <boost/algorithm/string.hpp>
@@ -453,6 +457,17 @@ static bool handleReflectionProbeDetailChanged(const LLSD& newvalue)
return true;
}
+#if LL_DARWIN
+static bool handleAppleUseMultGLChanged(const LLSD& newvalue)
+{
+ if (gGLManager.mInited)
+ {
+ LLWindowMacOSX::setUseMultGL(newvalue.asBoolean());
+ }
+ return true;
+}
+#endif
+
static bool handleHeroProbeResolutionChanged(const LLSD &newvalue)
{
if (gPipeline.isInit())
@@ -820,6 +835,9 @@ void settings_setup_listeners()
setting_setup_signal_listener(gSavedSettings, "RenderReflectionProbeLevel", handleReflectionProbeDetailChanged);
setting_setup_signal_listener(gSavedSettings, "RenderReflectionProbeDetail", handleReflectionProbeDetailChanged);
setting_setup_signal_listener(gSavedSettings, "RenderReflectionsEnabled", handleReflectionProbeDetailChanged);
+#if LL_DARWIN
+ setting_setup_signal_listener(gSavedSettings, "RenderAppleUseMultGL", handleAppleUseMultGLChanged);
+#endif
setting_setup_signal_listener(gSavedSettings, "RenderScreenSpaceReflections", handleReflectionProbeDetailChanged);
setting_setup_signal_listener(gSavedSettings, "RenderMirrors", handleReflectionProbeDetailChanged);
setting_setup_signal_listener(gSavedSettings, "RenderHeroProbeResolution", handleHeroProbeResolutionChanged);
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 7ce9c02e8d..5b4648a0bf 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -2512,6 +2512,7 @@ bool LLViewerShaderMgr::loadShadersDeferred()
{"28", "High"},
{"39", "Ultra"} };
int i = 0;
+ bool failed = false;
for (const auto& quality_pair : quality_levels)
{
if (success)
@@ -2535,10 +2536,26 @@ bool LLViewerShaderMgr::loadShadersDeferred()
gFXAAProgram[i].mShaderLevel = mShaderLevel[SHADER_DEFERRED];
success = gFXAAProgram[i].createShader();
- llassert(success);
+ // llassert(success);
+ if (!success)
+ {
+ LL_WARNS() << "Failed to create shader '" << gFXAAProgram[i].mName << "', disabling!" << LL_ENDL;
+ // continue as if this shader never happened
+ failed = true;
+ success = true;
+ break;
+ }
}
++i;
}
+
+ if (failed)
+ {
+ for (auto i = 0; i < 4; ++i)
+ {
+ gFXAAProgram[i].unload();
+ }
+ }
}
if (gGLManager.mGLVersion > 3.15f && success)
@@ -2546,8 +2563,9 @@ bool LLViewerShaderMgr::loadShadersDeferred()
std::vector<std::pair<std::string, std::string>> quality_levels = { {"SMAA_PRESET_LOW", "Low"},
{"SMAA_PRESET_MEDIUM", "Medium"},
{"SMAA_PRESET_HIGH", "High"},
- {"SMAA_PRESET_ULTRA", "Ultra"} };
+ {"SMAA_PRESET_ULTRA", "Ultra"} };
int i = 0;
+ bool failed = false;
for (const auto& smaa_pair : quality_levels)
{
std::map<std::string, std::string> defines;
@@ -2576,6 +2594,15 @@ bool LLViewerShaderMgr::loadShadersDeferred()
gSMAAEdgeDetectProgram[i].mShaderFiles.push_back(make_pair("deferred/SMAA.glsl", GL_VERTEX_SHADER_ARB));
gSMAAEdgeDetectProgram[i].mShaderLevel = mShaderLevel[SHADER_DEFERRED];
success = gSMAAEdgeDetectProgram[i].createShader();
+ // llassert(success);
+ if (!success)
+ {
+ LL_WARNS() << "Failed to create shader '" << gSMAAEdgeDetectProgram[i].mName << "', disabling!" << LL_ENDL;
+ // continue as if this shader never happened
+ failed = true;
+ success = true;
+ break;
+ }
}
if (success)
@@ -2593,6 +2620,15 @@ bool LLViewerShaderMgr::loadShadersDeferred()
gSMAABlendWeightsProgram[i].mShaderFiles.push_back(make_pair("deferred/SMAA.glsl", GL_VERTEX_SHADER_ARB));
gSMAABlendWeightsProgram[i].mShaderLevel = mShaderLevel[SHADER_DEFERRED];
success = gSMAABlendWeightsProgram[i].createShader();
+ // llassert(success);
+ if (!success)
+ {
+ LL_WARNS() << "Failed to create shader '" << gSMAABlendWeightsProgram[i].mName << "', disabling!" << LL_ENDL;
+ // continue as if this shader never happened
+ failed = true;
+ success = true;
+ break;
+ }
}
if (success)
@@ -2610,9 +2646,28 @@ bool LLViewerShaderMgr::loadShadersDeferred()
gSMAANeighborhoodBlendProgram[i].mShaderFiles.push_back(make_pair("deferred/SMAA.glsl", GL_VERTEX_SHADER_ARB));
gSMAANeighborhoodBlendProgram[i].mShaderLevel = mShaderLevel[SHADER_DEFERRED];
success = gSMAANeighborhoodBlendProgram[i].createShader();
+ // llassert(success);
+ if (!success)
+ {
+ LL_WARNS() << "Failed to create shader '" << gSMAANeighborhoodBlendProgram[i].mName << "', disabling!" << LL_ENDL;
+ // continue as if this shader never happened
+ failed = true;
+ success = true;
+ break;
+ }
}
++i;
}
+
+ if (failed)
+ {
+ for (auto i = 0; i < 4; ++i)
+ {
+ gSMAAEdgeDetectProgram[i].unload();
+ gSMAABlendWeightsProgram[i].unload();
+ gSMAANeighborhoodBlendProgram[i].unload();
+ }
+ }
}
if (success && gGLManager.mGLVersion > 4.05f)
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 2a21eeeb53..d399cc6469 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -5393,6 +5393,8 @@ bool LLViewerWindow::cubeSnapshot(const LLVector3& origin, LLCubeMapArray* cubea
camera->setUserClipPlane(clipPlane);
}
+ gPipeline.pushRenderTypeMask();
+
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT); // stencil buffer is deprecated | GL_STENCIL_BUFFER_BIT);
U32 dynamic_render_types[] = {
@@ -5481,16 +5483,7 @@ bool LLViewerWindow::cubeSnapshot(const LLVector3& origin, LLCubeMapArray* cubea
}
}
- if (!dynamic_render)
- {
- for (int i = 0; i < dynamic_render_type_count; ++i)
- {
- if (prev_dynamic_render_type[i])
- {
- gPipeline.toggleRenderType(dynamic_render_types[i]);
- }
- }
- }
+ gPipeline.popRenderTypeMask();
if (hide_hud)
{
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 93bfc25ae2..3240e2a663 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -7438,8 +7438,7 @@ void LLPipeline::applyFXAA(LLRenderTarget* src, LLRenderTarget* dst)
{
{
llassert(!gCubeSnapshot);
- bool multisample = RenderFSAAType == 1 && mFXAAMap.isComplete();
- LLGLSLShader* shader = &gGlowCombineProgram;
+ bool multisample = RenderFSAAType == 1 && gFXAAProgram[0].isComplete() && mFXAAMap.isComplete();
// Present everything.
if (multisample)
@@ -7452,7 +7451,7 @@ void LLPipeline::applyFXAA(LLRenderTarget* src, LLRenderTarget* dst)
mFXAAMap.bindTarget();
mFXAAMap.clear(GL_COLOR_BUFFER_BIT);
- shader = &gGlowCombineFXAAProgram;
+ LLGLSLShader* shader = &gGlowCombineFXAAProgram;
shader->bind();
S32 channel = shader->enableTexture(LLShaderMgr::DEFERRED_DIFFUSE, src->getUsage());
@@ -7523,7 +7522,7 @@ void LLPipeline::applyFXAA(LLRenderTarget* src, LLRenderTarget* dst)
void LLPipeline::generateSMAABuffers(LLRenderTarget* src)
{
llassert(!gCubeSnapshot);
- bool multisample = RenderFSAAType == 2 && mFXAAMap.isComplete() && mSMAABlendBuffer.isComplete();
+ bool multisample = RenderFSAAType == 2 && gSMAAEdgeDetectProgram[0].isComplete() && mFXAAMap.isComplete() && mSMAABlendBuffer.isComplete();
// Present everything.
if (multisample)
@@ -7641,7 +7640,7 @@ void LLPipeline::generateSMAABuffers(LLRenderTarget* src)
void LLPipeline::applySMAA(LLRenderTarget* src, LLRenderTarget* dst)
{
llassert(!gCubeSnapshot);
- bool multisample = RenderFSAAType == 2 && mFXAAMap.isComplete() && mSMAABlendBuffer.isComplete();
+ bool multisample = RenderFSAAType == 2 && gSMAAEdgeDetectProgram[0].isComplete() && mFXAAMap.isComplete() && mSMAABlendBuffer.isComplete();
// Present everything.
if (multisample)
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 355b5964ed..b035360206 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -12580,37 +12580,6 @@ are wearing now.
name="okbutton"
yestext="OK"/>
</notification>
-
- <notification
- icon="notify.tga"
- name="TextureDiscardBackgrounded"
- type="notify">
- <unique>
- <context>DELAY</context>
- </unique>
- To improve system performance, [SECOND_LIFE] has reduced texture memory usage after being in the background for [DELAY] seconds. It may take some time for texture image quality to return to normal.
- <usetemplate
- ignoretext="Ask me about background texture memory usage and recovery"
- name="okcancelignore"
- yestext="OK"
- notext="Disable"/>
- </notification>
-
- <notification
- icon="notify.tga"
- name="TextureDiscardMinimized"
- type="notify">
- <unique>
- <context>DELAY</context>
- </unique>
- To improve system performance, [SECOND_LIFE] has reduced texture memory usage after being minimized for [DELAY] seconds. It may take some time for texture image quality to return to normal.
- <usetemplate
- ignoretext="Ask me about minimized texture memory usage and recovery"
- name="okcancelignore"
- yestext="OK"
- notext="Disable"/>
- </notification>
-
<notification
icon="alertmodal.tga"
name="MissingFavoriteFolder"
@@ -12623,5 +12592,4 @@ Select the "use as favorite folder" from a folder's menu to set it as the favori
name="okbutton"
yestext="OK"/>
</notification>
-
</notifications>