diff options
-rw-r--r-- | indra/llcharacter/llkeyframemotion.cpp | 7 | ||||
-rw-r--r-- | indra/llrender/llimagegl.cpp | 16 | ||||
-rw-r--r-- | indra/llrender/llimagegl.h | 2 | ||||
-rw-r--r-- | indra/llui/llfloater.cpp | 2 | ||||
-rw-r--r-- | indra/llui/llview.cpp | 2 | ||||
-rw-r--r-- | indra/newview/app_settings/settings.xml | 2 | ||||
-rw-r--r-- | indra/newview/llappviewer.cpp | 4 | ||||
-rw-r--r-- | indra/newview/lldynamictexture.cpp | 2 | ||||
-rw-r--r-- | indra/newview/lldynamictexture.h | 13 | ||||
-rw-r--r-- | indra/newview/llfloateranimpreview.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llfloateranimpreview.h | 2 | ||||
-rw-r--r-- | indra/newview/llfloaterimagepreview.cpp | 10 | ||||
-rw-r--r-- | indra/newview/llfloaterimagepreview.h | 4 | ||||
-rw-r--r-- | indra/newview/llpopupview.cpp | 1 | ||||
-rw-r--r-- | indra/newview/lltexlayer.cpp | 6 | ||||
-rw-r--r-- | indra/newview/lltexlayer.h | 1 | ||||
-rw-r--r-- | indra/newview/lltexturecache.cpp | 1 | ||||
-rw-r--r-- | indra/newview/lltoolmorph.cpp | 12 | ||||
-rw-r--r-- | indra/newview/lltoolmorph.h | 3 | ||||
-rw-r--r-- | indra/newview/pipeline.cpp | 10 | ||||
-rw-r--r-- | indra/newview/pipeline.h | 3 |
21 files changed, 98 insertions, 11 deletions
diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp index 5a2e3f73f9..f4dc3b927b 100644 --- a/indra/llcharacter/llkeyframemotion.cpp +++ b/indra/llcharacter/llkeyframemotion.cpp @@ -658,7 +658,12 @@ BOOL LLKeyframeMotion::onActivate() // If the keyframe anim has an associated emote, trigger it. if( mJointMotionList->mEmoteName.length() > 0 ) { - mCharacter->startMotion( gAnimLibrary.stringToAnimState(mJointMotionList->mEmoteName) ); + LLUUID emote_anim_id = gAnimLibrary.stringToAnimState(mJointMotionList->mEmoteName); + // don't start emote if already active to avoid recursion + if (!mCharacter->isMotionActive(emote_anim_id)) + { + mCharacter->startMotion( emote_anim_id ); + } } mLastLoopedTime = 0.f; diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index 3d8bd21609..8addee606b 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -105,9 +105,9 @@ void check_all_images() } } -void LLImageGL::checkTexSize() const +void LLImageGL::checkTexSize(bool forced) const { - if (gDebugGL && mTarget == GL_TEXTURE_2D) + if ((forced || gDebugGL) && mTarget == GL_TEXTURE_2D) { GLint texname; glGetIntegerv(GL_TEXTURE_BINDING_2D, &texname); @@ -129,6 +129,8 @@ void LLImageGL::checkTexSize() const glGetTexLevelParameteriv(mTarget, 0, GL_TEXTURE_WIDTH, (GLint*)&x); glGetTexLevelParameteriv(mTarget, 0, GL_TEXTURE_HEIGHT, (GLint*)&y) ; stop_glerror() ; + llcallstacks << "w: " << x << " h: " << y << llcallstacksendl ; + if(!x || !y) { return ; @@ -138,11 +140,13 @@ void LLImageGL::checkTexSize() const error = TRUE; if (gDebugSession) { - gFailLog << "wrong texture size and discard level!" << std::endl; + gFailLog << "wrong texture size and discard level!" << + mWidth << " Height: " << mHeight << " Current Level: " << mCurrentDiscardLevel << std::endl; } else { - llerrs << "wrong texture size and discard level!" << llendl ; + llerrs << "wrong texture size and discard level: width: " << + mWidth << " Height: " << mHeight << " Current Level: " << mCurrentDiscardLevel << llendl ; } } @@ -1044,7 +1048,9 @@ BOOL LLImageGL::setSubImageFromFrameBuffer(S32 fb_x, S32 fb_y, S32 x_pos, S32 y_ { if (gGL.getTexUnit(0)->bind(this, false, true)) { - //checkTexSize() ; + checkTexSize(true) ; + llcallstacks << fb_x << " : " << fb_y << " : " << x_pos << " : " << y_pos << " : " << width << " : " << height << llcallstacksendl ; + glCopyTexSubImage2D(GL_TEXTURE_2D, 0, fb_x, fb_y, x_pos, y_pos, width, height); mGLTextureCreated = true; stop_glerror(); diff --git a/indra/llrender/llimagegl.h b/indra/llrender/llimagegl.h index f0870c3fc4..41239d24c8 100644 --- a/indra/llrender/llimagegl.h +++ b/indra/llrender/llimagegl.h @@ -157,7 +157,7 @@ public: void updatePickMask(S32 width, S32 height, const U8* data_in); BOOL getMask(const LLVector2 &tc); - void checkTexSize() const ; + void checkTexSize(bool forced = false) const ; // Sets the addressing mode used to sample the texture // (such as wrapping, mirrored wrapping, and clamp) diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index e672252a50..a55e9c0395 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -563,6 +563,7 @@ void LLFloater::handleVisibilityChange ( BOOL new_visibility ) void LLFloater::openFloater(const LLSD& key) { + llinfos << "Opening floater " << getName() << llendl; mKey = key; // in case we need to open ourselves again if (getSoundFlags() != SILENT @@ -603,6 +604,7 @@ void LLFloater::openFloater(const LLSD& key) void LLFloater::closeFloater(bool app_quitting) { + llinfos << "Closing floater " << getName() << llendl; if (app_quitting) { LLFloater::sQuitting = true; diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 781c111474..e67f0ec3fc 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -1321,6 +1321,8 @@ void LLView::drawChildren() if (viewp->getVisible() && viewp->getRect().isValid()) { + // check for bad data + llassert_always(viewp->getVisible() == TRUE); // Only draw views that are within the root view localRectToScreen(viewp->getRect(),&screenRect); if ( rootRect.overlaps(screenRect) && LLUI::sDirtyRect.overlaps(screenRect)) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 8b66cce8a3..dd38965a5a 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -10600,7 +10600,7 @@ <key>Type</key> <string>Boolean</string> <key>Value</key> - <integer>0</integer> + <integer>1</integer> </map> <key>WaterEditPresets</key> <map> diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 8e959993fe..78163adf47 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2581,6 +2581,8 @@ void LLAppViewer::handleViewerCrash() { llinfos << "Handle viewer crash entry." << llendl; + llinfos << "Last render pool type: " << LLPipeline::sCurRenderPoolType << llendl ; + //print out recorded call stacks if there are any. LLError::LLCallStacks::print(); @@ -3051,7 +3053,7 @@ bool LLAppViewer::initCache() gSavedSettings.getBOOL("PurgeCacheOnNextStartup")) { gSavedSettings.setBOOL("PurgeCacheOnNextStartup", false); - mPurgeCache = true; + mPurgeCache = true; } // We have moved the location of the cache directory over time. diff --git a/indra/newview/lldynamictexture.cpp b/indra/newview/lldynamictexture.cpp index c7c79401a0..c423473740 100644 --- a/indra/newview/lldynamictexture.cpp +++ b/indra/newview/lldynamictexture.cpp @@ -167,6 +167,8 @@ void LLViewerDynamicTexture::postRender(BOOL success) { generateGLTexture() ; } + llcallstacks << "class type: " << (S32)getType() << llcallstacksendl ; + success = mGLTexturep->setSubImageFromFrameBuffer(0, 0, mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight); } } diff --git a/indra/newview/lldynamictexture.h b/indra/newview/lldynamictexture.h index 2a944eaada..caf2603519 100644 --- a/indra/newview/lldynamictexture.h +++ b/indra/newview/lldynamictexture.h @@ -41,6 +41,19 @@ class LLViewerDynamicTexture : public LLViewerTexture { +public: + enum + { + LL_VIEWER_DYNAMIC_TEXTURE = LLViewerTexture::DYNAMIC_TEXTURE, + LL_TEX_LAYER_SET_BUFFER = LLViewerTexture::INVALID_TEXTURE_TYPE + 1, + LL_VISUAL_PARAM_HINT, + LL_VISUAL_PARAM_RESET, + LL_PREVIEW_ANIMATION, + LL_IMAGE_PREVIEW_SCULPTED, + LL_IMAGE_PREVIEW_AVATAR, + INVALID_DYNAMIC_TEXTURE + }; + protected: /*virtual*/ ~LLViewerDynamicTexture(); diff --git a/indra/newview/llfloateranimpreview.cpp b/indra/newview/llfloateranimpreview.cpp index 434c89e8ba..043f753e01 100644 --- a/indra/newview/llfloateranimpreview.cpp +++ b/indra/newview/llfloateranimpreview.cpp @@ -1068,6 +1068,12 @@ LLPreviewAnimation::~LLPreviewAnimation() mDummyAvatar->markDead(); } +//virtual +S8 LLPreviewAnimation::getType() const +{ + return LLViewerDynamicTexture::LL_PREVIEW_ANIMATION ; +} + //----------------------------------------------------------------------------- // update() //----------------------------------------------------------------------------- diff --git a/indra/newview/llfloateranimpreview.h b/indra/newview/llfloateranimpreview.h index 3ee1f419ab..84f131a322 100644 --- a/indra/newview/llfloateranimpreview.h +++ b/indra/newview/llfloateranimpreview.h @@ -50,6 +50,8 @@ protected: public: LLPreviewAnimation(S32 width, S32 height); + /*virtual*/ S8 getType() const ; + BOOL render(); void requestUpdate(); void rotate(F32 yaw_radians, F32 pitch_radians); diff --git a/indra/newview/llfloaterimagepreview.cpp b/indra/newview/llfloaterimagepreview.cpp index 6b754bd065..ef9da30552 100644 --- a/indra/newview/llfloaterimagepreview.cpp +++ b/indra/newview/llfloaterimagepreview.cpp @@ -629,6 +629,11 @@ LLImagePreviewAvatar::~LLImagePreviewAvatar() mDummyAvatar->markDead(); } +//virtual +S8 LLImagePreviewAvatar::getType() const +{ + return LLViewerDynamicTexture::LL_IMAGE_PREVIEW_AVATAR ; +} void LLImagePreviewAvatar::setPreviewTarget(const std::string& joint_name, const std::string& mesh_name, LLImageRaw* imagep, F32 distance, BOOL male) { @@ -808,6 +813,11 @@ LLImagePreviewSculpted::~LLImagePreviewSculpted() { } +//virtual +S8 LLImagePreviewSculpted::getType() const +{ + return LLViewerDynamicTexture::LL_IMAGE_PREVIEW_SCULPTED ; +} void LLImagePreviewSculpted::setPreviewTarget(LLImageRaw* imagep, F32 distance) { diff --git a/indra/newview/llfloaterimagepreview.h b/indra/newview/llfloaterimagepreview.h index 4a12543650..466bd1d0ec 100644 --- a/indra/newview/llfloaterimagepreview.h +++ b/indra/newview/llfloaterimagepreview.h @@ -54,6 +54,8 @@ protected: public: LLImagePreviewSculpted(S32 width, S32 height); + /*virtual*/ S8 getType() const ; + void setPreviewTarget(LLImageRaw *imagep, F32 distance); void setTexture(U32 name) { mTextureName = name; } @@ -85,6 +87,8 @@ protected: public: LLImagePreviewAvatar(S32 width, S32 height); + /*virtual*/ S8 getType() const ; + void setPreviewTarget(const std::string& joint_name, const std::string& mesh_name, LLImageRaw* imagep, F32 distance, BOOL male); void setTexture(U32 name) { mTextureName = name; } void clearPreviewTexture(const std::string& mesh_name); diff --git a/indra/newview/llpopupview.cpp b/indra/newview/llpopupview.cpp index 7cde350d5a..4523bf2ba4 100644 --- a/indra/newview/llpopupview.cpp +++ b/indra/newview/llpopupview.cpp @@ -116,7 +116,6 @@ BOOL LLPopupView::handleMouseEvent(boost::function<BOOL(LLView*, S32, S32)> func if (!popup || !predicate(popup)) { - ++popup_it; continue; } diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp index 3f4dab4fea..492fb2ad52 100644 --- a/indra/newview/lltexlayer.cpp +++ b/indra/newview/lltexlayer.cpp @@ -99,6 +99,12 @@ LLTexLayerSetBuffer::~LLTexLayerSetBuffer() } //virtual +S8 LLTexLayerSetBuffer::getType() const +{ + return LLViewerDynamicTexture::LL_TEX_LAYER_SET_BUFFER ; +} + +//virtual void LLTexLayerSetBuffer::restoreGLTexture() { LLViewerDynamicTexture::restoreGLTexture() ; diff --git a/indra/newview/lltexlayer.h b/indra/newview/lltexlayer.h index 5be58f64a9..ae280dd063 100644 --- a/indra/newview/lltexlayer.h +++ b/indra/newview/lltexlayer.h @@ -325,6 +325,7 @@ public: LLTexLayerSetBuffer(LLTexLayerSet* const owner, S32 width, S32 height); virtual ~LLTexLayerSetBuffer(); + /*virtual*/ S8 getType() const ; virtual void preRender(BOOL clear_depth); virtual void postRender(BOOL success); virtual BOOL render(); diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index df79725474..9bf9c92815 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -743,6 +743,7 @@ LLTextureCache::LLTextureCache(bool threaded) mListMutex(NULL), mHeaderAPRFile(NULL), mReadOnly(TRUE), //do not allow to change the texture cache until setReadOnly() is called. + mReadOnly(TRUE), //do not allow to change the texture cache until setReadOnly() is called. mTexturesSizeTotal(0), mDoPurge(FALSE) { diff --git a/indra/newview/lltoolmorph.cpp b/indra/newview/lltoolmorph.cpp index 969049ee65..22176c037f 100644 --- a/indra/newview/lltoolmorph.cpp +++ b/indra/newview/lltoolmorph.cpp @@ -108,6 +108,12 @@ LLVisualParamHint::~LLVisualParamHint() LLVisualParamHint::sInstances.erase( this ); } +//virtual +S8 LLVisualParamHint::getType() const +{ + return LLViewerDynamicTexture::LL_VISUAL_PARAM_HINT ; +} + //----------------------------------------------------------------------------- // static // requestHintUpdates() @@ -287,6 +293,12 @@ LLVisualParamReset::LLVisualParamReset() : LLViewerDynamicTexture(1, 1, 1, ORDER { } +//virtual +S8 LLVisualParamReset::getType() const +{ + return LLViewerDynamicTexture::LL_VISUAL_PARAM_RESET ; +} + //----------------------------------------------------------------------------- // render() //----------------------------------------------------------------------------- diff --git a/indra/newview/lltoolmorph.h b/indra/newview/lltoolmorph.h index b7df718ba2..c332c296bd 100644 --- a/indra/newview/lltoolmorph.h +++ b/indra/newview/lltoolmorph.h @@ -64,6 +64,8 @@ public: LLViewerVisualParam *param, F32 param_weight); + /*virtual*/ S8 getType() const ; + BOOL needsRender(); void preRender(BOOL clear_depth); BOOL render(); @@ -107,6 +109,7 @@ protected: public: LLVisualParamReset(); /*virtual */ BOOL render(); + /*virtual*/ S8 getType() const ; static BOOL sDirty; }; diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 4ca251af3e..36daca174b 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -2958,8 +2958,12 @@ void LLPipeline::renderHighlights() } } +//debug use +U32 LLPipeline::sCurRenderPoolType = 0 ; + void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate) { + llpushcallstacks ; LLMemType mt(LLMemType::MTYPE_PIPELINE_RENDER_GEOM); LLFastTimer t(FTM_RENDER_GEOMETRY); @@ -3067,6 +3071,9 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate) cur_type = poolp->getType(); + //debug use + sCurRenderPoolType = cur_type ; + if (occlude && cur_type >= LLDrawPool::POOL_GRASS) { occlude = FALSE; @@ -7096,6 +7103,7 @@ inline float sgn(float a) void LLPipeline::generateWaterReflection(LLCamera& camera_in) { + llpushcallstacks ; if (LLPipeline::sWaterReflections && assertInitialized() && LLDrawPoolWater::sNeedsReflectionUpdate) { BOOL skip_avatar_update = FALSE; @@ -7831,7 +7839,7 @@ void LLPipeline::renderHighlight(const LLViewerObject* obj, F32 fade) void LLPipeline::generateHighlight(LLCamera& camera) { //render highlighted object as white into offscreen render target - + llpushcallstacks ; if (mHighlightObject.notNull()) { mHighlightSet.insert(HighlightItem(mHighlightObject)); diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index 6aecc23aac..60e0b0ae8c 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -686,6 +686,9 @@ protected: public: static BOOL sRenderBeacons; static BOOL sRenderHighlight; + + //debug use + static U32 sCurRenderPoolType ; }; void render_bbox(const LLVector3 &min, const LLVector3 &max); |