From 8506efe35de33014fd268182a8fe0c0177475618 Mon Sep 17 00:00:00 2001 From: Hecklezz Date: Sun, 13 Jul 2025 05:57:44 +1000 Subject: [PATCH 1/2] Disable Draw Distance VRAM Optimisation by default and have it as an option under Graphics->Rendering preferences and Developer->Rendering menu --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llviewerdisplay.cpp | 10 +++++++++- .../newview/skins/default/xui/en/menu_viewer.xml | 10 ++++++++++ .../xui/en/panel_preferences_graphics1.xml | 16 +++++++++++++--- 4 files changed, 43 insertions(+), 4 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 0d6b61d3dc..570c69730a 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -24160,6 +24160,17 @@ Change of this parameter will affect the layout of buttons in notification toast Value 0 + FSDrawDistanceVRAMOptimization + + Comment + Enables an optimization that shrinks your draw distance when VRAM becomes very low + Persist + 1 + Type + Boolean + Value + 0 + FSdataQAtest Comment diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index b26635320b..ea79940d6b 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -222,6 +222,11 @@ void display_update_camera() // Cut draw distance in half when customizing avatar, // but on the viewer only. F32 final_far = gAgentCamera.mDrawDistance; + + // [FIRE-35748] Only enable the LL Draw Distance VRAM optimization when the setting is enabled + static LLCachedControl use_vram_optimization(gSavedSettings, "FSDrawDistanceVRAMOptimization", false); + // + if (gCubeSnapshot) { final_far = gSavedSettings.getF32("RenderReflectionProbeDrawDistance"); @@ -230,7 +235,10 @@ void display_update_camera() { final_far *= 0.5f; } - else if (LLViewerTexture::sDesiredDiscardBias > 2.f) + // [FIRE-35748] Only enable the LL Draw Distance VRAM optimization when the setting is enabled + //else if (LLViewerTexture::sDesiredDiscardBias > 2.f) + else if (use_vram_optimization && LLViewerTexture::sDesiredDiscardBias > 2.f) + // { final_far = llmax(32.f, final_far / (LLViewerTexture::sDesiredDiscardBias - 1.f)); } diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index ac591e71aa..3006dcb781 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -4793,6 +4793,16 @@ function="Advanced.HandleAttachedLightParticles" parameter="RenderAttachedParticles" /> + + + + 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 8d44f6f187..ded962c3c0 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml @@ -1531,6 +1531,7 @@ If you do not understand the distinction then leave this control alone." layout="topleft" left="20" top_pad="9" + width="220" label="Enable Attached Lights (Face Lights)" tool_tip="This will enable any lights, such as face lights, avatars have attached to them. Useful for turning off facelights when necessary." name="Render Attached Lights"> @@ -1542,10 +1543,10 @@ If you do not understand the distinction then leave this control alone." parameter="RenderAttachedLights"/> + Date: Mon, 14 Jul 2025 23:20:28 +1000 Subject: [PATCH 2/2] Refactored the name and description of the draw distance vram optimization feature --- indra/newview/app_settings/settings.xml | 2 +- indra/newview/skins/default/xui/en/menu_viewer.xml | 4 ++-- .../skins/default/xui/en/panel_preferences_graphics1.xml | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 570c69730a..242f707c0b 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -24163,7 +24163,7 @@ Change of this parameter will affect the layout of buttons in notification toast FSDrawDistanceVRAMOptimization Comment - Enables an optimization that shrinks your draw distance when VRAM becomes very low + Enables a feature that reduces your draw distance when VRAM becomes full Persist 1 Type diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 3006dcb781..8f05958685 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -4794,8 +4794,8 @@ parameter="RenderAttachedParticles" /> + label="Reduce Draw Distance when VRAM is full" + name="Reduce Draw Distance when VRAM is full"> 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 ded962c3c0..2daee4c182 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml @@ -1562,9 +1562,9 @@ If you do not understand the distinction then leave this control alone." layout="topleft" left="20" top_pad="9" - label="Enable Draw Distance VRAM Optimization" - name="Draw Distance VRAM Optimization" - tool_tip="Enables an optimization that shrinks your draw distance when your VRAM becomes very low"/> + label="Reduce Draw Distance when VRAM is full" + name="Reduce Draw Distance when VRAM is full" + tool_tip="Enables a feature that reduces your draw distance when VRAM becomes full"/>