From 5259fa811c11892ef150f853c9de5a8927fa68a6 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Mon, 6 Jun 2022 21:12:48 -0500 Subject: SL-17486 Force desired discard level to 0 for high boosted textures (fix for fuzzy terrain textures etc). --- indra/newview/llviewertexture.cpp | 10 ++++++++++ indra/newview/llviewertexture.h | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 0544bceb9f..2eb36a42be 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -1884,6 +1884,16 @@ bool LLViewerFetchedTexture::isActiveFetching() return mFetchState > 7 && mFetchState < 10 && monitor_enabled; //in state of WAIT_HTTP_REQ or DECODE_IMAGE. } +void LLViewerFetchedTexture::setBoostLevel(S32 level) +{ + LLViewerTexture::setBoostLevel(level); + + if (level >= LLViewerTexture::BOOST_HIGH) + { + mDesiredDiscardLevel = 0; + } +} + bool LLViewerFetchedTexture::updateFetch() { LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index a5e5c37c22..f3bc9061a2 100644 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -134,7 +134,7 @@ public: /*virtual*/ bool isActiveFetching(); /*virtual*/ const LLUUID& getID() const { return mID; } - void setBoostLevel(S32 level); + virtual void setBoostLevel(S32 level); S32 getBoostLevel() { return mBoostLevel; } void setTextureListType(S32 tex_type) { mTextureListType = tex_type; } S32 getTextureListType() { return mTextureListType; } @@ -343,6 +343,7 @@ public: S32 getDesiredDiscardLevel() { return mDesiredDiscardLevel; } void setMinDiscardLevel(S32 discard) { mMinDesiredDiscardLevel = llmin(mMinDesiredDiscardLevel,(S8)discard); } + void setBoostLevel(S32 level) override; bool updateFetch(); bool setDebugFetching(S32 debug_level); bool isInDebug() const { return mInDebug; } -- cgit v1.2.3