summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llrender/llimagegl.cpp16
-rw-r--r--indra/llrender/llimagegl.h2
-rw-r--r--indra/newview/llappviewer.cpp2
-rw-r--r--indra/newview/lldynamictexture.cpp2
-rw-r--r--indra/newview/lldynamictexture.h13
-rw-r--r--indra/newview/llfloateranimpreview.cpp6
-rw-r--r--indra/newview/llfloateranimpreview.h2
-rw-r--r--indra/newview/llfloaterimagepreview.cpp10
-rw-r--r--indra/newview/llfloaterimagepreview.h4
-rw-r--r--indra/newview/lltexlayer.cpp6
-rw-r--r--indra/newview/lltexlayer.h1
-rw-r--r--indra/newview/lltoolmorph.cpp12
-rw-r--r--indra/newview/lltoolmorph.h3
-rw-r--r--indra/newview/pipeline.cpp10
-rw-r--r--indra/newview/pipeline.h3
15 files changed, 85 insertions, 7 deletions
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp
index 36ac3ff119..68b556c3bb 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/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 3e7ef26bcd..f19a33301a 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -2577,6 +2577,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();
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 5ec58c8dd6..72dc182461 100644
--- a/indra/newview/llfloateranimpreview.cpp
+++ b/indra/newview/llfloateranimpreview.cpp
@@ -1069,6 +1069,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/lltexlayer.cpp b/indra/newview/lltexlayer.cpp
index 386b636367..8cb319b122 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/lltoolmorph.cpp b/indra/newview/lltoolmorph.cpp
index 5f825b461e..79846b9160 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()
@@ -290,6 +296,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 259ca21e93..e82fccde27 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -2957,8 +2957,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);
@@ -3066,6 +3070,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;
@@ -7098,6 +7105,7 @@ inline float sgn(float a)
void LLPipeline::generateWaterReflection(LLCamera& camera_in)
{
+ llpushcallstacks ;
if (LLPipeline::sWaterReflections && assertInitialized() && LLDrawPoolWater::sNeedsReflectionUpdate)
{
LLVOAvatarSelf* avatar = gAgent.getAvatarObject();
@@ -7833,7 +7841,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);