summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
authorHoward Stearns <howard.stearns@gmail.com>2022-09-02 15:44:19 -0700
committerHoward Stearns <howard.stearns@gmail.com>2022-09-02 15:44:19 -0700
commit013a7130011f72ab0c124dba87376b9862a95461 (patch)
treedd684137892e9430087a698383c6dba9c2fb2b23 /indra/llrender
parent88e1740d205bdfaa57d1d5dec4e6e9e755eae075 (diff)
SL-17967 - slightly more meaningful ogl error reporting
Diffstat (limited to 'indra/llrender')
-rw-r--r--indra/llrender/llshadermgr.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp
index 43d59f7b43..96e83e6fbe 100644
--- a/indra/llrender/llshadermgr.cpp
+++ b/indra/llrender/llshadermgr.cpp
@@ -592,7 +592,7 @@ void LLShaderMgr::dumpShaderSource(U32 shader_code_count, GLchar** shader_code_t
LL_CONT << LL_ENDL;
}
-void LLShaderMgr::dumpObjectLog(GLuint ret, BOOL warns, const std::string& filename)
+void LLShaderMgr::dumpObjectLog(GLuint ret, BOOL warns, const std::string& filename)
{
std::string log = get_object_log(ret);
std::string fname = filename;
@@ -985,11 +985,6 @@ GLuint LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_lev
fclose(file);
- error = glGetError();
- if (error != GL_NO_ERROR)
- {
- LL_WARNS("HRS") << "WTF? Should be no error here: " << error << LL_ENDL;
- }
//create shader object
GLuint ret = glCreateShader(type);
@@ -1069,7 +1064,7 @@ GLuint LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_lev
return ret;
}
-BOOL LLShaderMgr::linkProgramObject(GLuint obj, BOOL suppress_errors)
+BOOL LLShaderMgr::linkProgramObject(GLuint obj, BOOL suppress_errors)
{
//check for errors
glLinkProgram(obj);
@@ -1079,6 +1074,8 @@ BOOL LLShaderMgr::linkProgramObject(GLuint obj, BOOL suppress_errors)
{
//an error occured, print log
LL_SHADER_LOADING_WARNS() << "GLSL Linker Error:" << LL_ENDL;
+ dumpObjectLog(obj, TRUE, "linker");
+ return success;
}
std::string log = get_object_log(obj);
@@ -1178,7 +1175,7 @@ void LLShaderMgr::initAttribsAndUniforms()
mReservedUniforms.push_back("emissiveColor");
mReservedUniforms.push_back("metallicFactor");
mReservedUniforms.push_back("roughnessFactor");
-
+
mReservedUniforms.push_back("diffuseMap");
mReservedUniforms.push_back("altDiffuseMap");
mReservedUniforms.push_back("specularMap");