diff --git a/autobuild.xml b/autobuild.xml index 0eebce44db..c342ffddaa 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -1330,9 +1330,9 @@ archive hash - 47af788cc447a64e311e3a65b74a9cf9 + 478f6e900ac5b3319dd2aa89fbdddd0b url - file:///opt/firestorm/kdu-8.4.1-darwin64-233220201.tar.bz2 + file:///opt/firestorm/kdu-8.5-darwin64-250921045.tar.bz2 name darwin64 @@ -1342,9 +1342,9 @@ archive hash - b464a547d5bedcc72e9173d860f40656 + cceee36d06464806e9ecf75f24dd6530 url - file:///opt/firestorm/kdu-8.4.1-linux64-233220158.tar.bz2 + file:///opt/firestorm/kdu-8.5-linux64-250921045.tar.bz2 name linux64 @@ -1354,9 +1354,9 @@ archive hash - 526965ad83ad9ee355b6596f489d82d9 + f574412faea823a0e7dcc4a90dced185 url - file:///c:/cygwin/opt/firestorm/kdu-8.4.1-windows-233220159.tar.bz2 + file:///c:/cygwin/opt/firestorm/kdu-8.5-windows64-250921045.tar.bz2 name windows64 diff --git a/indra/newview/daeexport.cpp b/indra/newview/daeexport.cpp index 4f29268e11..4fa44bac23 100644 --- a/indra/newview/daeexport.cpp +++ b/indra/newview/daeexport.cpp @@ -428,6 +428,8 @@ void ColladaExportFloater::CacheReadResponder::completed(bool success) // For other formats we need to decode first if (mFormattedImage->updateData() && ( (mFormattedImage->getWidth() * mFormattedImage->getHeight() * mFormattedImage->getComponents()) != 0 ) ) { + mFormattedImage->setDiscardLevel(0); // [FIRE-35292] Fix for textures getting downscaled and compressed + LLPointer raw = new LLImageRaw; raw->resize(mFormattedImage->getWidth(), mFormattedImage->getHeight(), mFormattedImage->getComponents()); @@ -503,7 +505,15 @@ void ColladaExportFloater::CacheReadResponder::saveTexturesWorker(void* data) std::string name = gDirUtilp->getDirName(me->mFilename); name += gDirUtilp->getDirDelimiter() + me->mTexturesToSave[id]; CacheReadResponder* responder = new CacheReadResponder(id, img, name, img_type); - LLAppViewer::getTextureCache()->readFromCache(id, 0, 999999, responder); + // [FIRE-35292] Fix for textures getting downscaled and compressed + //LLAppViewer::getTextureCache()->readFromCache(id, 0, 999999, responder); + // The above line hard coded the size of data to read from the cached version of the texture as 999999, + // where now we will calcuate the correct value based upon the texture's full width, height and # of components (3=RGB, 4=RGBA) and + // the discard level (0)). There is a choice to change the rate, but we seem to use the value of 1/8 compression level + S32 texture_size = LLImageJ2C::calcDataSizeJ2C(imagep->getFullWidth(), imagep->getFullHeight(), imagep->getComponents(), 0);// , F32 rate) rate = const F32 DEFAULT_COMPRESSION_RATE = 1.f/8.f; + // Use calculated texture_size (from LLTextureFetch::createRequest see "else if (w*h*c > 0)" statement for more info) + LLAppViewer::getTextureCache()->readFromCache(id, 0, texture_size, responder); + // [FIRE-35292] me->mTexturesToSave.erase(id); me->updateTitleProgress(); me->mTimer.reset(); diff --git a/indra/newview/fsfloaterexport.cpp b/indra/newview/fsfloaterexport.cpp index 0b60e8b00b..a8f81eccaa 100644 --- a/indra/newview/fsfloaterexport.cpp +++ b/indra/newview/fsfloaterexport.cpp @@ -690,7 +690,14 @@ void FSFloaterObjectExport::fetchTextureFromCache(LLViewerFetchedTexture* src_vi const LLUUID& texture_id = src_vi->getID(); LLImageJ2C* mFormattedImage = new LLImageJ2C; FSFloaterObjectExport::FSExportCacheReadResponder* responder = new FSFloaterObjectExport::FSExportCacheReadResponder(texture_id, mFormattedImage, this); - LLAppViewer::getTextureCache()->readFromCache(texture_id, 0, 999999, responder); + // [FIRE-35292] Fix for textures getting downscaled and compressed + //LLAppViewer::getTextureCache()->readFromCache(id, 0, 999999, responder); + // The above line hard coded the size of data to read from the cached version of the texture as 999999, + // where now we will calcuate the correct value based upon the texture's full width, height and # of components (3=RGB, 4=RGBA) and + // the discard level (0)). There is a choice to change the rate, but we seem to use the value of 1/8 compression level + S32 texture_size = LLImageJ2C::calcDataSizeJ2C(src_vi->getFullWidth(), src_vi->getFullHeight(), src_vi->getComponents(), 0);// , F32 rate) rate = const F32 DEFAULT_COMPRESSION_RATE = 1.f/8.f; + // Use calculated texture_size (from LLTextureFetch::createRequest see "else if (w*h*c > 0)" statement for more info) + LLAppViewer::getTextureCache()->readFromCache(texture_id, 0, texture_size, responder); LL_DEBUGS("export") << "Fetching " << texture_id << " from the TextureCache" << LL_ENDL; } diff --git a/indra/newview/llagentbenefits.cpp b/indra/newview/llagentbenefits.cpp index 5b737e35f3..01a701094d 100644 --- a/indra/newview/llagentbenefits.cpp +++ b/indra/newview/llagentbenefits.cpp @@ -220,7 +220,7 @@ S32 LLAgentBenefits::getPicksLimit() const } else { - constexpr S32 MAX_OPENSIM_PICKS_FALLBACK = 20; // [FIRE-35276] Freeze on OpenSim (default agreed with Ubit Umarov) (originally by Haklezz) + constexpr S32 MAX_OPENSIM_PICKS_FALLBACK = 20; // [FIRE-35276] Freeze on OpenSim (default agreed with Ubit Umarov) (originally by Hecklezz) S32 max_profile_picks = MAX_OPENSIM_PICKS_FALLBACK; @@ -234,7 +234,7 @@ S32 LLAgentBenefits::getPicksLimit() const } } return max_profile_picks; - } + } // } diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index 4eeab0d8d3..3de843627f 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -91,6 +91,8 @@ #include "fscommon.h" #include "llstartup.h" +#include "llviewernetwork.h" // Access to GridManager + static LLDefaultChildRegistry::Register r1("net_map"); constexpr F32 LLNetMap::MAP_SCALE_MIN = 32; @@ -454,26 +456,75 @@ void LLNetMap::draw() gGL.color4f(1.f, 0.5f, 0.5f, 1.f); } - // Draw using texture. - gGL.getTexUnit(0)->bind(regionp->getLand().getSTexture()); - gGL.begin(LLRender::TRIANGLES); + // [FIRE-35147] OpenSim regions can be greater than 256x256 and need to be accounted for + if (!LLGridManager::getInstance()->isInSecondLife()) { - gGL.texCoord2f(0.f, 1.f); - gGL.vertex2f(left, top); - gGL.texCoord2f(0.f, 0.f); - gGL.vertex2f(left, bottom); - gGL.texCoord2f(1.f, 0.f); - gGL.vertex2f(right, bottom); + // Fixes OpenSim race condition on grid change not having updated Grid Info yet + bool isAgentTeleporting = gAgent.getTeleportState() != LLAgent::TELEPORT_NONE; + if (!isAgentTeleporting) + { + const LLViewerRegion::tex_matrix_t& tiles(regionp->getWorldMapTiles()); + for (S32 i(0), scaled_width((S32)(real_width / region_width)), square_width(scaled_width * scaled_width); + i < square_width; ++i) + { + const F32 y = (F32)(i / scaled_width); + const F32 x = (F32)(i - y * scaled_width); + const F32 local_left(left + x * mScale); + const F32 local_right(local_left + mScale); + const F32 local_bottom(bottom + y * mScale); + const F32 local_top(local_bottom + mScale); + LLPointer pRegionImage = tiles[(U64)(x * scaled_width + y)]; + if (pRegionImage.isNull()) + continue; - gGL.texCoord2f(0.f, 1.f); - gGL.vertex2f(left, top); - gGL.texCoord2f(1.f, 0.f); - gGL.vertex2f(right, bottom); - gGL.texCoord2f(1.f, 1.f); - gGL.vertex2f(right, top); + if (pRegionImage->hasGLTexture()) + { + gGL.getTexUnit(0)->bind(pRegionImage); + gGL.begin(LLRender::TRIANGLES); + { + gGL.texCoord2f(0.f, 1.f); + gGL.vertex2f(local_left, local_top); + gGL.texCoord2f(0.f, 0.f); + gGL.vertex2f(local_left, local_bottom); + gGL.texCoord2f(1.f, 0.f); + gGL.vertex2f(local_right, local_bottom); + + gGL.texCoord2f(0.f, 1.f); + gGL.vertex2f(local_left, local_top); + gGL.texCoord2f(1.f, 0.f); + gGL.vertex2f(local_right, local_bottom); + gGL.texCoord2f(1.f, 1.f); + gGL.vertex2f(local_right, local_top); + } + gGL.end(); + } + pRegionImage->setBoostLevel(LLViewerTexture::BOOST_MAP_VISIBLE); + } + } } - gGL.end(); + // + else + { + // Draw using texture. + gGL.getTexUnit(0)->bind(regionp->getLand().getSTexture()); + gGL.begin(LLRender::TRIANGLES); + { + gGL.texCoord2f(0.f, 1.f); + gGL.vertex2f(left, top); + gGL.texCoord2f(0.f, 0.f); + gGL.vertex2f(left, bottom); + gGL.texCoord2f(1.f, 0.f); + gGL.vertex2f(right, bottom); + gGL.texCoord2f(0.f, 1.f); + gGL.vertex2f(left, top); + gGL.texCoord2f(1.f, 0.f); + gGL.vertex2f(right, bottom); + gGL.texCoord2f(1.f, 1.f); + gGL.vertex2f(right, top); + } + gGL.end(); + } gGL.flush(); } diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 5e4ca4ddaf..632a37bae3 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -388,11 +388,11 @@ void LLViewerTextureList::dump() // [FIRE-35081] Blurry prims not changing with graphics settings, not happening with SL Viewer S32 texture_count = 0; S32 textures_close_to_camera = 0; - S32 image_counts[MAX_DISCARD_LEVEL + 1]; - for (S32 index = 0; index <= MAX_DISCARD_LEVEL; index++) - { - image_counts[index] = 0; - } + std::array image_counts{0}; // Double the size for higher discards from textures < 1024 (2048 can make a 7 and 4096 could make an 8) + std::array size_counts{0}; // Track the 12 possible sizes (1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048) + std::array discard_counts{0}; // Also need to an 1 additional as -1 is a valid discard level (not loaded by reported as a 1x1 texture) + // Don't Init the buffers with 0's like it's the the 1980's... + // [FIRE-35081] for (image_list_t::iterator it = mImageList.begin(); it != mImageList.end(); ++it) { @@ -402,11 +402,11 @@ void LLViewerTextureList::dump() std::string volume_counts = ""; for (S32 index = 0; index < LLRender::NUM_TEXTURE_CHANNELS; index++) { - face_counts += std::to_string(image->getNumFaces(index)) + " "; + face_counts += std::to_string(image->getNumFaces(index)) + " "; } for (S32 index = 0; index < LLRender::NUM_VOLUME_TEXTURE_CHANNELS; index++) - { + { volume_counts += std::to_string(image->getNumVolumes(index)) + " "; } // [FIRE-35081] @@ -427,7 +427,12 @@ void LLViewerTextureList::dump() << " http://asset.siva.lindenlab.com/" << image->getID() << ".texture" << LL_ENDL; // [FIRE-35081] Blurry prims not changing with graphics settings, not happening with SL Viewer - image_counts[image->getDiscardLevel()] += 1; + image_counts[(image->getDiscardLevel() + 1)] += 1; // Need to add +1 to make up for -1 being a possible value + S32 x_index = (S32)log2(image->getWidth()); // Convert the width into a 0 based index by taking the Log2 of the size to get the exponent of the size. (1 = 2^0, 2 = 2^1, 4 = 2^2...) + S32 y_index = (S32)log2(image->getHeight()); // Convert the height into a 0 based index by taking the Log2 of the size to get the exponent of the size. (1 = 2^0, 2 = 2^1, 4 = 2^2...) + size_counts[x_index + y_index * 12] += 1; // Add this texture's dimensions to the size count + // Onlyuse the largest size for the texture's discard level(for non-square textures) + discard_counts[(image->getDiscardLevel() + 1) + (y_index > x_index ? y_index : x_index) * (MAX_DISCARD_LEVEL * 2 + 2)] += 1; texture_count++; textures_close_to_camera += S32(image->getCloseToCamera()); // [FIRE-35081] @@ -436,10 +441,103 @@ void LLViewerTextureList::dump() // Add overal texture totals LL_INFOS() << "Texture Stats: Textures in Close to Camera " << textures_close_to_camera << " of " << texture_count << " : " << LL_ENDL; - for (S32 index = 0; index <= MAX_DISCARD_LEVEL; index++) + // Fix for the -1 discard level as well as higher possible discard levels (for 2048+ size textures) + for (S32 index = 0; index < MAX_DISCARD_LEVEL * 2 + 2; index++) { - LL_INFOS() << " Discard Level: " << index << " Number of Textures: " << image_counts[index] << LL_ENDL; + LL_INFOS() << " Discard Level: " << (index - 1) << " Number of Textures: " << image_counts[index] << LL_ENDL; } + + // Create a header that for the Sizes + std::string header = "Size "; + for (S32 x = 0; x < 12; x++) + { + std::string newValue = std::to_string((S32)pow(2, x)); + header += newValue; + for (S32 tab = 0; tab <= 8 - newValue.length(); tab++) + { + header += " "; + } + } + + // Create a line to break up the header from the content of the table + std::string header_break = ""; + for (S32 x = 0; x < header.length(); x++) + { + header_break += "-"; + } + + LL_INFOS() << header_break << LL_ENDL; + LL_INFOS() << header << LL_ENDL; // Size vs Size counts header + LL_INFOS() << header_break << LL_ENDL; + + // Y Axis is the size of the height of the texture + for (S32 y = 0; y < 12; y++) + { + std::string newValue = std::to_string((S32)pow(2, y)); + std::string size_count_string = "" + newValue; + for (S32 tab = 0; tab <= 8 - newValue.length(); tab++) + { + size_count_string += " "; + } + + //X Axis is the size of the width of the texture + for (S32 x = 0; x < 12; x++) + { + newValue = std::to_string(size_counts[x + y * 12]); + size_count_string += newValue; + for (S32 tab = 0; tab <= 8 - newValue.length(); tab++) + { + size_count_string += " "; + } + } + LL_INFOS() << size_count_string << LL_ENDL; + } + LL_INFOS() << header_break << LL_ENDL; + LL_INFOS() << header << LL_ENDL; // Size vs Size counts footer + LL_INFOS() << header_break << LL_ENDL; + + LL_INFOS() << "" << LL_ENDL; + + // This is the Discard Level Vs Size counts table + header = "Discard: "; + for (S32 x = 0; x < MAX_DISCARD_LEVEL * 2 + 2; x++) + { + std::string newValue = std::to_string(x - 1); + header += newValue; + for (S32 tab = 0; tab <= 8 - newValue.length(); tab++) + { + header += " "; + } + } + + LL_INFOS() << header_break << LL_ENDL; + LL_INFOS() << header << LL_ENDL; // Discard Level Vs Size counts header + LL_INFOS() << header_break << LL_ENDL; + + // Y Axis is the current possible max dimension of the textures (X or Y, which ever is larger is used) + for (S32 y = 0; y < 12; y++) + { + std::string newValue = std::to_string((S32)pow(2, y)); + std::string discard_count_string = "" + newValue; + for (S32 tab = 0; tab <= 8 - newValue.length(); tab++) + { + discard_count_string += " "; + } + // X Axis is the discard level starging from -1 up to 10 (2 x MAX_DISCARD_LEVEL + 1 (for negative number) + 1 additional for the fact that the last value actuauly used on not < but <=) + for (S32 x = 0; x < (MAX_DISCARD_LEVEL * 2 + 2); x++) + { + std::string newValue = std::to_string(discard_counts[x + y * (MAX_DISCARD_LEVEL * 2 + 2)]); + discard_count_string += newValue; + for (S32 tab = 0; tab <= 8 - newValue.length(); tab++) + { + discard_count_string += " "; + } + } + LL_INFOS() << discard_count_string << LL_ENDL; + } + LL_INFOS() << header_break << LL_ENDL; + LL_INFOS() << header << LL_ENDL; // Discard Level Vs Size counts footer + LL_INFOS() << header_break << LL_ENDL; // [FIRE-35081] } diff --git a/indra/newview/skins/default/xui/de/floater_vj_local_mesh.xml b/indra/newview/skins/default/xui/de/floater_vj_local_mesh.xml index 9557b17a71..9602c16041 100644 --- a/indra/newview/skins/default/xui/de/floater_vj_local_mesh.xml +++ b/indra/newview/skins/default/xui/de/floater_vj_local_mesh.xml @@ -11,6 +11,7 @@ + LOD-Suffixe: diff --git a/indra/newview/skins/default/xui/en/floater_vj_local_mesh.xml b/indra/newview/skins/default/xui/en/floater_vj_local_mesh.xml index 1ba0da24a9..0c96154bfc 100644 --- a/indra/newview/skins/default/xui/en/floater_vj_local_mesh.xml +++ b/indra/newview/skins/default/xui/en/floater_vj_local_mesh.xml @@ -114,7 +114,7 @@ width="300" label="Assume scale is in meters." tool_tip="Ignore the cm scale units used by tools such as Maya" /> - + Suffixes LOD : diff --git a/indra/newview/skins/default/xui/fr/menu_hide_navbar.xml b/indra/newview/skins/default/xui/fr/menu_hide_navbar.xml index 567ee88a2d..cf4b35d88e 100644 --- a/indra/newview/skins/default/xui/fr/menu_hide_navbar.xml +++ b/indra/newview/skins/default/xui/fr/menu_hide_navbar.xml @@ -9,6 +9,7 @@ + diff --git a/indra/newview/skins/default/xui/pl/floater_vj_local_mesh.xml b/indra/newview/skins/default/xui/pl/floater_vj_local_mesh.xml index 327d19e288..2f2008fe79 100644 --- a/indra/newview/skins/default/xui/pl/floater_vj_local_mesh.xml +++ b/indra/newview/skins/default/xui/pl/floater_vj_local_mesh.xml @@ -10,6 +10,7 @@ + Sufiksy LOD: diff --git a/indra/newview/skins/default/xui/pl/menu_hide_navbar.xml b/indra/newview/skins/default/xui/pl/menu_hide_navbar.xml index 14975e0d6e..fb223e4e14 100644 --- a/indra/newview/skins/default/xui/pl/menu_hide_navbar.xml +++ b/indra/newview/skins/default/xui/pl/menu_hide_navbar.xml @@ -1,15 +1,16 @@ - - - - - - - - - - - - + + + + + + + + + + + + + diff --git a/indra/newview/skins/default/xui/ru/floater_vj_local_mesh.xml b/indra/newview/skins/default/xui/ru/floater_vj_local_mesh.xml index fd20ea7791..0ce8603c7c 100644 --- a/indra/newview/skins/default/xui/ru/floater_vj_local_mesh.xml +++ b/indra/newview/skins/default/xui/ru/floater_vj_local_mesh.xml @@ -17,6 +17,9 @@ + Суффиксы LOD: diff --git a/indra/newview/skins/default/xui/ru/menu_hide_navbar.xml b/indra/newview/skins/default/xui/ru/menu_hide_navbar.xml index 07c5f12172..aaf1c3f7b5 100644 --- a/indra/newview/skins/default/xui/ru/menu_hide_navbar.xml +++ b/indra/newview/skins/default/xui/ru/menu_hide_navbar.xml @@ -9,6 +9,7 @@ + diff --git a/indra/newview/skins/default/xui/zh/floater_model_preview.xml b/indra/newview/skins/default/xui/zh/floater_model_preview.xml index f6f5c02a26..9325f3567a 100644 --- a/indra/newview/skins/default/xui/zh/floater_model_preview.xml +++ b/indra/newview/skins/default/xui/zh/floater_model_preview.xml @@ -397,7 +397,7 @@ - 細節層次字尾: + 細節層次後綴: 選擇標準或手動編輯... @@ -408,23 +408,23 @@ 最低: - + 較低: - + 中等: - + 高: - + 物理: - + 使用者自訂物理設定: diff --git a/indra/newview/skins/default/xui/zh/floater_phototools.xml b/indra/newview/skins/default/xui/zh/floater_phototools.xml index d592efeaab..c629ea81ae 100644 --- a/indra/newview/skins/default/xui/zh/floater_phototools.xml +++ b/indra/newview/skins/default/xui/zh/floater_phototools.xml @@ -397,7 +397,7 @@ - + 使用者界面輔助 diff --git a/indra/newview/skins/default/xui/zh/floater_vj_local_mesh.xml b/indra/newview/skins/default/xui/zh/floater_vj_local_mesh.xml index 8b77c683ba..e20b3c6496 100644 --- a/indra/newview/skins/default/xui/zh/floater_vj_local_mesh.xml +++ b/indra/newview/skins/default/xui/zh/floater_vj_local_mesh.xml @@ -12,10 +12,11 @@ + - 細節層次字尾: + 細節層次後綴: - + 當前的 SL標準 遊戲引擎標準 @@ -24,23 +25,23 @@ 最低: - + 較低: - + 中等: - + 較高: - + 物理: - +