summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llrender/llshadermgr.cpp29
-rw-r--r--indra/newview/lldrawpoolavatar.cpp13
2 files changed, 29 insertions, 13 deletions
diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp
index 8fc7163b83..17fc7fe120 100644
--- a/indra/llrender/llshadermgr.cpp
+++ b/indra/llrender/llshadermgr.cpp
@@ -391,26 +391,31 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
LL_WARNS("ShaderLoading") << "GL ERROR in glCreateShaderObjectARB: " << error << LL_ENDL;
}
}
- else
+
+ //load source
+ glShaderSourceARB(ret, count, (const GLcharARB**) text, NULL);
+
+ if (gDebugGL)
{
- //load source
- glShaderSourceARB(ret, count, (const GLcharARB**) text, NULL);
error = glGetError();
if (error != GL_NO_ERROR)
{
LL_WARNS("ShaderLoading") << "GL ERROR in glShaderSourceARB: " << error << LL_ENDL;
}
- else
+ }
+
+ //compile source
+ glCompileShaderARB(ret);
+
+ if (gDebugGL)
+ {
+ error = glGetError();
+ if (error != GL_NO_ERROR)
{
- //compile source
- glCompileShaderARB(ret);
- error = glGetError();
- if (error != GL_NO_ERROR)
- {
- LL_WARNS("ShaderLoading") << "GL ERROR in glCompileShaderARB: " << error << LL_ENDL;
- }
+ LL_WARNS("ShaderLoading") << "GL ERROR in glCompileShaderARB: " << error << LL_ENDL;
}
}
+
//free memory
for (GLuint i = 0; i < count; i++)
{
@@ -421,7 +426,7 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
//check for errors
GLint success = GL_TRUE;
glGetObjectParameterivARB(ret, GL_OBJECT_COMPILE_STATUS_ARB, &success);
- if (gDebugGL)
+ if (gDebugGL || success == GL_FALSE)
{
error = glGetError();
if (error != GL_NO_ERROR || success == GL_FALSE)
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index 4b7de97101..62226383a4 100644
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -352,7 +352,18 @@ void LLDrawPoolAvatar::renderShadow(S32 pass)
S32 LLDrawPoolAvatar::getNumPasses()
{
- return LLPipeline::sImpostorRender ? 1 : 4;
+ if (LLPipeline::sImpostorRender)
+ {
+ return 1;
+ }
+ else if (getVertexShaderLevel() > 0)
+ {
+ return 4;
+ }
+ else
+ {
+ return 3;
+ }
}
void LLDrawPoolAvatar::render(S32 pass)