Revert "FIRE-35081 - Blurry prims not changing with graphics settings, not happening with SL Viewer"
This reverts commit 1e31a5caf5.
master
parent
8ff76e0a32
commit
d76e6507f8
|
|
@ -63,10 +63,6 @@ LLGLTexture::~LLGLTexture()
|
|||
void LLGLTexture::init()
|
||||
{
|
||||
mBoostLevel = LLGLTexture::BOOST_NONE;
|
||||
// <FS:minerjr>
|
||||
// Added a previous boost level to allow for restorign boost after BOOST_SELECTED is applied
|
||||
mPrevBoostLevel = LLGLTexture::BOOST_NONE;
|
||||
// </FS:minerjr>
|
||||
|
||||
mFullWidth = 0;
|
||||
mFullHeight = 0;
|
||||
|
|
@ -95,11 +91,8 @@ void LLGLTexture::dump()
|
|||
mGLTexturep->dump();
|
||||
}
|
||||
}
|
||||
// <FS:minerjr>
|
||||
//void LLGLTexture::setBoostLevel(S32 level)
|
||||
// Changed Changed from S32 to S8, to give up space and use the difference for a previous value
|
||||
void LLGLTexture::setBoostLevel(S8 level)
|
||||
// </FS:minerjr>
|
||||
|
||||
void LLGLTexture::setBoostLevel(S32 level)
|
||||
{
|
||||
if(mBoostLevel != level)
|
||||
{
|
||||
|
|
@ -114,18 +107,6 @@ void LLGLTexture::setBoostLevel(S8 level)
|
|||
}
|
||||
}
|
||||
|
||||
// <FS:minerjr>
|
||||
// Changes the current boost level to the previous value
|
||||
void LLGLTexture::restoreBoostLevel()
|
||||
{
|
||||
mBoostLevel = mPrevBoostLevel;
|
||||
}
|
||||
// Stores the current boost level in a the previous boost.
|
||||
void LLGLTexture::storeBoostLevel()
|
||||
{
|
||||
mPrevBoostLevel = mBoostLevel;
|
||||
}
|
||||
// </FS:minerjr>
|
||||
void LLGLTexture::forceActive()
|
||||
{
|
||||
mTextureState = ACTIVE ;
|
||||
|
|
|
|||
|
|
@ -99,15 +99,8 @@ public:
|
|||
|
||||
virtual const LLUUID& getID() const;
|
||||
|
||||
// <FS:minerjr>
|
||||
//void setBoostLevel(S32 level);
|
||||
//S32 getBoostLevel() { return mBoostLevel; }
|
||||
// Updated to fix issue with BOOST_SELECTION forceing textures to BOOST_NONE after de-selection
|
||||
void setBoostLevel(S8 level);
|
||||
void restoreBoostLevel(); // Now restores the mBoostLevel with the mPrevBoostLevel
|
||||
void storeBoostLevel(); // Stores the current mBoostLevel in mPrevBoostLevel
|
||||
S8 getBoostLevel() { return mBoostLevel; }
|
||||
// </FS:minerjr>
|
||||
void setBoostLevel(S32 level);
|
||||
S32 getBoostLevel() { return mBoostLevel; }
|
||||
|
||||
S32 getFullWidth() const { return mFullWidth; }
|
||||
S32 getFullHeight() const { return mFullHeight; }
|
||||
|
|
@ -189,13 +182,7 @@ public:
|
|||
/*virtual*/ LLImageGL* getGLTexture() const ;
|
||||
|
||||
protected:
|
||||
// <FS:minerjr>
|
||||
//S32 mBoostLevel; // enum describing priority level
|
||||
// Modified to store the previous boost level, as well, boost only go up to 30, so a 32 bit int is a waste and the extra bits
|
||||
// can be used to store a previous value to allow for restoring the boost value after the BOOST_SELECTED is undone.
|
||||
S8 mBoostLevel; // enum describing priority level
|
||||
S8 mPrevBoostLevel; // enum describing priority level (Previous Value for BOOST_SELECTION restore)
|
||||
// </FS:minerjr>
|
||||
S32 mBoostLevel; // enum describing priority level
|
||||
U32 mFullWidth;
|
||||
U32 mFullHeight;
|
||||
bool mUseMipMaps;
|
||||
|
|
|
|||
|
|
@ -711,22 +711,19 @@ void LLGLTexMemBar::draw()
|
|||
//text = llformat("Textures: %d Fetch: %d(%d) Pkts:%d(%d) Cache R/W: %d/%d LFS:%d RAW:%d HTP:%d DEC:%d CRE:%d ",
|
||||
text = llformat("Tex: %d Fetch: %d(%d) Pkts:%d(%d) CAC R/W: %d/%d LFS:%d RAW:%d HTP:%d DEC:%d CRE:%d FCA:%d ",
|
||||
// </FS:Ansariel>
|
||||
// <FS:minerjr> [FIRE-35081] Blurry prims not changing with graphics settings, not happening with SL Viewer
|
||||
// Fixed up the data alignment for 32bit/64bit values as well as re-added the packet count back
|
||||
gTextureList.getNumImages(),
|
||||
LLAppViewer::getTextureFetch()->getNumRequests(), LLAppViewer::getTextureFetch()->getNumDeletes(),
|
||||
LLAppViewer::getTextureFetch()->mPacketCount, LLAppViewer::getTextureFetch()->mBadPacketCount,
|
||||
LLAppViewer::getTextureCache()->getNumReads(), LLAppViewer::getTextureCache()->getNumWrites(),
|
||||
(S32)LLLFSThread::sLocal->getPending(),
|
||||
(S32)LLImageRaw::sRawImageCount,
|
||||
LLLFSThread::sLocal->getPending(),
|
||||
LLImageRaw::sRawImageCount,
|
||||
LLAppViewer::getTextureFetch()->getNumHTTPRequests(),
|
||||
(S32)LLAppViewer::getImageDecodeThread()->getPending(),
|
||||
LLAppViewer::getImageDecodeThread()->getPending(),
|
||||
// <FS:Ansariel> Fast cache stats
|
||||
//gTextureList.mCreateTextureList.size());
|
||||
(S32)gTextureList.mCreateTextureList.size(),
|
||||
(S32)gTextureList.mFastCacheList.size());
|
||||
gTextureList.mCreateTextureList.size(),
|
||||
gTextureList.mFastCacheList.size());
|
||||
// </FS:Ansariel>
|
||||
// </FS:minerjr>
|
||||
|
||||
x_right = 550.0f;
|
||||
LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0.f, (F32)(v_offset + line_height*3),
|
||||
text_color, LLFontGL::LEFT, LLFontGL::TOP,
|
||||
|
|
|
|||
|
|
@ -4192,14 +4192,6 @@ void LLViewerObject::boostTexturePriority(bool boost_children /* = true */)
|
|||
S32 tex_count = getNumTEs();
|
||||
for (i = 0; i < tex_count; i++)
|
||||
{
|
||||
// <FS:minerjr> [FIRE-35081] Blurry prims not changing with graphics settings, not happening with SL Viewer
|
||||
// This isused to fix the textures becoming blury when object interacted with by the user and unselected.
|
||||
// If this is changing the boost level for the TEImage for the first time, store the boost level before modifying it.
|
||||
if (getTEImage(i)->getBoostLevel() != LLGLTexture::BOOST_SELECTED)
|
||||
{
|
||||
getTEImage(i)->storeBoostLevel();
|
||||
}
|
||||
// </FS:minerjr>
|
||||
getTEImage(i)->setBoostLevel(LLGLTexture::BOOST_SELECTED);
|
||||
}
|
||||
|
||||
|
|
@ -4207,17 +4199,7 @@ void LLViewerObject::boostTexturePriority(bool boost_children /* = true */)
|
|||
{
|
||||
LLSculptParams *sculpt_params = (LLSculptParams *)getParameterEntry(LLNetworkData::PARAMS_SCULPT);
|
||||
LLUUID sculpt_id = sculpt_params->getSculptTexture();
|
||||
// <FS:minerjr> [FIRE-35081] Blurry prims not changing with graphics settings, not happening with SL Viewer
|
||||
//LLViewerTextureManager::getFetchedTexture(sculpt_id, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE)->setBoostLevel(LLGLTexture::BOOST_SELECTED);
|
||||
// This isused to fix the textures becoming blury when object interacted with by the user and unselected.
|
||||
// If this is changing the boost level for the sculpted for the first time, store the boost level before modifying it.
|
||||
LLViewerFetchedTexture* sculptedTexture = LLViewerTextureManager::getFetchedTexture(sculpt_id, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
|
||||
if (sculptedTexture->getBoostLevel() != LLGLTexture::BOOST_SELECTED)
|
||||
{
|
||||
sculptedTexture->storeBoostLevel();
|
||||
}
|
||||
sculptedTexture->setBoostLevel(LLGLTexture::BOOST_SELECTED);
|
||||
// </FS:minerjr>
|
||||
LLViewerTextureManager::getFetchedTexture(sculpt_id, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE)->setBoostLevel(LLGLTexture::BOOST_SELECTED);
|
||||
}
|
||||
|
||||
if (boost_children)
|
||||
|
|
|
|||
|
|
@ -90,9 +90,6 @@ S32 LLViewerTexture::sRawCount = 0;
|
|||
S32 LLViewerTexture::sAuxCount = 0;
|
||||
LLFrameTimer LLViewerTexture::sEvaluationTimer;
|
||||
F32 LLViewerTexture::sDesiredDiscardBias = 0.f;
|
||||
// <FS:minerjr> [FIRE-35081] Blurry prims not changing with graphics settings, not happening with SL Viewer
|
||||
F32 LLViewerTexture::sPrevDesiredDiscardBias = 0.f;
|
||||
// </FS:minerjr> [FIRE-35081]
|
||||
|
||||
S32 LLViewerTexture::sMaxSculptRez = 128; //max sculpt image size
|
||||
constexpr S32 MAX_CACHED_RAW_IMAGE_AREA = 64 * 64;
|
||||
|
|
@ -542,10 +539,6 @@ void LLViewerTexture::updateClass()
|
|||
static bool was_low = false;
|
||||
static bool was_sys_low = false;
|
||||
|
||||
// <FS:minerjr> [FIRE-35081] Blurry prims not changing with graphics settings, not happening with SL Viewer
|
||||
// Store the previous desired discard bias to control the bias recovery
|
||||
sPrevDesiredDiscardBias = sDesiredDiscardBias;
|
||||
// </FS:minerjr> [FIRE-35081]
|
||||
if (is_low && !was_low)
|
||||
{
|
||||
// slam to 1.5 bias the moment we hit low memory (discards off screen textures immediately)
|
||||
|
|
@ -583,17 +576,12 @@ void LLViewerTexture::updateClass()
|
|||
// don't execute above until the slam to 1.5 has a chance to take effect
|
||||
sEvaluationTimer.reset();
|
||||
|
||||
// lower discard bias over time when at least 10% of budget is free
|
||||
// <FS:minerjr> [FIRE-35081] Blurry prims not changing with graphics settings, not happening with SL Viewer
|
||||
//if (sDesiredDiscardBias > 1.f && over_pct < 0.f)
|
||||
const F32 FREE_PERCENTAGE_TRESHOLD = -0.1f; // Added code from Mainline LL for thier 'Fix'
|
||||
if (sDesiredDiscardBias > 1.f && over_pct < FREE_PERCENTAGE_TRESHOLD) // Added code from Mainline LL for thier 'Fix'
|
||||
// lower discard bias over time when free memory is available
|
||||
if (sDesiredDiscardBias > 1.f && over_pct < 0.f)
|
||||
{
|
||||
static LLCachedControl<F32> high_mem_discard_decrement(gSavedSettings, "RenderHighMemMinDiscardDecrement", .1f);
|
||||
|
||||
//F32 decrement = high_mem_discard_decrement - llmin(over_pct, 0.1f);
|
||||
F32 decrement = high_mem_discard_decrement - llmin(over_pct - FREE_PERCENTAGE_TRESHOLD, 0.f); // Added code from Mainline LL for thier 'Fix'
|
||||
// </FS:minerjr> [FIRE-35081]
|
||||
F32 decrement = high_mem_discard_decrement - llmin(over_pct, 0.f);
|
||||
sDesiredDiscardBias -= decrement * gFrameIntervalSeconds;
|
||||
}
|
||||
}
|
||||
|
|
@ -715,10 +703,6 @@ void LLViewerTexture::init(bool firstinit)
|
|||
mMaxVirtualSizeResetCounter = mMaxVirtualSizeResetInterval;
|
||||
mParcelMedia = NULL;
|
||||
|
||||
// <FS:minerjr> [FIRE-35081] Blurry prims not changing with graphics settings, not happening with SL Viewer
|
||||
// Added default value fro the boost as it seemed that there were some instances boost was not being initalized.
|
||||
mBoostLevel = LLGLTexture::BOOST_NONE;
|
||||
// </FS:minerjr>
|
||||
memset(&mNumVolumes, 0, sizeof(U32)* LLRender::NUM_VOLUME_TEXTURE_CHANNELS);
|
||||
mVolumeList[LLRender::LIGHT_TEX].clear();
|
||||
mVolumeList[LLRender::SCULPT_TEX].clear();
|
||||
|
|
@ -764,11 +748,7 @@ void LLViewerTexture::dump()
|
|||
<< LL_ENDL;
|
||||
}
|
||||
|
||||
// <FS:minerjr> [FIRE-35081] Blurry prims not changing with graphics settings, not happening with SL Viewer
|
||||
//void LLViewerTexture::setBoostLevel(S32 level)
|
||||
// Reduced the amount of data used for storing the boost level
|
||||
void LLViewerTexture::setBoostLevel(S8 level)
|
||||
// <FS:minejr>
|
||||
void LLViewerTexture::setBoostLevel(S32 level)
|
||||
{
|
||||
if(mBoostLevel != level)
|
||||
{
|
||||
|
|
@ -1192,10 +1172,6 @@ void LLViewerFetchedTexture::init(bool firstinit)
|
|||
mLastCallBackActiveTime = 0.f;
|
||||
mForceCallbackFetch = false;
|
||||
|
||||
// <FS:minerjr> [FIRE-35081] Blurry prims not changing with graphics settings, not happening with SL Viewer
|
||||
// Added default for boost level
|
||||
mBoostLevel = LLGLTexture::BOOST_NONE;
|
||||
// </FS:minerjr>
|
||||
mFTType = FTT_UNKNOWN;
|
||||
}
|
||||
|
||||
|
|
@ -1840,13 +1816,6 @@ void LLViewerFetchedTexture::processTextureStats()
|
|||
mFullyLoaded = false;
|
||||
}
|
||||
}
|
||||
|
||||
// selection manager will immediately reset BOOST_SELECTED but never unsets it
|
||||
// unset it immediately after we consume it
|
||||
if (getBoostLevel() == BOOST_SELECTED)
|
||||
{
|
||||
restoreBoostLevel();
|
||||
}
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
|
|
@ -1885,7 +1854,7 @@ bool LLViewerFetchedTexture::isActiveFetching()
|
|||
return mFetchState > 8 && mFetchState < 11 && monitor_enabled; //in state of WAIT_HTTP_REQ or DECODE_IMAGE.
|
||||
}
|
||||
|
||||
void LLViewerFetchedTexture::setBoostLevel(S8 level)
|
||||
void LLViewerFetchedTexture::setBoostLevel(S32 level)
|
||||
{
|
||||
LLViewerTexture::setBoostLevel(level);
|
||||
|
||||
|
|
@ -3028,10 +2997,6 @@ void LLViewerLODTexture::init(bool firstinit)
|
|||
mTexelsPerImage = 64*64;
|
||||
mDiscardVirtualSize = 0.f;
|
||||
mCalculatedDiscardLevel = -1.f;
|
||||
// <FS:minerjr> [FIRE-35081] Blurry prims not changing with graphics settings, not happening with SL Viewer
|
||||
// Added default value fro the boost as it seemed that there were some instances boost was not being initalized.
|
||||
mBoostLevel = LLGLTexture::BOOST_NONE;
|
||||
// </FS:minerjr>
|
||||
}
|
||||
|
||||
//virtual
|
||||
|
|
@ -3166,7 +3131,7 @@ void LLViewerLODTexture::processTextureStats()
|
|||
// unset it immediately after we consume it
|
||||
if (getBoostLevel() == BOOST_SELECTED)
|
||||
{
|
||||
restoreBoostLevel();
|
||||
setBoostLevel(BOOST_NONE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -137,13 +137,8 @@ public:
|
|||
/*virtual*/ bool isActiveFetching();
|
||||
|
||||
/*virtual*/ const LLUUID& getID() const { return mID; }
|
||||
// <FS:minerjr> [FIRE-35081] Blurry prims not changing with graphics settings, not happening with SL Viewer
|
||||
//virtual void setBoostLevel(S32 level);
|
||||
//S32 getBoostLevel() { return mBoostLevel; }
|
||||
// Updated to only use S8 instead of S32 to allow for extra S8 to store old boost level
|
||||
virtual void setBoostLevel(S8 level);
|
||||
S8 getBoostLevel() { return mBoostLevel; }
|
||||
// </FS:minerjr> [FIRE-35081]
|
||||
virtual void setBoostLevel(S32 level);
|
||||
S32 getBoostLevel() { return mBoostLevel; }
|
||||
void setTextureListType(S32 tex_type) { mTextureListType = tex_type; }
|
||||
S32 getTextureListType() { return mTextureListType; }
|
||||
|
||||
|
|
@ -231,11 +226,6 @@ public:
|
|||
static S32 sAuxCount;
|
||||
static LLFrameTimer sEvaluationTimer;
|
||||
static F32 sDesiredDiscardBias;
|
||||
// <FS:minerjr>
|
||||
// Added a previous value for the desired discard value, as it can become stuck at a higher value and
|
||||
// we wnat to reduce the nubmer of textures being processed at that state (IE steady state)
|
||||
static F32 sPrevDesiredDiscardBias;
|
||||
// </FS:minerjr> [FIRE-35081]
|
||||
static S32 sMaxSculptRez ;
|
||||
static U32 sMinLargeImageSize ;
|
||||
static U32 sMaxSmallImageSize ;
|
||||
|
|
@ -376,11 +366,7 @@ public:
|
|||
S32 getDesiredDiscardLevel() { return mDesiredDiscardLevel; }
|
||||
void setMinDiscardLevel(S32 discard) { mMinDesiredDiscardLevel = llmin(mMinDesiredDiscardLevel,(S8)discard); }
|
||||
|
||||
// <FS:minerjr>
|
||||
//void setBoostLevel(S32 level) override;
|
||||
// Updated to use only S8 value for boost level
|
||||
void setBoostLevel(S8 level) override;
|
||||
// </FS:minerjr> [FIRE-35081]
|
||||
void setBoostLevel(S32 level) override;
|
||||
bool updateFetch();
|
||||
|
||||
void clearFetchedResults(); //clear all fetched results, for debug use.
|
||||
|
|
|
|||
|
|
@ -919,23 +919,6 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag
|
|||
// convert bias into a vsize scaler
|
||||
bias = (F32) llroundf(powf(4, bias - 1.f));
|
||||
|
||||
// <FS:minerjr>
|
||||
// Added checks to not apply bias to non LOD textures
|
||||
switch (imagep->getType())
|
||||
{
|
||||
case LLViewerTexture::LOCAL_TEXTURE:
|
||||
case LLViewerTexture::MEDIA_TEXTURE:
|
||||
case LLViewerTexture::DYNAMIC_TEXTURE:
|
||||
case LLViewerTexture::FETCHED_TEXTURE:
|
||||
bias = 1.00f;
|
||||
break;
|
||||
}
|
||||
// Also don't bias textures what are close to the screen or recently close to the screen.
|
||||
if (imagep->getDontDiscard() || imagep->getDiscardLevel() == 0 || imagep->getDiscardLevel() == 1)
|
||||
{
|
||||
bias = 1.00f;
|
||||
}
|
||||
// </FS:minerjr> [FIRE-35081]
|
||||
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
|
||||
for (U32 i = 0; i < LLRender::NUM_TEXTURE_CHANNELS; ++i)
|
||||
{
|
||||
|
|
@ -1003,12 +986,9 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag
|
|||
{ // conditionally reset max virtual size for unboosted LOD_TEXTURES
|
||||
// this is an alternative to decaying mMaxVirtualSize over time
|
||||
// that keeps textures from continously downrezzing and uprezzing in the background
|
||||
// <FS:minerjr> [FIRE-35081] Blurry prims not changing with graphics settings, not happening with SL Viewer
|
||||
//if (LLViewerTexture::sDesiredDiscardBias > 1.5f ||
|
||||
// (!on_screen && LLViewerTexture::sDesiredDiscardBias > 1.f))
|
||||
if ((LLViewerTexture::sDesiredDiscardBias > 1.5f || (!on_screen && LLViewerTexture::sDesiredDiscardBias > 1.f))
|
||||
&& !(imagep->getDontDiscard() || imagep->getDiscardLevel() == 0 || imagep->getDiscardLevel() == 1))// Added checks to not force scale down recently close to camera textures
|
||||
// </FS:minerjr> [FIRE-35081]
|
||||
|
||||
if (LLViewerTexture::sDesiredDiscardBias > 1.5f ||
|
||||
(!on_screen && LLViewerTexture::sDesiredDiscardBias > 1.f))
|
||||
{
|
||||
imagep->mMaxVirtualSize = 0.f;
|
||||
}
|
||||
|
|
@ -1114,12 +1094,7 @@ F32 LLViewerTextureList::updateImagesCreateTextures(F32 max_time)
|
|||
imagep->mCreatePending = false;
|
||||
mCreateTextureList.pop();
|
||||
|
||||
// <FS:minerjr> [FIRE-35081] Blurry prims not changing with graphics settings, not happening with SL Viewer
|
||||
//if (imagep->hasGLTexture() && imagep->getDiscardLevel() < imagep->getDesiredDiscardLevel())
|
||||
// Added checks to only downscale LOD_TEXTUREs that are not boost_high to match the Decode Priority
|
||||
// This saves a bunch of texture size contension.
|
||||
if (imagep->hasGLTexture() && imagep->getDiscardLevel() < imagep->getDesiredDiscardLevel()
|
||||
&& imagep->getType() == LLViewerTexture::LOD_TEXTURE && imagep->getBoostLevel() < LLViewerTexture::BOOST_HIGH)
|
||||
if (imagep->hasGLTexture() && imagep->getDiscardLevel() < imagep->getDesiredDiscardLevel())
|
||||
{
|
||||
// NOTE: this may happen if the desired discard reduces while a decode is in progress and does not
|
||||
// necessarily indicate a problem, but if log occurrences excede that of dsiplay_stats: FPS,
|
||||
|
|
@ -1239,11 +1214,7 @@ F32 LLViewerTextureList::updateImagesFetchTextures(F32 max_time)
|
|||
|
||||
//update MIN_UPDATE_COUNT or 5% of other textures, whichever is greater
|
||||
update_count = llmax((U32) MIN_UPDATE_COUNT, (U32) mUUIDMap.size()/20);
|
||||
// <FS:minerjr> [FIRE-35081] Blurry prims not changing with graphics settings, not happening with SL Viewer
|
||||
//if (LLViewerTexture::sDesiredDiscardBias > 1.f)
|
||||
// Prevent the steady state of the high discard from keep using a high number of textures to process
|
||||
if (LLViewerTexture::sDesiredDiscardBias > 1.f && LLViewerTexture::sDesiredDiscardBias > LLViewerTexture::sPrevDesiredDiscardBias)
|
||||
// </FS:minerjr> [FIRE-35081]
|
||||
if (LLViewerTexture::sDesiredDiscardBias > 1.f)
|
||||
{
|
||||
// we are over memory target, update more agresively
|
||||
update_count = (S32)(update_count * LLViewerTexture::sDesiredDiscardBias);
|
||||
|
|
|
|||
Loading…
Reference in New Issue