summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-10-02 02:12:21 -0500
committerDave Parks <davep@lindenlab.com>2011-10-02 02:12:21 -0500
commitac37656aa5ff545c90fadfd5b585cb823ad68b0d (patch)
tree71af4561c22d90bf40ba54ba97b1350467f73e75 /indra/newview
parent784fed2ebb3efd8e4da132c291aaf16cdb931b98 (diff)
SH-2276 Fix for failed assertions reported from debug-enabled viewers. Also, remove "Basic Shaders" as a user settable option (shaders are always on if GL version >= 2.0, always off otherwise)
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llfloaterpreference.cpp13
-rw-r--r--indra/newview/llviewershadermgr.cpp6
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml14
3 files changed, 5 insertions, 28 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 9630d7b29f..5c36d2e131 100755
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -1034,14 +1034,11 @@ void LLFloaterPreference::refreshEnabledState()
}
// Vertex Shaders
- // Global Shader Enable
- LLCheckBoxCtrl* ctrl_shader_enable = getChild<LLCheckBoxCtrl>("BasicShaders");
// radio set for terrain detail mode
LLRadioGroup* mRadioTerrainDetail = getChild<LLRadioGroup>("TerrainDetailRadio"); // can be linked with control var
- ctrl_shader_enable->setEnabled(LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable"));
-
- BOOL shaders = ctrl_shader_enable->get();
+ BOOL shaders = gGLManager.mGLVersion >= 2.f;
+
if (shaders)
{
mRadioTerrainDetail->setValue(1);
@@ -1057,7 +1054,7 @@ void LLFloaterPreference::refreshEnabledState()
// *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);
+ ctrl_wind_light->setEnabled(shaders);
//Deferred/SSAO/Shadows
LLCheckBoxCtrl* ctrl_deferred = getChild<LLCheckBoxCtrl>("UseLightShaders");
@@ -1095,7 +1092,6 @@ void LLFloaterPreference::disableUnavailableSettings()
LLComboBox* ctrl_reflections = getChild<LLComboBox>("Reflections");
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_avatar_impostors = getChild<LLCheckBoxCtrl>("AvatarImpostors");
LLCheckBoxCtrl* ctrl_deferred = getChild<LLCheckBoxCtrl>("UseLightShaders");
@@ -1106,9 +1102,6 @@ void LLFloaterPreference::disableUnavailableSettings()
// 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);
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index d3f5ebcf1c..17d2a04301 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -450,8 +450,8 @@ void LLViewerShaderMgr::setShaders()
LLGLSLShader::sIndexedTextureChannels = llmax(llmin(gGLManager.mNumTextureImageUnits, (S32) gSavedSettings.getU32("RenderMaxTextureIndex")), 1);
- if (LLRender::sGLCoreProfile)
- {
+ if (LLRender::sGLCoreProfile || gGLManager.mGLVersion >= 2.f)
+ { //ALWAYS use shaders where available
if (!gSavedSettings.getBOOL("VertexShaderEnable"))
{ //vertex shaders MUST be enabled to use core profile
gSavedSettings.setBOOL("VertexShaderEnable", TRUE);
@@ -1122,8 +1122,6 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
return TRUE;
}
- mVertexShaderLevel[SHADER_AVATAR] = 1;
-
BOOL success = TRUE;
if (success)
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
index f7666bdc4c..c25c1f23f5 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
@@ -204,20 +204,6 @@
name="LocalLights"
top_pad="1"
width="256" />
- <check_box
- control_name="VertexShaderEnable"
- height="16"
- initial_value="true"
- label="Basic shaders"
- layout="topleft"
- left_delta="0"
- name="BasicShaders"
- tool_tip="Disabling this option may prevent some graphics card drivers from crashing"
- top_pad="1"
- width="315">
- <check_box.commit_callback
- function="Pref.VertexShaderEnable" />
- </check_box>
<check_box
control_name="WindLightUseAtmosShaders"
height="16"