Texfetch/cache changes:
Added SEND_UDP_REQ and WAIT_UDP_REQ fetch states. Parse 'content-range' from headers. Purge 'complete' textures from the cache if they lack 'end of codestream' marker. Added boostlevel/category to textureview display. More diagnostic output. Discard handling tweaks/bugfixes from v3.
This commit is contained in:
@@ -81,7 +81,7 @@ static std::string title_string1a("Tex UUID Area DDis(Req) DecodePri(Fetch)
|
||||
static std::string title_string1b("Tex UUID Area DDis(Req) Fetch(DecodePri) [download] pk/max");
|
||||
static std::string title_string2("State");
|
||||
static std::string title_string3("Pkt Bnd");
|
||||
static std::string title_string4(" W x H (Dis) Mem");
|
||||
static std::string title_string4(" W x H (Dis) Mem Type");
|
||||
|
||||
static S32 title_x1 = 0;
|
||||
static S32 title_x2 = 460;
|
||||
@@ -211,6 +211,9 @@ void LLTextureBar::draw()
|
||||
std::string uuid_str;
|
||||
mImagep->mID.toString(uuid_str);
|
||||
uuid_str = uuid_str.substr(0,7);
|
||||
|
||||
std::string vsstr = llformat("%f",mImagep->mMaxVirtualSize);
|
||||
std::string dpstr = llformat("%f",mImagep->getDecodePriority());
|
||||
if (mTextureView->mOrderFetch)
|
||||
{
|
||||
tex_str = llformat("%s %7.0f %d(%d) 0x%08x(%8.0f)",
|
||||
@@ -223,14 +226,14 @@ void LLTextureBar::draw()
|
||||
}
|
||||
else
|
||||
{
|
||||
tex_str = llformat("%s %7.0f %d(%d) %8.0f(0x%08x) %1.2f",
|
||||
tex_str = llformat("%s %7.0f %d(%d) %8.0f(0x%08x) %3d%%",
|
||||
uuid_str.c_str(),
|
||||
mImagep->mMaxVirtualSize,
|
||||
mImagep->mDesiredDiscardLevel,
|
||||
mImagep->mRequestedDiscardLevel,
|
||||
mImagep->getDecodePriority(),
|
||||
mImagep->mFetchPriority,
|
||||
mImagep->mDownloadProgress);
|
||||
llfloor(mImagep->mDownloadProgress*100.f));
|
||||
}
|
||||
|
||||
LLFontGL::getFontMonospace()->renderUTF8(tex_str, 0, title_x1, getRect().getHeight(),
|
||||
@@ -239,12 +242,14 @@ void LLTextureBar::draw()
|
||||
// State
|
||||
// Hack: mirrored from lltexturefetch.cpp
|
||||
struct { const std::string desc; LLColor4 color; } fetch_state_desc[] = {
|
||||
{ "---", LLColor4::red }, // INVALID
|
||||
{ "-?-", LLColor4::red }, // INVALID
|
||||
{ "INI", LLColor4::white }, // INIT
|
||||
{ "DSK", LLColor4::cyan }, // LOAD_FROM_TEXTURE_CACHE
|
||||
{ "DSK", LLColor4::blue }, // CACHE_POST
|
||||
{ "NET", LLColor4::green }, // LOAD_FROM_NETWORK
|
||||
{ "SIM", LLColor4::green }, // LOAD_FROM_SIMULATOR
|
||||
{ "REQ", LLColor4::magenta },// SEND_UDP_REQ
|
||||
{ "UDP", LLColor4::cyan }, // WAIT_UDP_REQ
|
||||
{ "REQ", LLColor4::yellow },// SEND_HTTP_REQ
|
||||
{ "HTP", LLColor4::green }, // WAIT_HTTP_REQ
|
||||
{ "DEC", LLColor4::yellow },// DECODE_IMAGE
|
||||
@@ -252,12 +257,12 @@ void LLTextureBar::draw()
|
||||
{ "WRT", LLColor4::purple },// WRITE_TO_CACHE
|
||||
{ "WRT", LLColor4::orange },// WAIT_ON_WRITE
|
||||
{ "END", LLColor4::red }, // DONE
|
||||
#define LAST_STATE 12
|
||||
#define LAST_STATE 14
|
||||
{ "CRE", LLColor4::magenta }, // LAST_STATE+1
|
||||
{ "FUL", LLColor4::green }, // LAST_STATE+2
|
||||
{ "BAD", LLColor4::red }, // LAST_STATE+3
|
||||
{ "MIS", LLColor4::red }, // LAST_STATE+4
|
||||
{ "---", LLColor4::white }, // LAST_STATE+5
|
||||
{ "-!-", LLColor4::white }, // LAST_STATE+5
|
||||
};
|
||||
const S32 fetch_state_desc_size = (S32)LL_ARRAY_SIZE(fetch_state_desc);
|
||||
S32 state =
|
||||
@@ -370,8 +375,39 @@ void LLTextureBar::draw()
|
||||
|
||||
// draw the image size at the end
|
||||
{
|
||||
std::string num_str = llformat("%3dx%3d (%d) %7d", mImagep->getWidth(), mImagep->getHeight(),
|
||||
mImagep->getDiscardLevel(), mImagep->hasGLTexture() ? mImagep->getTextureMemory() : 0);
|
||||
std::string boost_lvl("UNKNOWN");
|
||||
switch(mImagep->getBoostLevel())
|
||||
{
|
||||
#define BOOST_LVL(type) case LLGLTexture::BOOST_##type: boost_lvl="B_"#type; break;
|
||||
#define CAT_LVL(type) case LLGLTexture::type: boost_lvl=#type; break;
|
||||
BOOST_LVL(NONE)
|
||||
BOOST_LVL(AVATAR_BAKED)
|
||||
BOOST_LVL(AVATAR)
|
||||
BOOST_LVL(CLOUDS)
|
||||
BOOST_LVL(SCULPTED)
|
||||
BOOST_LVL(HIGH)
|
||||
BOOST_LVL(BUMP)
|
||||
BOOST_LVL(TERRAIN)
|
||||
BOOST_LVL(SELECTED)
|
||||
BOOST_LVL(AVATAR_BAKED_SELF)
|
||||
BOOST_LVL(AVATAR_SELF)
|
||||
BOOST_LVL(SUPER_HIGH)
|
||||
BOOST_LVL(HUD)
|
||||
BOOST_LVL(ICON)
|
||||
BOOST_LVL(UI)
|
||||
BOOST_LVL(PREVIEW)
|
||||
BOOST_LVL(MAP)
|
||||
BOOST_LVL(MAP_VISIBLE)
|
||||
CAT_LVL(LOCAL)
|
||||
CAT_LVL(AVATAR_SCRATCH_TEX)
|
||||
CAT_LVL(DYNAMIC_TEX)
|
||||
CAT_LVL(MEDIA)
|
||||
CAT_LVL(OTHER)
|
||||
CAT_LVL(MAX_GL_IMAGE_CATEGORY)
|
||||
default:;
|
||||
};
|
||||
std::string num_str = llformat("%4dx%4d (%+d) %7d %s", mImagep->getWidth(), mImagep->getHeight(),
|
||||
mImagep->getDiscardLevel(), mImagep->hasGLTexture() ? mImagep->getTextureMemory() : 0, boost_lvl.c_str());
|
||||
LLFontGL::getFontMonospace()->renderUTF8(num_str, 0, title_x4, getRect().getHeight(), color,
|
||||
LLFontGL::LEFT, LLFontGL::TOP);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user