summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llrender')
-rw-r--r--indra/llrender/llfontgl.cpp2
-rw-r--r--indra/llrender/llgl.cpp14
-rw-r--r--indra/llrender/llgl.h4
-rw-r--r--indra/llrender/llimagegl.cpp12
4 files changed, 27 insertions, 5 deletions
diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp
index 849318ccee..5336fd5c8b 100644
--- a/indra/llrender/llfontgl.cpp
+++ b/indra/llrender/llfontgl.cpp
@@ -399,7 +399,7 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons
gGL.pushUIMatrix();
renderUTF8(std::string("..."),
0,
- cur_x / sScaleX, (F32)y,
+ (cur_x - origin.mV[VX]) / sScaleX, (F32)y,
color,
LEFT, valign,
style_to_add,
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index 236594d602..98ed34d6fc 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -356,6 +356,8 @@ LLGLManager::LLGLManager() :
mHasSeparateSpecularColor(FALSE),
+ mDebugGPU(FALSE),
+
mDriverVersionMajor(1),
mDriverVersionMinor(0),
mDriverVersionRelease(0),
@@ -523,11 +525,23 @@ bool LLGLManager::initGL()
return false;
}
+ setToDebugGPU();
initGLStates();
return true;
}
+void LLGLManager::setToDebugGPU()
+{
+ //"MOBILE INTEL(R) 965 EXPRESS CHIP",
+ if (mGLRenderer.find("INTEL") != std::string::npos && mGLRenderer.find("965") != std::string::npos)
+ {
+ mDebugGPU = TRUE ;
+ }
+
+ return ;
+}
+
void LLGLManager::getGLInfo(LLSD& info)
{
info["GLInfo"]["GLVendor"] = std::string((const char *)glGetString(GL_VENDOR));
diff --git a/indra/llrender/llgl.h b/indra/llrender/llgl.h
index c4f5d91e1a..937bf63849 100644
--- a/indra/llrender/llgl.h
+++ b/indra/llrender/llgl.h
@@ -120,6 +120,9 @@ public:
// Misc extensions
BOOL mHasSeparateSpecularColor;
+
+ //whether this GPU is in the debug list.
+ BOOL mDebugGPU;
S32 mDriverVersionMajor;
S32 mDriverVersionMinor;
@@ -148,6 +151,7 @@ private:
void initExtensions();
void initGLStates();
void initGLImages();
+ void setToDebugGPU();
};
extern LLGLManager gGLManager;
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp
index 1a48c8a06c..ab9abf88e8 100644
--- a/indra/llrender/llimagegl.cpp
+++ b/indra/llrender/llimagegl.cpp
@@ -150,12 +150,12 @@ void LLImageGL::checkTexSize(bool forced) const
if (gDebugSession)
{
gFailLog << "wrong texture size and discard level!" <<
- mWidth << " Height: " << mHeight << " Current Level: " << mCurrentDiscardLevel << std::endl;
+ mWidth << " Height: " << mHeight << " Current Level: " << (S32)mCurrentDiscardLevel << std::endl;
}
else
{
llerrs << "wrong texture size and discard level: width: " <<
- mWidth << " Height: " << mHeight << " Current Level: " << mCurrentDiscardLevel << llendl ;
+ mWidth << " Height: " << mHeight << " Current Level: " << (S32)mCurrentDiscardLevel << llendl ;
}
}
@@ -1057,8 +1057,12 @@ BOOL LLImageGL::setSubImageFromFrameBuffer(S32 fb_x, S32 fb_y, S32 x_pos, S32 y_
{
if (gGL.getTexUnit(0)->bind(this, false, true))
{
- checkTexSize(true) ;
- llcallstacks << fb_x << " : " << fb_y << " : " << x_pos << " : " << y_pos << " : " << width << " : " << height << llcallstacksendl ;
+ if(gGLManager.mDebugGPU)
+ {
+ llinfos << "Calling glCopyTexSubImage2D(...)" << llendl ;
+ 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;