summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorDave Houlton <euclid@lindenlab.com>2020-01-24 17:26:20 -0700
committerDave Houlton <euclid@lindenlab.com>2020-01-29 10:18:51 -0700
commit18cdf4d2693c0b859a5378e251b1368975f62395 (patch)
tree51c652ff8233c74954874eafaac6a8524cebf724 /indra
parent195f69f603613c3270050169c6a42f84307f8163 (diff)
SL-12594, remove Basic Shader checks
Remove checks for Vertex Shader capability and UI selection of no Basic Shaders.
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfloaterpreference.cpp113
-rw-r--r--indra/newview/llfloaterpreference.h8
-rw-r--r--indra/newview/pipeline.cpp3
3 files changed, 33 insertions, 91 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 5cfdc466ef..8165207dd0 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -407,7 +407,7 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
mCommitCallbackRegistrar.add("Pref.HardwareDefaults", boost::bind(&LLFloaterPreference::setHardwareDefaults, this));
mCommitCallbackRegistrar.add("Pref.AvatarImpostorsEnable", boost::bind(&LLFloaterPreference::onAvatarImpostorsEnable, this));
mCommitCallbackRegistrar.add("Pref.UpdateIndirectMaxComplexity", boost::bind(&LLFloaterPreference::updateMaxComplexity, this));
- mCommitCallbackRegistrar.add("Pref.VertexShaderEnable", boost::bind(&LLFloaterPreference::onVertexShaderEnable, this));
+ mCommitCallbackRegistrar.add("Pref.VertexShaderEnable", boost::bind(&LLFloaterPreference::onRenderOptionEnable, this));
mCommitCallbackRegistrar.add("Pref.WindowedMod", boost::bind(&LLFloaterPreference::onCommitWindowedMode, this));
mCommitCallbackRegistrar.add("Pref.UpdateSliderText", boost::bind(&LLFloaterPreference::refreshUI,this));
mCommitCallbackRegistrar.add("Pref.QualityPerformance", boost::bind(&LLFloaterPreference::onChangeQuality, this, _2));
@@ -866,12 +866,12 @@ void LLFloaterPreference::onOpen(const LLSD& key)
}
}
-void LLFloaterPreference::onVertexShaderEnable()
+void LLFloaterPreference::onRenderOptionEnable()
{
refreshEnabledGraphics();
}
-void LLFloaterPreferenceGraphicsAdvanced::onVertexShaderEnable()
+void LLFloaterPreferenceGraphicsAdvanced::onRenderOptionEnable()
{
LLFloaterPreference* instance = LLFloaterReg::findTypedInstance<LLFloaterPreference>("preferences");
if (instance)
@@ -1305,20 +1305,19 @@ void LLFloaterPreference::refreshEnabledState()
LLCheckBoxCtrl* ctrl_deferred = getChild<LLCheckBoxCtrl>("UseLightShaders");
// if vertex shaders off, disable all shader related products
- if (!LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable") ||
- !LLFeatureManager::getInstance()->isFeatureAvailable("WindLightUseAtmosShaders"))
+ if (!LLFeatureManager::getInstance()->isFeatureAvailable("WindLightUseAtmosShaders"))
{
ctrl_wind_light->setEnabled(FALSE);
ctrl_wind_light->setValue(FALSE);
}
else
{
- ctrl_wind_light->setEnabled(gSavedSettings.getBOOL("VertexShaderEnable"));
+ ctrl_wind_light->setEnabled(TRUE);
}
//Deferred/SSAO/Shadows
BOOL bumpshiny = gGLManager.mHasCubeMap && LLCubeMap::sUseCubeMaps && LLFeatureManager::getInstance()->isFeatureAvailable("RenderObjectBump") && gSavedSettings.getBOOL("RenderObjectBump");
- BOOL shaders = gSavedSettings.getBOOL("WindLightUseAtmosShaders") && gSavedSettings.getBOOL("VertexShaderEnable");
+ BOOL shaders = gSavedSettings.getBOOL("WindLightUseAtmosShaders");
BOOL enabled = LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") &&
bumpshiny &&
shaders &&
@@ -1375,50 +1374,33 @@ void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState()
{
ctrl_avatar_cloth->setEnabled(TRUE);
}
-
- // Vertex Shaders
- // Global Shader Enable
- LLCheckBoxCtrl* ctrl_shader_enable = getChild<LLCheckBoxCtrl>("BasicShaders");
- LLSliderCtrl* terrain_detail = getChild<LLSliderCtrl>("TerrainDetail"); // can be linked with control var
- LLTextBox* terrain_text = getChild<LLTextBox>("TerrainDetailText");
- ctrl_shader_enable->setEnabled(LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable"));
-
- BOOL shaders = ctrl_shader_enable->get();
- if (shaders)
- {
- terrain_detail->setEnabled(FALSE);
- terrain_text->setEnabled(FALSE);
- }
- else
- {
- terrain_detail->setEnabled(TRUE);
- terrain_text->setEnabled(TRUE);
- }
-
- // WindLight
- LLCheckBoxCtrl* ctrl_wind_light = getChild<LLCheckBoxCtrl>("WindLightUseAtmosShaders");
- LLSliderCtrl* sky = getChild<LLSliderCtrl>("SkyMeshDetail");
- LLTextBox* sky_text = getChild<LLTextBox>("SkyMeshDetailText");
+ // Vertex Shaders, Global Shader Enable
+ // SL-12594 Basic shaders are always enabled. DJH TODO clean up now-orphaned state handling code
+ LLSliderCtrl* terrain_detail = getChild<LLSliderCtrl>("TerrainDetail"); // can be linked with control var
+ LLTextBox* terrain_text = getChild<LLTextBox>("TerrainDetailText");
- // *HACK just checks to see if we can use shaders...
- // maybe some cards that use shaders, but don't support windlight
- ctrl_wind_light->setEnabled(ctrl_shader_enable->getEnabled() && shaders);
+ terrain_detail->setEnabled(FALSE);
+ terrain_text->setEnabled(FALSE);
- sky->setEnabled(ctrl_wind_light->get() && shaders);
- sky_text->setEnabled(ctrl_wind_light->get() && shaders);
+ // WindLight
+ LLCheckBoxCtrl* ctrl_wind_light = getChild<LLCheckBoxCtrl>("WindLightUseAtmosShaders");
+ LLSliderCtrl* sky = getChild<LLSliderCtrl>("SkyMeshDetail");
+ LLTextBox* sky_text = getChild<LLTextBox>("SkyMeshDetailText");
+ ctrl_wind_light->setEnabled(TRUE);
+ sky->setEnabled(TRUE);
+ sky_text->setEnabled(TRUE);
- //Deferred/SSAO/Shadows
- LLCheckBoxCtrl* ctrl_deferred = getChild<LLCheckBoxCtrl>("UseLightShaders");
-
- BOOL enabled = LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") &&
- ((bumpshiny_ctrl && bumpshiny_ctrl->get()) ? TRUE : FALSE) &&
- shaders &&
- gGLManager.mHasFramebufferObject &&
- gSavedSettings.getBOOL("RenderAvatarVP") &&
- (ctrl_wind_light->get()) ? TRUE : FALSE;
+ //Deferred/SSAO/Shadows
+ LLCheckBoxCtrl* ctrl_deferred = getChild<LLCheckBoxCtrl>("UseLightShaders");
+
+ BOOL enabled = LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") &&
+ ((bumpshiny_ctrl && bumpshiny_ctrl->get()) ? TRUE : FALSE) &&
+ gGLManager.mHasFramebufferObject &&
+ gSavedSettings.getBOOL("RenderAvatarVP") &&
+ (ctrl_wind_light->get()) ? TRUE : FALSE;
- ctrl_deferred->setEnabled(enabled);
+ ctrl_deferred->setEnabled(enabled);
LLCheckBoxCtrl* ctrl_ssao = getChild<LLCheckBoxCtrl>("UseSSAO");
LLCheckBoxCtrl* ctrl_dof = getChild<LLCheckBoxCtrl>("UseDoF");
@@ -1516,7 +1498,6 @@ void LLFloaterPreferenceGraphicsAdvanced::disableUnavailableSettings()
LLTextBox* reflections_text = getChild<LLTextBox>("ReflectionsText");
LLCheckBoxCtrl* ctrl_avatar_vp = getChild<LLCheckBoxCtrl>("AvatarVertexProgram");
LLCheckBoxCtrl* ctrl_avatar_cloth = getChild<LLCheckBoxCtrl>("AvatarCloth");
- LLCheckBoxCtrl* ctrl_shader_enable = getChild<LLCheckBoxCtrl>("BasicShaders");
LLCheckBoxCtrl* ctrl_wind_light = getChild<LLCheckBoxCtrl>("WindLightUseAtmosShaders");
LLCheckBoxCtrl* ctrl_deferred = getChild<LLCheckBoxCtrl>("UseLightShaders");
LLComboBox* ctrl_shadows = getChild<LLComboBox>("ShadowDetail");
@@ -1526,42 +1507,6 @@ void LLFloaterPreferenceGraphicsAdvanced::disableUnavailableSettings()
LLSliderCtrl* sky = getChild<LLSliderCtrl>("SkyMeshDetail");
LLTextBox* sky_text = getChild<LLTextBox>("SkyMeshDetailText");
- // if vertex shaders off, disable all shader related products
- if (!LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable"))
- {
- ctrl_shader_enable->setEnabled(FALSE);
- ctrl_shader_enable->setValue(FALSE);
-
- ctrl_wind_light->setEnabled(FALSE);
- ctrl_wind_light->setValue(FALSE);
-
- sky->setEnabled(FALSE);
- sky_text->setEnabled(FALSE);
-
- ctrl_reflections->setEnabled(FALSE);
- ctrl_reflections->setValue(0);
- reflections_text->setEnabled(FALSE);
-
- ctrl_avatar_vp->setEnabled(FALSE);
- ctrl_avatar_vp->setValue(FALSE);
-
- ctrl_avatar_cloth->setEnabled(FALSE);
- ctrl_avatar_cloth->setValue(FALSE);
-
- ctrl_shadows->setEnabled(FALSE);
- ctrl_shadows->setValue(0);
- shadows_text->setEnabled(FALSE);
-
- ctrl_ssao->setEnabled(FALSE);
- ctrl_ssao->setValue(FALSE);
-
- ctrl_dof->setEnabled(FALSE);
- ctrl_dof->setValue(FALSE);
-
- ctrl_deferred->setEnabled(FALSE);
- ctrl_deferred->setValue(FALSE);
- }
-
// disabled windlight
if (!LLFeatureManager::getInstance()->isFeatureAvailable("WindLightUseAtmosShaders"))
{
@@ -2928,7 +2873,7 @@ void LLPanelPreferenceGraphics::setHardwareDefaults()
LLFloaterPreferenceGraphicsAdvanced::LLFloaterPreferenceGraphicsAdvanced(const LLSD& key)
: LLFloater(key)
{
- mCommitCallbackRegistrar.add("Pref.VertexShaderEnable", boost::bind(&LLFloaterPreferenceGraphicsAdvanced::onVertexShaderEnable, this));
+ mCommitCallbackRegistrar.add("Pref.VertexShaderEnable", boost::bind(&LLFloaterPreferenceGraphicsAdvanced::onRenderOptionEnable, this));
mCommitCallbackRegistrar.add("Pref.UpdateIndirectMaxNonImpostors", boost::bind(&LLFloaterPreferenceGraphicsAdvanced::updateMaxNonImpostors,this));
mCommitCallbackRegistrar.add("Pref.UpdateIndirectMaxComplexity", boost::bind(&LLFloaterPreferenceGraphicsAdvanced::updateMaxComplexity,this));
}
diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h
index 42f1de4a5d..a0f43bd884 100644
--- a/indra/newview/llfloaterpreference.h
+++ b/indra/newview/llfloaterpreference.h
@@ -122,8 +122,8 @@ protected:
// callback for defaults
void setHardwareDefaults();
void setRecommended();
- // callback for when client turns on shaders
- void onVertexShaderEnable();
+ // callback for when client modifies a render option
+ void onRenderOptionEnable();
// callback for when client turns on impostors
void onAvatarImpostorsEnable();
@@ -313,8 +313,8 @@ class LLFloaterPreferenceGraphicsAdvanced : public LLFloater
static void setIndirectMaxNonImpostors();
static void setIndirectMaxArc();
void refresh();
- // callback for when client turns on shaders
- void onVertexShaderEnable();
+ // callback for when client modifies a render option
+ void onRenderOptionEnable();
void onAdvancedAtmosphericsEnable();
LOG_CLASS(LLFloaterPreferenceGraphicsAdvanced);
};
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 0395bf1a71..349f2a761c 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -1407,12 +1407,9 @@ void LLPipeline::restoreGL()
bool LLPipeline::canUseVertexShaders()
{
- static const std::string vertex_shader_enable_feature_string = "VertexShaderEnable";
-
if (sDisableShaders ||
!gGLManager.mHasVertexShader ||
!gGLManager.mHasFragmentShader ||
- !LLFeatureManager::getInstance()->isFeatureAvailable(vertex_shader_enable_feature_string) ||
(assertInitialized() && mVertexShadersLoaded != 1) )
{
return false;