From 0c833eb360a6716b75b0b9cd80e12514dd89b6d2 Mon Sep 17 00:00:00 2001 From: Arrehn Date: Thu, 1 Sep 2011 01:13:20 -0400 Subject: [PATCH] FIRE-713, Texture lag protection off by default due to content breaks, option now exposed in preferences --- indra/newview/app_settings/settings.xml | 15 +++++++- indra/newview/llvovolume.cpp | 30 +++++++++------- .../xui/en/panel_preferences_firestorm.xml | 35 +++++++++++++++++++ 3 files changed, 67 insertions(+), 13 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 98c20ff5de..2caecd9a4e 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -753,6 +753,19 @@ Value 1 + + RenderVolumeSAProtection + + Comment + Enables automatic derendering of prims with high surface area (can protect against some video card crashers) + Persist + 1 + Type + Boolean + Value + 0 + + RenderVolumeSAThreshold Comment @@ -784,7 +797,7 @@ Type F32 Value - 1000.0 + 5000.0 EnableGroupChatPopups diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 8eabd47f21..e6c590cd9f 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -4018,19 +4018,25 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) llassert_always(vobj); - static LLCachedControl volume_sa_thresh(gSavedSettings,"RenderVolumeSAThreshold"); - static LLCachedControl sculpt_sa_thresh(gSavedSettings, "RenderSculptSAThreshold"); - static LLCachedControl volume_sa_max_frame(gSavedSettings, "RenderVolumeSAFrameMax"); - F32 max_for_this_vol = (vobj->isSculpted()) ? sculpt_sa_thresh : volume_sa_thresh; + // AO: Z's protection auto-derender code + static LLCachedControl tex_protect(gSavedSettings,"RenderVolumeSAProtection"); + if (tex_protect) + { + static LLCachedControl volume_sa_thresh(gSavedSettings,"RenderVolumeSAThreshold"); + static LLCachedControl sculpt_sa_thresh(gSavedSettings, "RenderSculptSAThreshold"); + static LLCachedControl volume_sa_max_frame(gSavedSettings, "RenderVolumeSAFrameMax"); + F32 max_for_this_vol = (vobj->isSculpted()) ? sculpt_sa_thresh : volume_sa_thresh; - if (vobj->mVolumeSurfaceArea > max_for_this_vol) - { - LLPipeline::sVolumeSAFrame += vobj->mVolumeSurfaceArea; - if(LLPipeline::sVolumeSAFrame > volume_sa_max_frame) - { - continue; - } - } + if (vobj->mVolumeSurfaceArea > max_for_this_vol) + { + LLPipeline::sVolumeSAFrame += vobj->mVolumeSurfaceArea; + if(LLPipeline::sVolumeSAFrame > volume_sa_max_frame) + { + continue; + } + } + } + // vobj->updateTextureVirtualSize(); vobj->preRebuild(); diff --git a/indra/newview/skins/default/xui/en/panel_preferences_firestorm.xml b/indra/newview/skins/default/xui/en/panel_preferences_firestorm.xml index f0518b75e5..98f37b2120 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_firestorm.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_firestorm.xml @@ -404,6 +404,41 @@ value="3" width="150" /> + + + Texture Lag Protection (may break some objects): + + + + +