summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorCosmic Linden <cosmic@lindenlab.com>2024-03-15 10:45:53 -0700
committerCosmic Linden <cosmic@lindenlab.com>2024-03-15 10:45:53 -0700
commitcb1b23d8bf72a0e2fe0fff8b430cf144501ca586 (patch)
treee0c1573659a5778c7680747b58131dad2e220dbe /indra/newview
parentd2c16794ebe26d4bfc69d49c8f6da42505fb1a66 (diff)
secondlife/viewer#760: Fix terrain texture validator not respecting RenderMaxTextureResolution
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloaterregioninfo.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index 6ad776643d..5de11d6699 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -1321,7 +1321,8 @@ BOOL LLPanelRegionTerrainInfo::validateTextureSizes()
if (is_material_selected) { return TRUE; }
}
- static const S32 MAX_TERRAIN_TEXTURE_SIZE = 1024;
+ static LLCachedControl<U32> max_texture_resolution(gSavedSettings, "RenderMaxTextureResolution", 2048);
+ const S32 max_terrain_texture_size = (S32)max_texture_resolution;
for(S32 i = 0; i < LLTerrainMaterials::ASSET_COUNT; ++i)
{
LLTextureCtrl* texture_ctrl = mTextureDetailCtrl[i];
@@ -1341,19 +1342,19 @@ BOOL LLPanelRegionTerrainInfo::validateTextureSizes()
LLSD args;
args["TEXTURE_NUM"] = i+1;
args["TEXTURE_BIT_DEPTH"] = llformat("%d",components * 8);
- args["MAX_SIZE"] = MAX_TERRAIN_TEXTURE_SIZE;
+ args["MAX_SIZE"] = max_terrain_texture_size;
LLNotificationsUtil::add("InvalidTerrainBitDepth", args);
return FALSE;
}
- if (width > MAX_TERRAIN_TEXTURE_SIZE || height > MAX_TERRAIN_TEXTURE_SIZE)
+ if (width > max_terrain_texture_size || height > max_terrain_texture_size)
{
LLSD args;
args["TEXTURE_NUM"] = i+1;
args["TEXTURE_SIZE_X"] = width;
args["TEXTURE_SIZE_Y"] = height;
- args["MAX_SIZE"] = MAX_TERRAIN_TEXTURE_SIZE;
+ args["MAX_SIZE"] = max_terrain_texture_size;
LLNotificationsUtil::add("InvalidTerrainSize", args);
return FALSE;