diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp
index aeb0f92521826cd8dba53807278412aef36d3441..69ef3f9ed7350cab7956cc1f545ef8daafa60d6f 100644
--- a/indra/llrender/llimagegl.cpp
+++ b/indra/llrender/llimagegl.cpp
@@ -109,6 +109,13 @@ void LLImageGL::checkTexSize(bool forced) const
 {
 	if ((forced || gDebugGL) && mTarget == GL_TEXTURE_2D)
 	{
+		{
+			//check viewport
+			GLint vp[4] ;
+			glGetIntegerv(GL_VIEWPORT, vp) ;
+			llcallstacks << "viewport: " << vp[0] << " : " << vp[1] << " : " << vp[2] << " : " << vp[3] << llcallstacksendl ;
+		}
+
 		GLint texname;
 		glGetIntegerv(GL_TEXTURE_BINDING_2D, &texname);
 		BOOL error = FALSE;