summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2016-04-21 14:47:09 -0400
committerOz Linden <oz@lindenlab.com>2016-04-21 14:47:09 -0400
commit185aeb2dcc6953b86e25dcb1c3727e7f1255acbc (patch)
tree8db1d05fe83754720a54054abf9d4dbebfaadaa9 /indra/newview
parent56ca48390535f543456a0b59365b428198414d4f (diff)
parent503dc6ee656bdf579107ff9712ae8e960dd91100 (diff)
Merged in ruslantproductengine/ruslanteliuk-391-blizzard (pull request #30)
MAINT-6317 [QuickGraphics-RC] Some rigged mesh attachments render fully on jellybaby avatars when ALM is enabled
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llappviewer.h1
-rw-r--r--indra/newview/lldrawpoolavatar.cpp10
-rw-r--r--indra/newview/llviewertexture.cpp1
-rw-r--r--indra/newview/llviewertexture.h6
-rw-r--r--indra/newview/llviewertexturelist.cpp8
5 files changed, 18 insertions, 8 deletions
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index 539881c80e..b5e674bd7b 100644
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -410,6 +410,7 @@ extern BOOL gPrintMessagesThisFrame;
extern LLUUID gSunTextureID;
extern LLUUID gMoonTextureID;
+extern LLUUID gBlackSquareID;
extern BOOL gRandomizeFramerate;
extern BOOL gPeriodicSlowFrame;
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index d4f37e51ef..f44e19dbe4 100644
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -50,6 +50,7 @@
#include "llrendersphere.h"
#include "llviewerpartsim.h"
#include "llviewercontrol.h" // for gSavedSettings
+#include "llviewertexturelist.h"
static U32 sDataMask = LLDrawPoolAvatar::VERTEX_DATA_MASK;
static U32 sBufferUsage = GL_STREAM_DRAW_ARB;
@@ -63,6 +64,7 @@ BOOL LLDrawPoolAvatar::sSkipTransparent = FALSE;
S32 LLDrawPoolAvatar::sDiffuseChannel = 0;
F32 LLDrawPoolAvatar::sMinimumAlpha = 0.2f;
+LLUUID gBlackSquareID;
static bool is_deferred_render = false;
static bool is_post_deferred_render = false;
@@ -1811,12 +1813,8 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
LLViewerTexture* specular = NULL;
if (LLPipeline::sImpostorRender)
{
- std::vector<LLViewerFetchedTexture*> found;
- LLViewerTextureManager::findFetchedTextures(IMG_BLACK_SQUARE, found);
- if (1 <= found.size())
- {
- specular = found[0];
- }
+ specular = LLViewerTextureManager::findFetchedTexture(gBlackSquareID, TEX_LIST_DISCARD);
+ llassert(NULL != specular);
}
else
{
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index e2b8ff8e80..5a38ab5c9d 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -1117,6 +1117,7 @@ void LLViewerFetchedTexture::init(bool firstinit)
mLastCallBackActiveTime = 0.f;
mForceCallbackFetch = FALSE;
mInDebug = FALSE;
+ mUnremovable = FALSE;
mFTType = FTT_UNKNOWN;
}
diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h
index a3f8db6907..8017d82604 100644
--- a/indra/newview/llviewertexture.h
+++ b/indra/newview/llviewertexture.h
@@ -346,7 +346,10 @@ public:
bool updateFetch();
bool setDebugFetching(S32 debug_level);
- bool isInDebug() {return mInDebug;}
+ bool isInDebug() const { return mInDebug; }
+
+ void setUnremovable(BOOL value) { mUnremovable = value; }
+ bool isUnremovable() const { return mUnremovable; }
void clearFetchedResults(); //clear all fetched results, for debug use.
@@ -435,6 +438,7 @@ private:
private:
BOOL mFullyLoaded;
BOOL mInDebug;
+ BOOL mUnremovable;
BOOL mInFastCacheList;
BOOL mForceCallbackFetch;
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index 9ee5ed758f..be80fab8d2 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -184,6 +184,12 @@ void LLViewerTextureList::doPreloadImages()
mImagePreloads.insert(image);
}
+ LLPointer<LLImageRaw> img_blak_square_tex(new LLImageRaw(2, 2, 3));
+ memset(img_blak_square_tex->getData(), 0, img_blak_square_tex->getDataSize());
+ LLPointer<LLViewerFetchedTexture> img_blak_square(new LLViewerFetchedTexture(img_blak_square_tex, FTT_DEFAULT, FALSE));
+ gBlackSquareID = img_blak_square->getID();
+ img_blak_square->setUnremovable(TRUE);
+ addImage(img_blak_square, TEX_LIST_DISCARD);
}
static std::string get_texture_list_name()
@@ -854,7 +860,7 @@ void LLViewerTextureList::updateImagesDecodePriorities()
LLPointer<LLViewerFetchedTexture> imagep = iter->second;
++iter; // safe to increment now
- if(imagep->isInDebug())
+ if(imagep->isInDebug() || imagep->isUnremovable())
{
update_counter--;
continue; //is in debug, ignore.