mesa: better error message when running out of GLSL samplers
authorBrian Paul <brianp@vmware.com>
Wed, 31 Dec 2008 00:03:09 +0000 (17:03 -0700)
committerBrian Paul <brianp@vmware.com>
Wed, 31 Dec 2008 00:03:09 +0000 (17:03 -0700)
src/mesa/shader/slang/slang_link.c

index 834f05176c43ca2d56e5eab23df2dde2155fed95..22ae635b06561049e3fbcfe1baf7dfa49f0318b9 100644 (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;