UpdatedLLViewerTextureList::dump() to have boost level vs. size
Updated the LLViewerTextureList::dump() to support tracking the # of textures at all possible boost levels vs. b 12 possible sizes Cleaned up the code a bit for the headers to scale to the width of the tablemaster
parent
a12c4e4857
commit
e001d0f6e1
|
|
@ -391,6 +391,7 @@ void LLViewerTextureList::dump()
|
|||
std::array<S32, MAX_DISCARD_LEVEL * 2 + 2> 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<S32, 12 * 12> size_counts{0}; // Track the 12 possible sizes (1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048)
|
||||
std::array<S32, (MAX_DISCARD_LEVEL * 2 + 2) * 12> 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<S32, LLViewerTexture::BOOST_MAX_LEVEL * 12> 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...
|
||||
|
||||
// </FS:minerjr> [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());
|
||||
// </FS:minerjr> [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;
|
||||
|
||||
// </FS:minerjr> [FIRE-35081]
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue