Allow more than 2gigs of texture memory... Fix shader buggles.
# Conflicts: # indra/newview/llviewertexturelist.cpp
This commit is contained in:
@@ -746,6 +746,10 @@ BOOL LLGLSLShader::mapUniforms(const vector<LLStaticHashedString> * uniforms)
|
||||
gl_uniform_data_t gl_uniform;
|
||||
GLsizei length;
|
||||
glGetActiveUniformARB(mProgramObject, i, 1024, &length, &gl_uniform.size, &gl_uniform.type, (GLcharARB *)name);
|
||||
if (length && name[length - 1] == '\0')
|
||||
{
|
||||
--length; // Some drivers can't be trusted...
|
||||
}
|
||||
if (gl_uniform.size < 0 || length <= 0)
|
||||
continue;
|
||||
gl_uniform.name = std::string(name, length);
|
||||
@@ -762,7 +766,7 @@ BOOL LLGLSLShader::mapUniforms(const vector<LLStaticHashedString> * uniforms)
|
||||
if (gl_uniform.texunit_priority == UINT_MAX)
|
||||
{
|
||||
S32 idx;
|
||||
if (sscanf(gl_uniform.name.c_str(), "tex%d", &idx) && idx < (S32)max_index)
|
||||
if (sscanf(gl_uniform.name.c_str(), "tex%d", &idx))
|
||||
{
|
||||
gl_uniform.texunit_priority = idx;
|
||||
}
|
||||
|
||||
@@ -1154,7 +1154,7 @@ void LLShaderMgr::initAttribsAndUniforms()
|
||||
mReservedUniforms.push_back("specularMap");
|
||||
mReservedUniforms.push_back("bumpMap");
|
||||
mReservedUniforms.push_back("environmentMap");
|
||||
mReservedUniforms.push_back("cloude_noise_texture");
|
||||
mReservedUniforms.push_back("cloud_noise_texture");
|
||||
mReservedUniforms.push_back("fullbright");
|
||||
mReservedUniforms.push_back("lightnorm");
|
||||
mReservedUniforms.push_back("sunlight_color_copy");
|
||||
|
||||
Reference in New Issue
Block a user