summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2010-08-30 18:06:45 -0600
committerXiaohong Bao <bao@lindenlab.com>2010-08-30 18:06:45 -0600
commit2969599880f898219700aa0e314a870e6e480178 (patch)
treee8e4eefc0d2334da4ef67b4a480599af5c10752d
parent78c6b247d169fd93e80adee65a99c1330153877d (diff)
a try to fix EXT-6791: [crashhunters] Intel 965 Crash in glCopyTexSubImage2D
-rw-r--r--indra/llrender/llimagegl.cpp3
-rw-r--r--indra/newview/lldynamictexture.cpp7
2 files changed, 9 insertions, 1 deletions
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp
index 90fcf6ab3f..9d037f2565 100644
--- a/indra/llrender/llimagegl.cpp
+++ b/indra/llrender/llimagegl.cpp
@@ -1055,7 +1055,8 @@ BOOL LLImageGL::setSubImageFromFrameBuffer(S32 fb_x, S32 fb_y, S32 x_pos, S32 y_
{
llinfos << "Calling glCopyTexSubImage2D(...)" << llendl ;
checkTexSize(true) ;
- llcallstacks << fb_x << " : " << fb_y << " : " << x_pos << " : " << y_pos << " : " << width << " : " << height << llcallstacksendl ;
+ llcallstacks << fb_x << " : " << fb_y << " : " << x_pos << " : " << y_pos << " : " << width << " : " << height <<
+ " : " << (S32)mComponents << llcallstacksendl ;
}
glCopyTexSubImage2D(GL_TEXTURE_2D, 0, fb_x, fb_y, x_pos, y_pos, width, height);
diff --git a/indra/newview/lldynamictexture.cpp b/indra/newview/lldynamictexture.cpp
index ed35546ca3..a3d2941114 100644
--- a/indra/newview/lldynamictexture.cpp
+++ b/indra/newview/lldynamictexture.cpp
@@ -54,6 +54,13 @@ LLViewerDynamicTexture::LLViewerDynamicTexture(S32 width, S32 height, S32 compon
{
llassert((1 <= components) && (components <= 4));
+ if(gGLManager.mDebugGPU)
+ {
+ if(components == 3)
+ {
+ mComponents = 4 ; //convert to 32bits.
+ }
+ }
generateGLTexture();
llassert( 0 <= order && order < ORDER_COUNT );