summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorcosmic-linden <111533034+cosmic-linden@users.noreply.github.com>2024-03-15 12:44:03 -0700
committerGitHub <noreply@github.com>2024-03-15 12:44:03 -0700
commitb29c290a3437691fba13c2390a42eb204f3125d9 (patch)
treee0c1573659a5778c7680747b58131dad2e220dbe /indra
parentd2c16794ebe26d4bfc69d49c8f6da42505fb1a66 (diff)
parentcb1b23d8bf72a0e2fe0fff8b430cf144501ca586 (diff)
Merge pull request #1007 from secondlife/v-760
secondlife/viewer#760: Fix terrain texture validator not respecting 2k texture feature flag
Diffstat (limited to 'indra')
-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;