summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llcharacter/llcharacter.cpp25
-rw-r--r--indra/llcharacter/llcharacter.h1
-rw-r--r--indra/llrender/llgl.cpp7
-rw-r--r--indra/newview/llviewertexturelist.cpp19
-rw-r--r--indra/newview/llviewertexturelist.h7
-rw-r--r--indra/newview/llvoavatar.cpp4
6 files changed, 38 insertions, 25 deletions
diff --git a/indra/llcharacter/llcharacter.cpp b/indra/llcharacter/llcharacter.cpp
index 5f84be2c5d..c9fb8534f1 100644
--- a/indra/llcharacter/llcharacter.cpp
+++ b/indra/llcharacter/llcharacter.cpp
@@ -38,7 +38,7 @@
LLStringTable LLCharacter::sVisualParamNames(1024);
std::vector< LLCharacter* > LLCharacter::sInstances;
-
+BOOL LLCharacter::sAllowInstancesChange = TRUE ;
//-----------------------------------------------------------------------------
// LLCharacter()
@@ -51,8 +51,10 @@ LLCharacter::LLCharacter()
mAppearanceSerialNum( 0 ),
mSkeletonSerialNum( 0 )
{
- mMotionController.setCharacter( this );
+ llassert_always(sAllowInstancesChange) ;
sInstances.push_back(this);
+
+ mMotionController.setCharacter( this );
mPauseRequest = new LLPauseRequestHandle();
}
@@ -62,18 +64,29 @@ LLCharacter::LLCharacter()
// Class Destructor
//-----------------------------------------------------------------------------
LLCharacter::~LLCharacter()
-{
+{
for (LLVisualParam *param = getFirstVisualParam();
param;
param = getNextVisualParam())
{
delete param;
}
- std::vector<LLCharacter*>::iterator iter = std::find(sInstances.begin(), sInstances.end(), this);
- if (iter != sInstances.end())
+
+ U32 i ;
+ U32 size = sInstances.size() ;
+ for(i = 0 ; i < size ; i++)
{
- sInstances.erase(iter);
+ if(sInstances[i] == this)
+ {
+ break ;
+ }
}
+
+ llassert_always(i < size) ;
+
+ llassert_always(sAllowInstancesChange) ;
+ sInstances[i] = sInstances[size - 1] ;
+ sInstances.pop_back() ;
}
diff --git a/indra/llcharacter/llcharacter.h b/indra/llcharacter/llcharacter.h
index a6347fcc3c..e81a27c2bc 100644
--- a/indra/llcharacter/llcharacter.h
+++ b/indra/llcharacter/llcharacter.h
@@ -266,6 +266,7 @@ public:
void setSkeletonSerialNum( U32 num ) { mSkeletonSerialNum = num; }
static std::vector< LLCharacter* > sInstances;
+ static BOOL sAllowInstancesChange ; //debug use
protected:
LLMotionController mMotionController;
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index a3aed4dd8a..c224ab0e9b 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -568,6 +568,13 @@ bool LLGLManager::initGL()
glGetIntegerv(GL_MAX_SAMPLE_MASK_WORDS, &mMaxSampleMaskWords);
}
+#if LL_WINDOWS
+ if (mIsATI)
+ { //using multisample textures on ATI results in black screen for some reason
+ mHasTextureMultisample = FALSE;
+ }
+#endif
+
if (mHasFramebufferObject)
{
glGetIntegerv(GL_MAX_SAMPLES, &mMaxSamples);
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index a1d9434d44..d24174adea 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -76,7 +76,6 @@ LLStat LLViewerTextureList::sFormattedMemStat(32, TRUE);
LLViewerTextureList gTextureList;
static LLFastTimer::DeclareTimer FTM_PROCESS_IMAGES("Process Images");
-U32 LLViewerTextureList::sRenderThreadID = 0 ;
///////////////////////////////////////////////////////////////////////////////
LLViewerTextureList::LLViewerTextureList()
@@ -90,7 +89,6 @@ LLViewerTextureList::LLViewerTextureList()
void LLViewerTextureList::init()
{
- sRenderThreadID = LLThread::currentID() ;
mInitialized = TRUE ;
sNumImages = 0;
mUpdateStats = TRUE;
@@ -502,10 +500,9 @@ LLViewerFetchedTexture *LLViewerTextureList::findImage(const LLUUID &image_id)
return iter->second;
}
-void LLViewerTextureList::addImageToList(LLViewerFetchedTexture *image, U32 thread_id)
+void LLViewerTextureList::addImageToList(LLViewerFetchedTexture *image)
{
llassert_always(mInitialized) ;
- llassert_always(sRenderThreadID == thread_id);
llassert(image);
if (image->isInImageList())
{
@@ -519,10 +516,9 @@ void LLViewerTextureList::addImageToList(LLViewerFetchedTexture *image, U32 thre
image->setInImageList(TRUE) ;
}
-void LLViewerTextureList::removeImageFromList(LLViewerFetchedTexture *image, U32 thread_id)
+void LLViewerTextureList::removeImageFromList(LLViewerFetchedTexture *image)
{
llassert_always(mInitialized) ;
- llassert_always(sRenderThreadID == thread_id);
llassert(image);
if (!image->isInImageList())
{
@@ -659,10 +655,7 @@ void LLViewerTextureList::updateImagesDecodePriorities()
const F32 LAZY_FLUSH_TIMEOUT = 30.f; // stop decoding
const F32 MAX_INACTIVE_TIME = 50.f; // actually delete
S32 min_refs = 3; // 1 for mImageList, 1 for mUUIDMap, 1 for local reference
- if (imagep->hasCallbacks())
- {
- min_refs++; // Add an extra reference if we're on the loaded callback list
- }
+
S32 num_refs = imagep->getNumRefs();
if (num_refs == min_refs)
{
@@ -719,9 +712,9 @@ void LLViewerTextureList::updateImagesDecodePriorities()
if ((decode_priority_test < old_priority_test * .8f) ||
(decode_priority_test > old_priority_test * 1.25f))
{
- removeImageFromList(imagep, sRenderThreadID);
+ removeImageFromList(imagep);
imagep->setDecodePriority(decode_priority);
- addImageToList(imagep, sRenderThreadID);
+ addImageToList(imagep);
}
update_counter--;
}
@@ -893,8 +886,6 @@ void LLViewerTextureList::decodeAllImages(F32 max_time)
{
LLTimer timer;
- llassert_always(sRenderThreadID == LLThread::currentID());
-
// Update texture stats and priorities
std::vector<LLPointer<LLViewerFetchedTexture> > image_list;
for (image_priority_list_t::iterator iter = mImageList.begin();
diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h
index d02b6be6b5..7f4dd0ae88 100644
--- a/indra/newview/llviewertexturelist.h
+++ b/indra/newview/llviewertexturelist.h
@@ -121,8 +121,8 @@ private:
void addImage(LLViewerFetchedTexture *image);
void deleteImage(LLViewerFetchedTexture *image);
- void addImageToList(LLViewerFetchedTexture *image, U32 thread_id = LLThread::currentID());
- void removeImageFromList(LLViewerFetchedTexture *image, U32 thread_id = LLThread::currentID());
+ void addImageToList(LLViewerFetchedTexture *image);
+ void removeImageFromList(LLViewerFetchedTexture *image);
LLViewerFetchedTexture * getImage(const LLUUID &image_id,
BOOL usemipmap = TRUE,
@@ -208,9 +208,6 @@ public:
private:
static S32 sNumImages;
static void (*sUUIDCallback)(void**, const LLUUID &);
-
- //debug use
- static U32 sRenderThreadID;
};
class LLUIImageList : public LLImageProviderInterface, public LLSingleton<LLUIImageList>
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 1b53348b43..8eda6346b0 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -8242,6 +8242,8 @@ U32 LLVOAvatar::getPartitionType() const
//static
void LLVOAvatar::updateImpostors()
{
+ LLCharacter::sAllowInstancesChange = FALSE ;
+
for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
iter != LLCharacter::sInstances.end(); ++iter)
{
@@ -8251,6 +8253,8 @@ void LLVOAvatar::updateImpostors()
gPipeline.generateImpostor(avatar);
}
}
+
+ LLCharacter::sAllowInstancesChange = TRUE ;
}
BOOL LLVOAvatar::isImpostor() const