diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 632a37bae3..362f2f61a2 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -391,6 +391,7 @@ void LLViewerTextureList::dump() 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) + std::array boost_counts{0}; // Track the # of textures at boost levels by 12 possible sizes // Don't Init the buffers with 0's like it's the the 1980's... // [FIRE-35081] @@ -432,7 +433,9 @@ void LLViewerTextureList::dump() 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; + S32 max_dimension = (y_index > x_index ? y_index : x_index); + discard_counts[(image->getDiscardLevel() + 1) + max_dimension * (MAX_DISCARD_LEVEL * 2 + 2)] += 1; + boost_counts[image->getBoostLevel() + max_dimension * (LLViewerTexture::BOOST_MAX_LEVEL)] += 1; texture_count++; textures_close_to_camera += S32(image->getCloseToCamera()); // [FIRE-35081] @@ -510,6 +513,12 @@ void LLViewerTextureList::dump() } } + header_break = ""; + for (S32 x = 0; x < header.length(); x++) + { + header_break += "-"; + } + LL_INFOS() << header_break << LL_ENDL; LL_INFOS() << header << LL_ENDL; // Discard Level Vs Size counts header LL_INFOS() << header_break << LL_ENDL; @@ -538,6 +547,54 @@ void LLViewerTextureList::dump() LL_INFOS() << header_break << LL_ENDL; LL_INFOS() << header << LL_ENDL; // Discard Level Vs Size counts footer LL_INFOS() << header_break << LL_ENDL; + + // This is the Boost Level Vs Size counts table + header = "Boost: "; + for (S32 x = 0; x < LLViewerTexture::BOOST_MAX_LEVEL; x++) + { + std::string newValue = std::to_string(x); + header += newValue; + for (S32 tab = 0; tab <= 8 - newValue.length(); tab++) + { + header += " "; + } + } + + header_break = ""; + for (S32 x = 0; x < header.length(); x++) + { + header_break += "-"; + } + + LL_INFOS() << header_break << LL_ENDL; + LL_INFOS() << header << LL_ENDL; // Boost 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 boost_count_string = "" + newValue; + for (S32 tab = 0; tab <= 8 - newValue.length(); tab++) + { + boost_count_string += " "; + } + // X Axis is the boost level starging from BOOST_NONE up to BOOST_MAX_LEVEL + for (S32 x = 0; x < (LLViewerTexture::BOOST_MAX_LEVEL); x++) + { + std::string newValue = std::to_string(boost_counts[x + y * (LLViewerTexture::BOOST_MAX_LEVEL)]); + boost_count_string += newValue; + for (S32 tab = 0; tab <= 8 - newValue.length(); tab++) + { + boost_count_string += " "; + } + } + LL_INFOS() << boost_count_string << LL_ENDL; + } + LL_INFOS() << header_break << LL_ENDL; + LL_INFOS() << header << LL_ENDL; // Boost Level Vs Size counts footer + LL_INFOS() << header_break << LL_ENDL; + // [FIRE-35081] }