mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
mesa: better error message when running out of GLSL samplers
(cherry picked from commit ca0540e25c)
This commit is contained in:
parent
681ff412f9
commit
efe91b0000
1 changed files with 4 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue