Module: Mesa
Branch: gallium-0.2
Commit: ca0540e25c86b8095511868b0cbe96d7e85f7437
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=ca0540e25c86b8095511868b0cbe96d7e85f7437

Author: Brian Paul <[email protected]>
Date:   Tue Dec 30 17:03:09 2008 -0700

mesa: better error message when running out of GLSL samplers

---

 src/mesa/shader/slang/slang_link.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/mesa/shader/slang/slang_link.c 
b/src/mesa/shader/slang/slang_link.c
index 834f051..22ae635 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;

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to