mesa: better error message when running out of GLSL samplers

This commit is contained in:
Brian Paul
2008-12-30 17:03:09 -07:00
parent 6f346ec0b8
commit ca0540e25c
+4 -1
View File
@@ -240,7 +240,10 @@ link_uniform_vars(struct gl_shader_program *shProg,
GLuint sampNum = *numSamplers;
GLuint oldSampNum = (GLuint) prog->Parameters->ParameterValues[i][0];
if (oldSampNum >= MAX_SAMPLERS) {
link_error(shProg, "Too many texture samplers");
char s[100];
sprintf(s, "Too many texture samplers (%u, max is %u)",
oldSampNum + 1, MAX_SAMPLERS);
link_error(shProg, s);
return GL_FALSE;
}
samplerMap[oldSampNum] = sampNum;