summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2025-01-22 13:38:37 +0800
committerErik Kundiman <erik@megapahit.org>2025-01-22 13:38:37 +0800
commit3437b6d6f5328c5f067f718ef5ae378d97427f05 (patch)
tree0a38c03d861357b7a9c339d514d3af70ae332eab
parenta314646f06b1a9f108b184d1074f6039405a522b (diff)
parent9159922bdf47093ba2330ce38ea69562fbbaedb1 (diff)
Merge remote-tracking branch 'secondlife/release/2024.12-ForeverFPS' into 2024.12-ForeverFPS
-rw-r--r--indra/newview/featuretable.txt9
-rw-r--r--indra/newview/featuretable_mac.txt9
-rw-r--r--indra/newview/llviewertexture.cpp36
-rw-r--r--indra/newview/pipeline.cpp7
-rw-r--r--indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml53
5 files changed, 86 insertions, 28 deletions
diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt
index d894e1b24e..cb79410d72 100644
--- a/indra/newview/featuretable.txt
+++ b/indra/newview/featuretable.txt
@@ -85,6 +85,7 @@ RenderExposure 1 4
RenderTonemapType 1 1
RenderTonemapMix 1 1
RenderDisableVintageMode 1 1
+RenderMaxTextureResolution 1 2048
//
// Low Graphics Settings
@@ -126,6 +127,7 @@ RenderExposure 1 1
RenderTonemapType 1 1
RenderTonemapMix 1 0.7
RenderDisableVintageMode 1 0
+RenderMaxTextureResolution 1 512
//
// Medium Low Graphics Settings
@@ -167,6 +169,7 @@ RenderExposure 1 1
RenderTonemapType 1 1
RenderTonemapMix 1 0.7
RenderDisableVintageMode 1 0
+RenderMaxTextureResolution 1 1024
//
// Medium Graphics Settings (standard)
@@ -207,6 +210,7 @@ RenderCASSharpness 1 0
RenderExposure 1 1
RenderTonemapType 1 1
RenderTonemapMix 1 0.7
+RenderMaxTextureResolution 1 2048
//
// Medium High Graphics Settings
@@ -247,6 +251,7 @@ RenderCASSharpness 1 0
RenderExposure 1 1
RenderTonemapType 1 1
RenderTonemapMix 1 0.7
+RenderMaxTextureResolution 1 2048
//
// High Graphics Settings (SSAO + sun shadows)
@@ -287,6 +292,7 @@ RenderCASSharpness 1 0.4
RenderExposure 1 1
RenderTonemapType 1 1
RenderTonemapMix 1 0.7
+RenderMaxTextureResolution 1 2048
//
// High Ultra Graphics Settings (deferred + SSAO + all shadows)
@@ -327,6 +333,7 @@ RenderCASSharpness 1 0.4
RenderExposure 1 1
RenderTonemapType 1 1
RenderTonemapMix 1 0.7
+RenderMaxTextureResolution 1 2048
//
// Ultra graphics (REALLY PURTY!)
@@ -367,6 +374,7 @@ RenderCASSharpness 1 0.4
RenderExposure 1 1
RenderTonemapType 1 1
RenderTonemapMix 1 0.7
+RenderMaxTextureResolution 1 2048
//
// Class Unknown Hardware (unknown)
@@ -399,6 +407,7 @@ RenderShadowDetail 0 0
RenderReflectionProbeDetail 0 -1
RenderMirrors 0 0
RenderDisableVintageMode 1 0
+RenderMaxTextureResolution 1 2048
list Intel
RenderAnisotropic 1 0
diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt
index eedce61509..f3c3c4fcd9 100644
--- a/indra/newview/featuretable_mac.txt
+++ b/indra/newview/featuretable_mac.txt
@@ -85,6 +85,7 @@ RenderTonemapType 1 1
RenderTonemapMix 1 1
RenderDisableVintageMode 1 1
RenderDownScaleMethod 1 0
+RenderMaxTextureResolution 1 2048
//
// Low Graphics Settings
@@ -126,6 +127,7 @@ RenderExposure 1 1
RenderTonemapType 1 1
RenderTonemapMix 1 0.7
RenderDisableVintageMode 1 0
+RenderMaxTextureResolution 1 512
//
@@ -168,6 +170,7 @@ RenderExposure 1 1
RenderTonemapType 1 1
RenderTonemapMix 1 0.7
RenderDisableVintageMode 1 0
+RenderMaxTextureResolution 1 1024
//
// Medium Graphics Settings (standard)
@@ -208,6 +211,7 @@ RenderCASSharpness 1 0
RenderExposure 1 1
RenderTonemapType 1 1
RenderTonemapMix 1 0.7
+RenderMaxTextureResolution 1 2048
//
// Medium High Graphics Settings
@@ -248,6 +252,7 @@ RenderCASSharpness 1 0
RenderExposure 1 1
RenderTonemapType 1 1
RenderTonemapMix 1 0.7
+RenderMaxTextureResolution 1 2048
//
// High Graphics Settings (SSAO + sun shadows)
@@ -288,6 +293,7 @@ RenderCASSharpness 1 0
RenderExposure 1 1
RenderTonemapType 1 1
RenderTonemapMix 1 0.7
+RenderMaxTextureResolution 1 2048
//
// High Ultra Graphics Settings (SSAO + all shadows)
@@ -328,6 +334,7 @@ RenderCASSharpness 1 0.4
RenderExposure 1 1
RenderTonemapType 1 1
RenderTonemapMix 1 0.7
+RenderMaxTextureResolution 1 2048
//
// Ultra graphics (REALLY PURTY!)
@@ -368,6 +375,7 @@ RenderCASSharpness 1 0.4
RenderExposure 1 1
RenderTonemapType 1 1
RenderTonemapMix 1 0.7
+RenderMaxTextureResolution 1 2048
//
// Class Unknown Hardware (unknown)
@@ -399,6 +407,7 @@ RenderDeferredSSAO 0 0
RenderShadowDetail 0 0
RenderMirrors 0 0
RenderDisableVintageMode 1 0
+RenderMaxTextureResolution 1 2048
list TexUnit8orLess
RenderDeferredSSAO 0 0
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 271460f2cc..2eaadd9e71 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -108,12 +108,6 @@ LLViewerTexture::EDebugTexels LLViewerTexture::sDebugTexelsMode = LLViewerTextur
const F64 log_2 = log(2.0);
-#if ADDRESS_SIZE == 32
-const U32 DESIRED_NORMAL_TEXTURE_SIZE = (U32)LLViewerFetchedTexture::MAX_IMAGE_SIZE_DEFAULT / 2;
-#else
-const U32 DESIRED_NORMAL_TEXTURE_SIZE = (U32)LLViewerFetchedTexture::MAX_IMAGE_SIZE_DEFAULT;
-#endif
-
//----------------------------------------------------------------------------------------------
//namespace: LLViewerTextureAccess
//----------------------------------------------------------------------------------------------
@@ -1694,6 +1688,16 @@ void LLViewerFetchedTexture::processTextureStats()
static LLCachedControl<bool> textures_fullres(gSavedSettings,"TextureLoadFullRes", false);
+ U32 max_tex_res = MAX_IMAGE_SIZE_DEFAULT;
+ if (mBoostLevel < LLGLTexture::BOOST_HIGH)
+ {
+ // restrict texture resolution to download based on RenderMaxTextureResolution
+ static LLCachedControl<U32> max_texture_resolution(gSavedSettings, "RenderMaxTextureResolution", 2048);
+ // sanity clamp debug setting to avoid settings hack shenanigans
+ max_tex_res = (U32)llclamp((U32)max_texture_resolution, 512, MAX_IMAGE_SIZE_DEFAULT);
+ mMaxVirtualSize = llmin(mMaxVirtualSize, (F32)(max_tex_res * max_tex_res));
+ }
+
if (textures_fullres)
{
mDesiredDiscardLevel = 0;
@@ -1715,10 +1719,9 @@ void LLViewerFetchedTexture::processTextureStats()
}
else
{
- U32 desired_size = MAX_IMAGE_SIZE_DEFAULT; // MAX_IMAGE_SIZE_DEFAULT = 2048 and max size ever is 4096
if(!mKnownDrawWidth || !mKnownDrawHeight || (S32)mFullWidth <= mKnownDrawWidth || (S32)mFullHeight <= mKnownDrawHeight)
{
- if (mFullWidth > desired_size || mFullHeight > desired_size)
+ if (mFullWidth > max_tex_res || mFullHeight > max_tex_res)
{
mDesiredDiscardLevel = 1;
}
@@ -2948,12 +2951,14 @@ void LLViewerLODTexture::processTextureStats()
static LLCachedControl<bool> textures_fullres(gSavedSettings,"TextureLoadFullRes", false);
- { // restrict texture resolution to download based on RenderMaxTextureResolution
+ F32 max_tex_res = MAX_IMAGE_SIZE_DEFAULT;
+ if (mBoostLevel < LLGLTexture::BOOST_HIGH)
+ {
+ // restrict texture resolution to download based on RenderMaxTextureResolution
static LLCachedControl<U32> max_texture_resolution(gSavedSettings, "RenderMaxTextureResolution", 2048);
// sanity clamp debug setting to avoid settings hack shenanigans
- F32 tex_res = (F32)llclamp((S32)max_texture_resolution, 512, 2048);
- tex_res *= tex_res;
- mMaxVirtualSize = llmin(mMaxVirtualSize, tex_res);
+ max_tex_res = (F32)llclamp((S32)max_texture_resolution, 512, MAX_IMAGE_SIZE_DEFAULT);
+ mMaxVirtualSize = llmin(mMaxVirtualSize, max_tex_res * max_tex_res);
}
if (textures_fullres)
@@ -3009,12 +3014,7 @@ void LLViewerLODTexture::processTextureStats()
discard_level = floorf(discard_level);
F32 min_discard = 0.f;
- U32 desired_size = MAX_IMAGE_SIZE_DEFAULT; // MAX_IMAGE_SIZE_DEFAULT = 2048 and max size ever is 4096
- if (mBoostLevel <= LLGLTexture::BOOST_SCULPTED)
- {
- desired_size = DESIRED_NORMAL_TEXTURE_SIZE;
- }
- if (mFullWidth > desired_size || mFullHeight > desired_size)
+ if (mFullWidth > max_tex_res || mFullHeight > max_tex_res)
min_discard = 1.f;
discard_level = llclamp(discard_level, min_discard, (F32)MAX_DISCARD_LEVEL);
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 8740578eac..b31c4faedd 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -3855,7 +3855,12 @@ void LLPipeline::renderSelectedFaces(const LLColor4& color)
for (auto facep : mSelectedFaces)
{
- if (!facep || facep->getDrawable()->isDead())
+ if (!facep || !facep->getViewerObject())
+ {
+ LLSelectMgr::getInstance()->clearSelections();
+ return;
+ }
+ if (!facep->getDrawable() || facep->getDrawable()->isDead())
{
LL_ERRS() << "Bad face on selection" << LL_ENDL;
return;
diff --git a/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml b/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml
index d58107690d..b789d9ed46 100644
--- a/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml
+++ b/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
- height="430"
+ height="452"
layout="topleft"
name="prefs_graphics_advanced"
help_topic="Preferences_Graphics_Advanced"
@@ -118,6 +118,41 @@
name="MaxLights"
top_delta="16"
width="336" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ top_delta="16"
+ left="30"
+ width="130"
+ name="MaxTextureResolutionLabel"
+ text_readonly_color="LabelDisabledColor">
+ Maximum LOD resolution:
+ </text>
+ <combo_box
+ control_name="RenderMaxTextureResolution"
+ height="19"
+ layout="topleft"
+ left_pad="40"
+ top_delta="0"
+ name="MaxTextureResolution"
+ tool_tip="Maximum resolution for 'level of detail' textures"
+ width="90">
+ <combo_box.item
+ label="512"
+ name="512"
+ value="512"/>
+ <combo_box.item
+ label="1024"
+ name="1024"
+ value="1024"/>
+ <combo_box.item
+ label="2048"
+ name="2048"
+ value="2048"/>
+ </combo_box>
<check_box
control_name="RenderVSyncEnable"
@@ -152,7 +187,7 @@
layout="topleft"
left="30"
top_delta="16"
- width="128"
+ width="130"
name="AvatarComplexityModeLabel"
text_readonly_color="LabelDisabledColor">
Avatar display:
@@ -160,10 +195,10 @@
<combo_box
control_name="RenderAvatarComplexityMode"
- height="18"
+ height="19"
layout="topleft"
- left_delta="130"
- top_delta="0"
+ left_pad="40"
+ top_delta="-1"
name="AvatarComplexityMode"
width="150">
<combo_box.item
@@ -195,7 +230,7 @@
max_val="101"
name="IndirectMaxComplexity"
show_text="false"
- top_delta="16"
+ top_delta="19"
width="300">
<slider.commit_callback
function="Pref.UpdateIndirectMaxComplexity"
@@ -368,7 +403,7 @@
left="30"
name="antialiasing label"
top_delta="20"
- width="120">
+ width="130">
Antialiasing:
</text>
<combo_box
@@ -403,7 +438,7 @@
left="30"
name="antialiasing quality label"
top_delta="20"
- width="120">
+ width="130">
Antialiasing Quality:
</text>
<combo_box
@@ -1015,7 +1050,7 @@
layout="topleft"
left="13"
name="horiz_border"
- top="393"
+ top="415"
top_delta="5"
width="774"/>
<button