summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfloaterpreference.cpp35
-rw-r--r--indra/newview/llviewershadermgr.cpp3
-rw-r--r--indra/newview/pipeline.cpp9
3 files changed, 40 insertions, 7 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 00292eecb4..de92b953fb 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -862,18 +862,22 @@ void LLFloaterPreference::refreshEnabledState()
//Deferred/SSAO/Shadows
LLCheckBoxCtrl* ctrl_deferred = getChild<LLCheckBoxCtrl>("UseLightShaders");
if (LLFeatureManager::getInstance()->isFeatureAvailable("RenderUseFBO") &&
+ LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") &&
shaders)
{
- BOOL enabled = ctrl_wind_light->get() ? TRUE : FALSE;
+ BOOL enabled = (ctrl_wind_light->get()) ? TRUE : FALSE;
ctrl_deferred->setEnabled(enabled);
LLCheckBoxCtrl* ctrl_ssao = getChild<LLCheckBoxCtrl>("UseSSAO");
LLComboBox* ctrl_shadow = getChild<LLComboBox>("ShadowDetail");
- enabled = enabled && (ctrl_deferred->get() ? TRUE : FALSE);
+ enabled = enabled && LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferredSSAO") && (ctrl_deferred->get() ? TRUE : FALSE);
ctrl_ssao->setEnabled(enabled);
+
+ enabled = enabled && LLFeatureManager::getInstance()->isFeatureAvailable("RenderShadowDetail");
+
ctrl_shadow->setEnabled(enabled);
}
@@ -940,7 +944,34 @@ void LLFloaterPreference::disableUnavailableSettings()
ctrl_deferred->setEnabled(FALSE);
ctrl_deferred->setValue(FALSE);
}
+
+ // disabled deferred
+ if(!LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred"))
+ {
+ ctrl_shadows->setEnabled(FALSE);
+ ctrl_shadows->setValue(0);
+
+ ctrl_ssao->setEnabled(FALSE);
+ ctrl_ssao->setValue(FALSE);
+
+ ctrl_deferred->setEnabled(FALSE);
+ ctrl_deferred->setValue(FALSE);
+ }
+
+ // disabled deferred SSAO
+ if(!LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferredSSAO"))
+ {
+ ctrl_ssao->setEnabled(FALSE);
+ ctrl_ssao->setValue(FALSE);
+ }
+ // disabled deferred shadows
+ if(!LLFeatureManager::getInstance()->isFeatureAvailable("RenderShadowDetail"))
+ {
+ ctrl_shadows->setEnabled(FALSE);
+ ctrl_shadows->setValue(0);
+ }
+
// disabled reflections
if(!LLFeatureManager::getInstance()->isFeatureAvailable("RenderReflectionDetail"))
{
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index e64fdfc0b4..49eeffe228 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -391,7 +391,8 @@ void LLViewerShaderMgr::setShaders()
S32 water_class = 2;
S32 deferred_class = 0;
- if (gSavedSettings.getBOOL("RenderDeferred"))
+ if (LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") &&
+ gSavedSettings.getBOOL("RenderDeferred"))
{
if (gSavedSettings.getS32("RenderShadowDetail") > 0)
{
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 6abe1041f7..2e2b2c02c3 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -633,10 +633,11 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
void LLPipeline::updateRenderDeferred()
{
BOOL deferred = (gSavedSettings.getBOOL("RenderDeferred") &&
- LLRenderTarget::sUseFBO &&
- gSavedSettings.getBOOL("VertexShaderEnable") &&
- gSavedSettings.getBOOL("RenderAvatarVP") &&
- gSavedSettings.getBOOL("WindLightUseAtmosShaders")) ? TRUE : FALSE;
+ LLRenderTarget::sUseFBO &&
+ LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") &&
+ gSavedSettings.getBOOL("VertexShaderEnable") &&
+ gSavedSettings.getBOOL("RenderAvatarVP") &&
+ gSavedSettings.getBOOL("WindLightUseAtmosShaders")) ? TRUE : FALSE;
sRenderDeferred = deferred;
}