From: Brian Paul Date: Wed, 31 Dec 2008 00:03:09 +0000 (-0700) Subject: mesa: better error message when running out of GLSL samplers X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=efe91b0000d162deb20486ef6d5e016a11428499;p=mesa.git mesa: better error message when running out of GLSL samplers (cherry picked from commit ca0540e25c86b8095511868b0cbe96d7e85f7437) --- diff --git a/src/mesa/shader/slang/slang_link.c b/src/mesa/shader/slang/slang_link.c index 834f05176c4..22ae635b065 100644 --- a/src/mesa/shader/slang/slang_link.c +++ b/src/mesa/shader/slang/slang_link.c @@ -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;